filter now works properly across tbodies. Fixes #264

This commit is contained in:
Mottie 2013-03-26 16:36:44 -05:00
parent 4f310ea3e6
commit fd32150e0c

View File

@ -304,7 +304,7 @@ $.tablesorter.addWidget({
wo = c.widgetOptions, wo = c.widgetOptions,
css = wo.filter_cssFilter || 'tablesorter-filter', css = wo.filter_cssFilter || 'tablesorter-filter',
$t = $(table).addClass('hasFilters'), $t = $(table).addClass('hasFilters'),
b = c.$tbodies, b = $t.find('tbody'),
cols = c.parsers.length, cols = c.parsers.length,
reg = { // regex used in filter "check" functions reg = { // regex used in filter "check" functions
"regex" : /^\/((?:\\\/|[^\/])+)\/([mig]{0,3})?$/, // regex to test for regex "regex" : /^\/((?:\\\/|[^\/])+)\/([mig]{0,3})?$/, // regex to test for regex
@ -356,6 +356,7 @@ $.tablesorter.addWidget({
if (c.debug) { time = new Date(); } if (c.debug) { time = new Date(); }
for (k = 0; k < b.length; k++ ){ for (k = 0; k < b.length; k++ ){
if (b.eq(k).hasClass(c.cssInfoBlock)) { continue; } // ignore info blocks, issue #264
$tb = $.tablesorter.processTbody(table, b.eq(k), true); $tb = $.tablesorter.processTbody(table, b.eq(k), true);
$tr = $tb.children('tr'); $tr = $tb.children('tr');
l = $tr.length; l = $tr.length;