From 5b74db15927558eec1e12a534167c3c4e4675ce1 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 3 Dec 2013 15:24:43 +0100 Subject: [PATCH] 2 levels of debug --- plugins/querytable/static/js/querytable.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/plugins/querytable/static/js/querytable.js b/plugins/querytable/static/js/querytable.js index 42dfee5e..f8e4e042 100644 --- a/plugins/querytable/static/js/querytable.js +++ b/plugins/querytable/static/js/querytable.js @@ -7,7 +7,9 @@ (function($) { var debug=false; -// debug=true + debug=true + var contents_debug=false; +// contents_debug=true; var QueryTable = Plugin.extend({ @@ -88,7 +90,7 @@ this.slick_data=[]; var selector="#grid-"+this.options.domid; - if (debug) { + if (contents_debug) { messages.debug("slick grid selector is " + selector); for (c in this.slick_columns) { var col=this.slick_columns[c]; @@ -333,10 +335,15 @@ on_all_query_done: function() { if (debug) messages.debug("1-shot initializing dataTables content with " + this.slick_data.length + " lines"); + var start=new Date(); this.slick_grid.setData (this.slick_data, true); - if (debug) - for (k in this.slick_data[0]) messages.debug("slick_data[0]["+k+"]="+this.slick_data[0][k]); this.slick_grid.render(); + var duration=new Date()-start; + if (debug) messages.debug("setData+render took " + duration + " ms"); + if (contents_debug) { + // show full contents of first row app + for (k in this.slick_data[0]) messages.debug("slick_data[0]["+k+"]="+this.slick_data[0][k]); + } var self = this; // if we've already received the slice query, we have not been able to set -- 2.43.0