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
13
dist/js/jquery.tablesorter.combined.js
vendored
13
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 ) */
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||||
(function(factory) {
|
(function(factory) {
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
@ -4024,15 +4024,19 @@
|
|||||||
|
|
||||||
showRow = false;
|
showRow = false;
|
||||||
showParent = tsf.processRow( c, data, vars );
|
showParent = tsf.processRow( c, data, vars );
|
||||||
|
$row = rowData.$row;
|
||||||
|
|
||||||
// don't pass reference to val
|
// don't pass reference to val
|
||||||
val = showParent ? true : false;
|
val = showParent ? true : false;
|
||||||
childRow = rowData.$row.filter( ':gt( 0 )' );
|
childRow = rowData.$row.filter( ':gt( 0 )' );
|
||||||
if ( wo.filter_childRows && childRow.length ) {
|
if ( wo.filter_childRows && childRow.length ) {
|
||||||
|
if ( wo.filter_childByColumn ) {
|
||||||
if ( !wo.filter_childWithSibs ) {
|
if ( !wo.filter_childWithSibs ) {
|
||||||
// hide all child rows
|
// hide all child rows
|
||||||
childRow.addClass( wo.filter_filteredRow );
|
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
|
// cycle through each child row
|
||||||
for ( indx = 0; indx < childRow.length; indx++ ) {
|
for ( indx = 0; indx < childRow.length; indx++ ) {
|
||||||
data.$row = childRow.eq( indx );
|
data.$row = childRow.eq( indx );
|
||||||
@ -4051,11 +4055,6 @@
|
|||||||
} else {
|
} else {
|
||||||
showRow = val;
|
showRow = val;
|
||||||
}
|
}
|
||||||
$row = rowData.$row;
|
|
||||||
// if only showing resulting child row, only include parent
|
|
||||||
if ( !wo.filter_childWithSibs ) {
|
|
||||||
$row = $row.eq( 0 );
|
|
||||||
}
|
|
||||||
$row
|
$row
|
||||||
.toggleClass( wo.filter_filteredRow, !showRow )[0]
|
.toggleClass( wo.filter_filteredRow, !showRow )[0]
|
||||||
.display = showRow ? '' : 'none';
|
.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
13
dist/js/jquery.tablesorter.widgets.js
vendored
13
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 ) */
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||||
(function(factory) {
|
(function(factory) {
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
@ -1680,15 +1680,19 @@
|
|||||||
|
|
||||||
showRow = false;
|
showRow = false;
|
||||||
showParent = tsf.processRow( c, data, vars );
|
showParent = tsf.processRow( c, data, vars );
|
||||||
|
$row = rowData.$row;
|
||||||
|
|
||||||
// don't pass reference to val
|
// don't pass reference to val
|
||||||
val = showParent ? true : false;
|
val = showParent ? true : false;
|
||||||
childRow = rowData.$row.filter( ':gt( 0 )' );
|
childRow = rowData.$row.filter( ':gt( 0 )' );
|
||||||
if ( wo.filter_childRows && childRow.length ) {
|
if ( wo.filter_childRows && childRow.length ) {
|
||||||
|
if ( wo.filter_childByColumn ) {
|
||||||
if ( !wo.filter_childWithSibs ) {
|
if ( !wo.filter_childWithSibs ) {
|
||||||
// hide all child rows
|
// hide all child rows
|
||||||
childRow.addClass( wo.filter_filteredRow );
|
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
|
// cycle through each child row
|
||||||
for ( indx = 0; indx < childRow.length; indx++ ) {
|
for ( indx = 0; indx < childRow.length; indx++ ) {
|
||||||
data.$row = childRow.eq( indx );
|
data.$row = childRow.eq( indx );
|
||||||
@ -1707,11 +1711,6 @@
|
|||||||
} else {
|
} else {
|
||||||
showRow = val;
|
showRow = val;
|
||||||
}
|
}
|
||||||
$row = rowData.$row;
|
|
||||||
// if only showing resulting child row, only include parent
|
|
||||||
if ( !wo.filter_childWithSibs ) {
|
|
||||||
$row = $row.eq( 0 );
|
|
||||||
}
|
|
||||||
$row
|
$row
|
||||||
.toggleClass( wo.filter_filteredRow, !showRow )[0]
|
.toggleClass( wo.filter_filteredRow, !showRow )[0]
|
||||||
.display = showRow ? '' : 'none';
|
.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 ) */
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||||
(function(factory) {
|
(function(factory) {
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
@ -4030,15 +4030,19 @@
|
|||||||
|
|
||||||
showRow = false;
|
showRow = false;
|
||||||
showParent = tsf.processRow( c, data, vars );
|
showParent = tsf.processRow( c, data, vars );
|
||||||
|
$row = rowData.$row;
|
||||||
|
|
||||||
// don't pass reference to val
|
// don't pass reference to val
|
||||||
val = showParent ? true : false;
|
val = showParent ? true : false;
|
||||||
childRow = rowData.$row.filter( ':gt( 0 )' );
|
childRow = rowData.$row.filter( ':gt( 0 )' );
|
||||||
if ( wo.filter_childRows && childRow.length ) {
|
if ( wo.filter_childRows && childRow.length ) {
|
||||||
|
if ( wo.filter_childByColumn ) {
|
||||||
if ( !wo.filter_childWithSibs ) {
|
if ( !wo.filter_childWithSibs ) {
|
||||||
// hide all child rows
|
// hide all child rows
|
||||||
childRow.addClass( wo.filter_filteredRow );
|
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
|
// cycle through each child row
|
||||||
for ( indx = 0; indx < childRow.length; indx++ ) {
|
for ( indx = 0; indx < childRow.length; indx++ ) {
|
||||||
data.$row = childRow.eq( indx );
|
data.$row = childRow.eq( indx );
|
||||||
@ -4057,11 +4061,6 @@
|
|||||||
} else {
|
} else {
|
||||||
showRow = val;
|
showRow = val;
|
||||||
}
|
}
|
||||||
$row = rowData.$row;
|
|
||||||
// if only showing resulting child row, only include parent
|
|
||||||
if ( !wo.filter_childWithSibs ) {
|
|
||||||
$row = $row.eq( 0 );
|
|
||||||
}
|
|
||||||
$row
|
$row
|
||||||
.toggleClass( wo.filter_filteredRow, !showRow )[0]
|
.toggleClass( wo.filter_filteredRow, !showRow )[0]
|
||||||
.display = showRow ? '' : 'none';
|
.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 ) */
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||||
(function(factory) {
|
(function(factory) {
|
||||||
if (typeof define === 'function' && define.amd) {
|
if (typeof define === 'function' && define.amd) {
|
||||||
@ -1686,15 +1686,19 @@
|
|||||||
|
|
||||||
showRow = false;
|
showRow = false;
|
||||||
showParent = tsf.processRow( c, data, vars );
|
showParent = tsf.processRow( c, data, vars );
|
||||||
|
$row = rowData.$row;
|
||||||
|
|
||||||
// don't pass reference to val
|
// don't pass reference to val
|
||||||
val = showParent ? true : false;
|
val = showParent ? true : false;
|
||||||
childRow = rowData.$row.filter( ':gt( 0 )' );
|
childRow = rowData.$row.filter( ':gt( 0 )' );
|
||||||
if ( wo.filter_childRows && childRow.length ) {
|
if ( wo.filter_childRows && childRow.length ) {
|
||||||
|
if ( wo.filter_childByColumn ) {
|
||||||
if ( !wo.filter_childWithSibs ) {
|
if ( !wo.filter_childWithSibs ) {
|
||||||
// hide all child rows
|
// hide all child rows
|
||||||
childRow.addClass( wo.filter_filteredRow );
|
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
|
// cycle through each child row
|
||||||
for ( indx = 0; indx < childRow.length; indx++ ) {
|
for ( indx = 0; indx < childRow.length; indx++ ) {
|
||||||
data.$row = childRow.eq( indx );
|
data.$row = childRow.eq( indx );
|
||||||
@ -1713,11 +1717,6 @@
|
|||||||
} else {
|
} else {
|
||||||
showRow = val;
|
showRow = val;
|
||||||
}
|
}
|
||||||
$row = rowData.$row;
|
|
||||||
// if only showing resulting child row, only include parent
|
|
||||||
if ( !wo.filter_childWithSibs ) {
|
|
||||||
$row = $row.eq( 0 );
|
|
||||||
}
|
|
||||||
$row
|
$row
|
||||||
.toggleClass( wo.filter_filteredRow, !showRow )[0]
|
.toggleClass( wo.filter_filteredRow, !showRow )[0]
|
||||||
.display = showRow ? '' : 'none';
|
.display = showRow ? '' : 'none';
|
||||||
|
@ -1312,15 +1312,19 @@
|
|||||||
|
|
||||||
showRow = false;
|
showRow = false;
|
||||||
showParent = tsf.processRow( c, data, vars );
|
showParent = tsf.processRow( c, data, vars );
|
||||||
|
$row = rowData.$row;
|
||||||
|
|
||||||
// don't pass reference to val
|
// don't pass reference to val
|
||||||
val = showParent ? true : false;
|
val = showParent ? true : false;
|
||||||
childRow = rowData.$row.filter( ':gt( 0 )' );
|
childRow = rowData.$row.filter( ':gt( 0 )' );
|
||||||
if ( wo.filter_childRows && childRow.length ) {
|
if ( wo.filter_childRows && childRow.length ) {
|
||||||
|
if ( wo.filter_childByColumn ) {
|
||||||
if ( !wo.filter_childWithSibs ) {
|
if ( !wo.filter_childWithSibs ) {
|
||||||
// hide all child rows
|
// hide all child rows
|
||||||
childRow.addClass( wo.filter_filteredRow );
|
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
|
// cycle through each child row
|
||||||
for ( indx = 0; indx < childRow.length; indx++ ) {
|
for ( indx = 0; indx < childRow.length; indx++ ) {
|
||||||
data.$row = childRow.eq( indx );
|
data.$row = childRow.eq( indx );
|
||||||
@ -1339,11 +1343,6 @@
|
|||||||
} else {
|
} else {
|
||||||
showRow = val;
|
showRow = val;
|
||||||
}
|
}
|
||||||
$row = rowData.$row;
|
|
||||||
// if only showing resulting child row, only include parent
|
|
||||||
if ( !wo.filter_childWithSibs ) {
|
|
||||||
$row = $row.eq( 0 );
|
|
||||||
}
|
|
||||||
$row
|
$row
|
||||||
.toggleClass( wo.filter_filteredRow, !showRow )[0]
|
.toggleClass( wo.filter_filteredRow, !showRow )[0]
|
||||||
.display = showRow ? '' : 'none';
|
.display = showRow ? '' : 'none';
|
||||||
|
Loading…
Reference in New Issue
Block a user