X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fquerytable%2Fstatic%2Fjs%2Fquerytable.js;h=f8e4e042ebea9bfdd19aa0695a3c41e18f5fc51e;hb=5b74db15927558eec1e12a534167c3c4e4675ce1;hp=772ff7e0b15464e4881a5187a6ecea2ec5f32a71;hpb=43ad3b84bb593c3263236c6b9c9f9939a6bdb95d;p=myslice.git diff --git a/plugins/querytable/static/js/querytable.js b/plugins/querytable/static/js/querytable.js index 772ff7e0..f8e4e042 100644 --- a/plugins/querytable/static/js/querytable.js +++ b/plugins/querytable/static/js/querytable.js @@ -8,6 +8,8 @@ var debug=false; 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