mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Filter: ignore childWithSibs when childByColumn is false. See #1020
Also fixed data.childRowText by adding spaces between cell content
This commit is contained in:
parent
ecb2fa47c3
commit
e23288cee8
15
dist/js/jquery.tablesorter.combined.js
vendored
15
dist/js/jquery.tablesorter.combined.js
vendored
@ -1,4 +1,4 @@
|
||||
/*! tablesorter (FORK) - updated 09-23-2015 (v2.23.4)*/
|
||||
/*! tablesorter (FORK) - updated 09-24-2015 (v2.23.4)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -4015,7 +4015,7 @@
|
||||
// a match anywhere in the child row, then it will make the row visible
|
||||
// checked here so the option can be changed dynamically
|
||||
for ( indx = 0; indx < childRow.length; indx++ ) {
|
||||
txt += ' ' + childRow[indx].join( '' ) || '';
|
||||
txt += ' ' + childRow[indx].join( ' ' ) || '';
|
||||
}
|
||||
data.childRowText = wo.filter_childRows ?
|
||||
( wo.filter_ignoreCase ? txt.toLowerCase() : txt ) :
|
||||
@ -4024,15 +4024,19 @@
|
||||
|
||||
showRow = false;
|
||||
showParent = tsf.processRow( c, data, vars );
|
||||
$row = rowData.$row;
|
||||
|
||||
// don't pass reference to val
|
||||
val = showParent ? true : false;
|
||||
childRow = rowData.$row.filter( ':gt( 0 )' );
|
||||
if ( wo.filter_childRows && childRow.length ) {
|
||||
if ( wo.filter_childByColumn ) {
|
||||
if ( !wo.filter_childWithSibs ) {
|
||||
// hide all child rows
|
||||
childRow.addClass( wo.filter_filteredRow );
|
||||
// if only showing resulting child row, only include parent
|
||||
$row = $row.eq( 0 );
|
||||
}
|
||||
if ( wo.filter_childByColumn ) {
|
||||
// cycle through each child row
|
||||
for ( indx = 0; indx < childRow.length; indx++ ) {
|
||||
data.$row = childRow.eq( indx );
|
||||
@ -4051,11 +4055,6 @@
|
||||
} else {
|
||||
showRow = val;
|
||||
}
|
||||
$row = rowData.$row;
|
||||
// if only showing resulting child row, only include parent
|
||||
if ( !wo.filter_childWithSibs ) {
|
||||
$row = $row.eq( 0 );
|
||||
}
|
||||
$row
|
||||
.toggleClass( wo.filter_filteredRow, !showRow )[0]
|
||||
.display = showRow ? '' : 'none';
|
||||
|
4
dist/js/jquery.tablesorter.combined.min.js
vendored
4
dist/js/jquery.tablesorter.combined.min.js
vendored
File diff suppressed because one or more lines are too long
15
dist/js/jquery.tablesorter.widgets.js
vendored
15
dist/js/jquery.tablesorter.widgets.js
vendored
@ -1,4 +1,4 @@
|
||||
/*! tablesorter (FORK) - updated 09-23-2015 (v2.23.4)*/
|
||||
/*! tablesorter (FORK) - updated 09-24-2015 (v2.23.4)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -1671,7 +1671,7 @@
|
||||
// a match anywhere in the child row, then it will make the row visible
|
||||
// checked here so the option can be changed dynamically
|
||||
for ( indx = 0; indx < childRow.length; indx++ ) {
|
||||
txt += ' ' + childRow[indx].join( '' ) || '';
|
||||
txt += ' ' + childRow[indx].join( ' ' ) || '';
|
||||
}
|
||||
data.childRowText = wo.filter_childRows ?
|
||||
( wo.filter_ignoreCase ? txt.toLowerCase() : txt ) :
|
||||
@ -1680,15 +1680,19 @@
|
||||
|
||||
showRow = false;
|
||||
showParent = tsf.processRow( c, data, vars );
|
||||
$row = rowData.$row;
|
||||
|
||||
// don't pass reference to val
|
||||
val = showParent ? true : false;
|
||||
childRow = rowData.$row.filter( ':gt( 0 )' );
|
||||
if ( wo.filter_childRows && childRow.length ) {
|
||||
if ( wo.filter_childByColumn ) {
|
||||
if ( !wo.filter_childWithSibs ) {
|
||||
// hide all child rows
|
||||
childRow.addClass( wo.filter_filteredRow );
|
||||
// if only showing resulting child row, only include parent
|
||||
$row = $row.eq( 0 );
|
||||
}
|
||||
if ( wo.filter_childByColumn ) {
|
||||
// cycle through each child row
|
||||
for ( indx = 0; indx < childRow.length; indx++ ) {
|
||||
data.$row = childRow.eq( indx );
|
||||
@ -1707,11 +1711,6 @@
|
||||
} else {
|
||||
showRow = val;
|
||||
}
|
||||
$row = rowData.$row;
|
||||
// if only showing resulting child row, only include parent
|
||||
if ( !wo.filter_childWithSibs ) {
|
||||
$row = $row.eq( 0 );
|
||||
}
|
||||
$row
|
||||
.toggleClass( wo.filter_filteredRow, !showRow )[0]
|
||||
.display = showRow ? '' : 'none';
|
||||
|
6
dist/js/jquery.tablesorter.widgets.min.js
vendored
6
dist/js/jquery.tablesorter.widgets.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/widgets/widget-filter.min.js
vendored
2
dist/js/widgets/widget-filter.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀▀██
|
||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||
*/
|
||||
/*! tablesorter (FORK) - updated 09-23-2015 (v2.23.4)*/
|
||||
/*! tablesorter (FORK) - updated 09-24-2015 (v2.23.4)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -4021,7 +4021,7 @@
|
||||
// a match anywhere in the child row, then it will make the row visible
|
||||
// checked here so the option can be changed dynamically
|
||||
for ( indx = 0; indx < childRow.length; indx++ ) {
|
||||
txt += ' ' + childRow[indx].join( '' ) || '';
|
||||
txt += ' ' + childRow[indx].join( ' ' ) || '';
|
||||
}
|
||||
data.childRowText = wo.filter_childRows ?
|
||||
( wo.filter_ignoreCase ? txt.toLowerCase() : txt ) :
|
||||
@ -4030,15 +4030,19 @@
|
||||
|
||||
showRow = false;
|
||||
showParent = tsf.processRow( c, data, vars );
|
||||
$row = rowData.$row;
|
||||
|
||||
// don't pass reference to val
|
||||
val = showParent ? true : false;
|
||||
childRow = rowData.$row.filter( ':gt( 0 )' );
|
||||
if ( wo.filter_childRows && childRow.length ) {
|
||||
if ( wo.filter_childByColumn ) {
|
||||
if ( !wo.filter_childWithSibs ) {
|
||||
// hide all child rows
|
||||
childRow.addClass( wo.filter_filteredRow );
|
||||
// if only showing resulting child row, only include parent
|
||||
$row = $row.eq( 0 );
|
||||
}
|
||||
if ( wo.filter_childByColumn ) {
|
||||
// cycle through each child row
|
||||
for ( indx = 0; indx < childRow.length; indx++ ) {
|
||||
data.$row = childRow.eq( indx );
|
||||
@ -4057,11 +4061,6 @@
|
||||
} else {
|
||||
showRow = val;
|
||||
}
|
||||
$row = rowData.$row;
|
||||
// if only showing resulting child row, only include parent
|
||||
if ( !wo.filter_childWithSibs ) {
|
||||
$row = $row.eq( 0 );
|
||||
}
|
||||
$row
|
||||
.toggleClass( wo.filter_filteredRow, !showRow )[0]
|
||||
.display = showRow ? '' : 'none';
|
||||
|
@ -4,7 +4,7 @@
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀▀██
|
||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||
*/
|
||||
/*! tablesorter (FORK) - updated 09-23-2015 (v2.23.4)*/
|
||||
/*! tablesorter (FORK) - updated 09-24-2015 (v2.23.4)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -1677,7 +1677,7 @@
|
||||
// a match anywhere in the child row, then it will make the row visible
|
||||
// checked here so the option can be changed dynamically
|
||||
for ( indx = 0; indx < childRow.length; indx++ ) {
|
||||
txt += ' ' + childRow[indx].join( '' ) || '';
|
||||
txt += ' ' + childRow[indx].join( ' ' ) || '';
|
||||
}
|
||||
data.childRowText = wo.filter_childRows ?
|
||||
( wo.filter_ignoreCase ? txt.toLowerCase() : txt ) :
|
||||
@ -1686,15 +1686,19 @@
|
||||
|
||||
showRow = false;
|
||||
showParent = tsf.processRow( c, data, vars );
|
||||
$row = rowData.$row;
|
||||
|
||||
// don't pass reference to val
|
||||
val = showParent ? true : false;
|
||||
childRow = rowData.$row.filter( ':gt( 0 )' );
|
||||
if ( wo.filter_childRows && childRow.length ) {
|
||||
if ( wo.filter_childByColumn ) {
|
||||
if ( !wo.filter_childWithSibs ) {
|
||||
// hide all child rows
|
||||
childRow.addClass( wo.filter_filteredRow );
|
||||
// if only showing resulting child row, only include parent
|
||||
$row = $row.eq( 0 );
|
||||
}
|
||||
if ( wo.filter_childByColumn ) {
|
||||
// cycle through each child row
|
||||
for ( indx = 0; indx < childRow.length; indx++ ) {
|
||||
data.$row = childRow.eq( indx );
|
||||
@ -1713,11 +1717,6 @@
|
||||
} else {
|
||||
showRow = val;
|
||||
}
|
||||
$row = rowData.$row;
|
||||
// if only showing resulting child row, only include parent
|
||||
if ( !wo.filter_childWithSibs ) {
|
||||
$row = $row.eq( 0 );
|
||||
}
|
||||
$row
|
||||
.toggleClass( wo.filter_filteredRow, !showRow )[0]
|
||||
.display = showRow ? '' : 'none';
|
||||
|
@ -1303,7 +1303,7 @@
|
||||
// a match anywhere in the child row, then it will make the row visible
|
||||
// checked here so the option can be changed dynamically
|
||||
for ( indx = 0; indx < childRow.length; indx++ ) {
|
||||
txt += ' ' + childRow[indx].join( '' ) || '';
|
||||
txt += ' ' + childRow[indx].join( ' ' ) || '';
|
||||
}
|
||||
data.childRowText = wo.filter_childRows ?
|
||||
( wo.filter_ignoreCase ? txt.toLowerCase() : txt ) :
|
||||
@ -1312,15 +1312,19 @@
|
||||
|
||||
showRow = false;
|
||||
showParent = tsf.processRow( c, data, vars );
|
||||
$row = rowData.$row;
|
||||
|
||||
// don't pass reference to val
|
||||
val = showParent ? true : false;
|
||||
childRow = rowData.$row.filter( ':gt( 0 )' );
|
||||
if ( wo.filter_childRows && childRow.length ) {
|
||||
if ( wo.filter_childByColumn ) {
|
||||
if ( !wo.filter_childWithSibs ) {
|
||||
// hide all child rows
|
||||
childRow.addClass( wo.filter_filteredRow );
|
||||
// if only showing resulting child row, only include parent
|
||||
$row = $row.eq( 0 );
|
||||
}
|
||||
if ( wo.filter_childByColumn ) {
|
||||
// cycle through each child row
|
||||
for ( indx = 0; indx < childRow.length; indx++ ) {
|
||||
data.$row = childRow.eq( indx );
|
||||
@ -1339,11 +1343,6 @@
|
||||
} else {
|
||||
showRow = val;
|
||||
}
|
||||
$row = rowData.$row;
|
||||
// if only showing resulting child row, only include parent
|
||||
if ( !wo.filter_childWithSibs ) {
|
||||
$row = $row.eq( 0 );
|
||||
}
|
||||
$row
|
||||
.toggleClass( wo.filter_filteredRow, !showRow )[0]
|
||||
.display = showRow ? '' : 'none';
|
||||
|
Loading…
Reference in New Issue
Block a user