mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
filter now works properly across tbodies. Fixes #264
This commit is contained in:
parent
4f310ea3e6
commit
fd32150e0c
@ -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;
|
||||||
|
Loading…
Reference in New Issue
Block a user