filter_reset now bound using delegate to maintain jQuery v1.4.3 compatibility. See #327

This commit is contained in:
Mottie 2013-10-09 22:06:36 -05:00
parent 838b4552d5
commit 38cbd819d7

View File

@ -699,7 +699,7 @@ ts.addWidget({
// reset button/link // reset button/link
if (wo.filter_reset){ if (wo.filter_reset){
$(document).on('click.tsfilter', wo.filter_reset, function(){ $(document).delegate(wo.filter_reset, 'click.tsfilter', function(){
$t.trigger('filterReset'); $t.trigger('filterReset');
}); });
} }
@ -815,7 +815,7 @@ ts.addWidget({
$tb.children().removeClass(wo.filter_filteredRow).show(); $tb.children().removeClass(wo.filter_filteredRow).show();
ts.processTbody(table, $tb, false); // restore tbody ts.processTbody(table, $tb, false); // restore tbody
} }
if (wo.filterreset) { $(wo.filter_reset).unbind('click.tsfilter'); } if (wo.filterreset) { $(document).undelegate(wo.filter_reset, 'click.tsfilter'); }
} }
}); });
ts.getFilters = function(table) { ts.getFilters = function(table) {