X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plugins%2Fquerytable%2Fstatic%2Fjs%2Fquerytable.js;h=6fc65617ab210e44103fd5b43fd4bb35a144d801;hb=5e315adb266ab4a89e885f8c2eef2e3eb8301ae3;hp=57b260dc073c9f2ee1928d9b43629b9289b02a17;hpb=df596019496a6fb2ad0a8e2c32f1a2310101cf49;p=unfold.git diff --git a/plugins/querytable/static/js/querytable.js b/plugins/querytable/static/js/querytable.js index 57b260dc..6fc65617 100644 --- a/plugins/querytable/static/js/querytable.js +++ b/plugins/querytable/static/js/querytable.js @@ -65,7 +65,7 @@ on_show: function(e) { var self = e.data; - self.table.fnAdjustColumnSizing() + self.redraw_table(); }, // on_show /* GUI EVENTS */ @@ -396,35 +396,6 @@ return ret; }, - _querytable_draw_callback: function() { - /* - * Handle clicks on checkboxes: reassociate checkbox click every time - * the table is redrawn - */ - this.elts('querytable-checkbox').unbind('click').click(this, this._check_click); - - if (!this.table) - return; - - /* Remove pagination if we show only a few results */ - var wrapper = this.table; //.parent().parent().parent(); - var rowsPerPage = this.table.fnSettings()._iDisplayLength; - var rowsToShow = this.table.fnSettings().fnRecordsDisplay(); - var minRowsPerPage = this.table.fnSettings().aLengthMenu[0]; - - if ( rowsToShow <= rowsPerPage || rowsPerPage == -1 ) { - $('.querytable_paginate', wrapper).css('visibility', 'hidden'); - } else { - $('.querytable_paginate', wrapper).css('visibility', 'visible'); - } - - if ( rowsToShow <= minRowsPerPage ) { - $('.querytable_length', wrapper).css('visibility', 'hidden'); - } else { - $('.querytable_length', wrapper).css('visibility', 'visible'); - } - }, - _check_click: function(e) { e.stopPropagation();