Filter: target last used filter issue. See #920

This commit is contained in:
Mottie 2015-05-31 10:45:50 -05:00
parent 261808d2ac
commit 18a97ed4d9
8 changed files with 26 additions and 26 deletions

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 05-29-2015 (v2.22.1)*/ /*! tablesorter (FORK) - updated 05-31-2015 (v2.22.1)*/
/* 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) {
@ -3368,7 +3368,7 @@ ts.filter = {
return $( b ).attr( 'data-lastSearchTime' ) - $( a ).attr( 'data-lastSearchTime' ); return $( b ).attr( 'data-lastSearchTime' ) - $( a ).attr( 'data-lastSearchTime' );
}); });
} }
return $(); return $input || $();
}, },
multipleColumns: function( c, $input ) { multipleColumns: function( c, $input ) {
// look for multiple columns '1-3,4-6,8' in data-column // look for multiple columns '1-3,4-6,8' in data-column
@ -4051,8 +4051,8 @@ ts.getFilters = function( table, getRaw, setFilters, skipFirst ) {
$column = ts.filter.getLatestSearch( $column ); $column = ts.filter.getLatestSearch( $column );
if ( $.isArray( setFilters ) ) { if ( $.isArray( setFilters ) ) {
// skip first ( latest input ) to maintain cursor position while typing // skip first ( latest input ) to maintain cursor position while typing
if ( skipFirst ) { if ( skipFirst && $column.length > 1 ) {
$column.slice( 1 ); $column = $column.slice( 1 );
} }
if ( i === c.columns ) { if ( i === c.columns ) {
// prevent data-column='all' from filling data-column='0,1' ( etc ) // prevent data-column='all' from filling data-column='0,1' ( etc )

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 05-29-2015 (v2.22.1)*/ /*! tablesorter (FORK) - updated 05-31-2015 (v2.22.1)*/
/* 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) {
@ -1193,7 +1193,7 @@ ts.filter = {
return $( b ).attr( 'data-lastSearchTime' ) - $( a ).attr( 'data-lastSearchTime' ); return $( b ).attr( 'data-lastSearchTime' ) - $( a ).attr( 'data-lastSearchTime' );
}); });
} }
return $(); return $input || $();
}, },
multipleColumns: function( c, $input ) { multipleColumns: function( c, $input ) {
// look for multiple columns '1-3,4-6,8' in data-column // look for multiple columns '1-3,4-6,8' in data-column
@ -1876,8 +1876,8 @@ ts.getFilters = function( table, getRaw, setFilters, skipFirst ) {
$column = ts.filter.getLatestSearch( $column ); $column = ts.filter.getLatestSearch( $column );
if ( $.isArray( setFilters ) ) { if ( $.isArray( setFilters ) ) {
// skip first ( latest input ) to maintain cursor position while typing // skip first ( latest input ) to maintain cursor position while typing
if ( skipFirst ) { if ( skipFirst && $column.length > 1 ) {
$column.slice( 1 ); $column = $column.slice( 1 );
} }
if ( i === c.columns ) { if ( i === c.columns ) {
// prevent data-column='all' from filling data-column='0,1' ( etc ) // prevent data-column='all' from filling data-column='0,1' ( etc )

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
*/ */
/*! tablesorter (FORK) - updated 05-29-2015 (v2.22.1)*/ /*! tablesorter (FORK) - updated 05-31-2015 (v2.22.1)*/
/* 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) {
@ -3374,7 +3374,7 @@ ts.filter = {
return $( b ).attr( 'data-lastSearchTime' ) - $( a ).attr( 'data-lastSearchTime' ); return $( b ).attr( 'data-lastSearchTime' ) - $( a ).attr( 'data-lastSearchTime' );
}); });
} }
return $(); return $input || $();
}, },
multipleColumns: function( c, $input ) { multipleColumns: function( c, $input ) {
// look for multiple columns '1-3,4-6,8' in data-column // look for multiple columns '1-3,4-6,8' in data-column
@ -4057,8 +4057,8 @@ ts.getFilters = function( table, getRaw, setFilters, skipFirst ) {
$column = ts.filter.getLatestSearch( $column ); $column = ts.filter.getLatestSearch( $column );
if ( $.isArray( setFilters ) ) { if ( $.isArray( setFilters ) ) {
// skip first ( latest input ) to maintain cursor position while typing // skip first ( latest input ) to maintain cursor position while typing
if ( skipFirst ) { if ( skipFirst && $column.length > 1 ) {
$column.slice( 1 ); $column = $column.slice( 1 );
} }
if ( i === c.columns ) { if ( i === c.columns ) {
// prevent data-column='all' from filling data-column='0,1' ( etc ) // prevent data-column='all' from filling data-column='0,1' ( etc )

View File

@ -4,7 +4,7 @@
*/ */
/*! tablesorter (FORK) - updated 05-29-2015 (v2.22.1)*/ /*! tablesorter (FORK) - updated 05-31-2015 (v2.22.1)*/
/* 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) {
@ -1199,7 +1199,7 @@ ts.filter = {
return $( b ).attr( 'data-lastSearchTime' ) - $( a ).attr( 'data-lastSearchTime' ); return $( b ).attr( 'data-lastSearchTime' ) - $( a ).attr( 'data-lastSearchTime' );
}); });
} }
return $(); return $input || $();
}, },
multipleColumns: function( c, $input ) { multipleColumns: function( c, $input ) {
// look for multiple columns '1-3,4-6,8' in data-column // look for multiple columns '1-3,4-6,8' in data-column
@ -1882,8 +1882,8 @@ ts.getFilters = function( table, getRaw, setFilters, skipFirst ) {
$column = ts.filter.getLatestSearch( $column ); $column = ts.filter.getLatestSearch( $column );
if ( $.isArray( setFilters ) ) { if ( $.isArray( setFilters ) ) {
// skip first ( latest input ) to maintain cursor position while typing // skip first ( latest input ) to maintain cursor position while typing
if ( skipFirst ) { if ( skipFirst && $column.length > 1 ) {
$column.slice( 1 ); $column = $column.slice( 1 );
} }
if ( i === c.columns ) { if ( i === c.columns ) {
// prevent data-column='all' from filling data-column='0,1' ( etc ) // prevent data-column='all' from filling data-column='0,1' ( etc )

View File

@ -826,7 +826,7 @@ ts.filter = {
return $( b ).attr( 'data-lastSearchTime' ) - $( a ).attr( 'data-lastSearchTime' ); return $( b ).attr( 'data-lastSearchTime' ) - $( a ).attr( 'data-lastSearchTime' );
}); });
} }
return $(); return $input || $();
}, },
multipleColumns: function( c, $input ) { multipleColumns: function( c, $input ) {
// look for multiple columns '1-3,4-6,8' in data-column // look for multiple columns '1-3,4-6,8' in data-column
@ -1509,8 +1509,8 @@ ts.getFilters = function( table, getRaw, setFilters, skipFirst ) {
$column = ts.filter.getLatestSearch( $column ); $column = ts.filter.getLatestSearch( $column );
if ( $.isArray( setFilters ) ) { if ( $.isArray( setFilters ) ) {
// skip first ( latest input ) to maintain cursor position while typing // skip first ( latest input ) to maintain cursor position while typing
if ( skipFirst ) { if ( skipFirst && $column.length > 1 ) {
$column.slice( 1 ); $column = $column.slice( 1 );
} }
if ( i === c.columns ) { if ( i === c.columns ) {
// prevent data-column='all' from filling data-column='0,1' ( etc ) // prevent data-column='all' from filling data-column='0,1' ( etc )