mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-10-08 13:44:18 +00:00
Filter: use namespacing on reset. Fixes #1001
This commit is contained in:
parent
41fb194559
commit
3282dc52fc
12
dist/js/jquery.tablesorter.combined.js
vendored
12
dist/js/jquery.tablesorter.combined.js
vendored
@ -1,4 +1,4 @@
|
||||
/*! tablesorter (FORK) - updated 08-23-2015 (v2.23.2)*/
|
||||
/*! tablesorter (FORK) - updated 08-26-2015 (v2.23.2)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -2771,7 +2771,7 @@
|
||||
.split( ' ' ).join( c.namespace + 'filter ' );
|
||||
$table
|
||||
.removeClass( 'hasFilters' )
|
||||
// add .tsfilter namespace to all BUT search
|
||||
// add filter namespace to all BUT search
|
||||
.unbind( events.replace( ts.regex.spaces, ' ' ) )
|
||||
// remove the filter row even if refreshing, because the column might have been moved
|
||||
.find( '.' + tscss.filterRow ).remove();
|
||||
@ -2782,7 +2782,7 @@
|
||||
ts.processTbody( table, $tbody, false ); // restore tbody
|
||||
}
|
||||
if ( wo.filter_reset ) {
|
||||
$( document ).undelegate( wo.filter_reset, 'click.tsfilter' );
|
||||
$( document ).undelegate( wo.filter_reset, 'click' + c.namespace + 'filter' );
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -3152,8 +3152,8 @@
|
||||
} else if ( $( wo.filter_reset ).length ) {
|
||||
// reset is a jQuery selector, use event delegation
|
||||
$( document )
|
||||
.undelegate( wo.filter_reset, 'click.tsfilter' )
|
||||
.delegate( wo.filter_reset, 'click.tsfilter', function() {
|
||||
.undelegate( wo.filter_reset, 'click' + c.namespace + 'filter' )
|
||||
.delegate( wo.filter_reset, 'click' + c.namespace + 'filter', function() {
|
||||
// trigger a reset event, so other functions ( filter_formatter ) know when to reset
|
||||
c.$table.trigger( 'filterReset' );
|
||||
});
|
||||
@ -4315,7 +4315,7 @@
|
||||
}
|
||||
$column
|
||||
.val( setFilters[ i ] )
|
||||
.trigger( 'change.tsfilter' );
|
||||
.trigger( 'change' );
|
||||
} else {
|
||||
filters[i] = $column.val() || '';
|
||||
// don't change the first... it will move the cursor
|
||||
|
6
dist/js/jquery.tablesorter.combined.min.js
vendored
6
dist/js/jquery.tablesorter.combined.min.js
vendored
File diff suppressed because one or more lines are too long
12
dist/js/jquery.tablesorter.widgets.js
vendored
12
dist/js/jquery.tablesorter.widgets.js
vendored
@ -1,4 +1,4 @@
|
||||
/*! tablesorter (FORK) - updated 08-23-2015 (v2.23.2)*/
|
||||
/*! tablesorter (FORK) - updated 08-26-2015 (v2.23.2)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -429,7 +429,7 @@
|
||||
.split( ' ' ).join( c.namespace + 'filter ' );
|
||||
$table
|
||||
.removeClass( 'hasFilters' )
|
||||
// add .tsfilter namespace to all BUT search
|
||||
// add filter namespace to all BUT search
|
||||
.unbind( events.replace( ts.regex.spaces, ' ' ) )
|
||||
// remove the filter row even if refreshing, because the column might have been moved
|
||||
.find( '.' + tscss.filterRow ).remove();
|
||||
@ -440,7 +440,7 @@
|
||||
ts.processTbody( table, $tbody, false ); // restore tbody
|
||||
}
|
||||
if ( wo.filter_reset ) {
|
||||
$( document ).undelegate( wo.filter_reset, 'click.tsfilter' );
|
||||
$( document ).undelegate( wo.filter_reset, 'click' + c.namespace + 'filter' );
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -810,8 +810,8 @@
|
||||
} else if ( $( wo.filter_reset ).length ) {
|
||||
// reset is a jQuery selector, use event delegation
|
||||
$( document )
|
||||
.undelegate( wo.filter_reset, 'click.tsfilter' )
|
||||
.delegate( wo.filter_reset, 'click.tsfilter', function() {
|
||||
.undelegate( wo.filter_reset, 'click' + c.namespace + 'filter' )
|
||||
.delegate( wo.filter_reset, 'click' + c.namespace + 'filter', function() {
|
||||
// trigger a reset event, so other functions ( filter_formatter ) know when to reset
|
||||
c.$table.trigger( 'filterReset' );
|
||||
});
|
||||
@ -1973,7 +1973,7 @@
|
||||
}
|
||||
$column
|
||||
.val( setFilters[ i ] )
|
||||
.trigger( 'change.tsfilter' );
|
||||
.trigger( 'change' );
|
||||
} else {
|
||||
filters[i] = $column.val() || '';
|
||||
// don't change the first... it will move the cursor
|
||||
|
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 08-23-2015 (v2.23.2)*/
|
||||
/*! tablesorter (FORK) - updated 08-26-2015 (v2.23.2)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -2777,7 +2777,7 @@
|
||||
.split( ' ' ).join( c.namespace + 'filter ' );
|
||||
$table
|
||||
.removeClass( 'hasFilters' )
|
||||
// add .tsfilter namespace to all BUT search
|
||||
// add filter namespace to all BUT search
|
||||
.unbind( events.replace( ts.regex.spaces, ' ' ) )
|
||||
// remove the filter row even if refreshing, because the column might have been moved
|
||||
.find( '.' + tscss.filterRow ).remove();
|
||||
@ -2788,7 +2788,7 @@
|
||||
ts.processTbody( table, $tbody, false ); // restore tbody
|
||||
}
|
||||
if ( wo.filter_reset ) {
|
||||
$( document ).undelegate( wo.filter_reset, 'click.tsfilter' );
|
||||
$( document ).undelegate( wo.filter_reset, 'click' + c.namespace + 'filter' );
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -3158,8 +3158,8 @@
|
||||
} else if ( $( wo.filter_reset ).length ) {
|
||||
// reset is a jQuery selector, use event delegation
|
||||
$( document )
|
||||
.undelegate( wo.filter_reset, 'click.tsfilter' )
|
||||
.delegate( wo.filter_reset, 'click.tsfilter', function() {
|
||||
.undelegate( wo.filter_reset, 'click' + c.namespace + 'filter' )
|
||||
.delegate( wo.filter_reset, 'click' + c.namespace + 'filter', function() {
|
||||
// trigger a reset event, so other functions ( filter_formatter ) know when to reset
|
||||
c.$table.trigger( 'filterReset' );
|
||||
});
|
||||
@ -4321,7 +4321,7 @@
|
||||
}
|
||||
$column
|
||||
.val( setFilters[ i ] )
|
||||
.trigger( 'change.tsfilter' );
|
||||
.trigger( 'change' );
|
||||
} else {
|
||||
filters[i] = $column.val() || '';
|
||||
// don't change the first... it will move the cursor
|
||||
|
@ -4,7 +4,7 @@
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀▀██
|
||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||
*/
|
||||
/*! tablesorter (FORK) - updated 08-23-2015 (v2.23.2)*/
|
||||
/*! tablesorter (FORK) - updated 08-26-2015 (v2.23.2)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -435,7 +435,7 @@
|
||||
.split( ' ' ).join( c.namespace + 'filter ' );
|
||||
$table
|
||||
.removeClass( 'hasFilters' )
|
||||
// add .tsfilter namespace to all BUT search
|
||||
// add filter namespace to all BUT search
|
||||
.unbind( events.replace( ts.regex.spaces, ' ' ) )
|
||||
// remove the filter row even if refreshing, because the column might have been moved
|
||||
.find( '.' + tscss.filterRow ).remove();
|
||||
@ -446,7 +446,7 @@
|
||||
ts.processTbody( table, $tbody, false ); // restore tbody
|
||||
}
|
||||
if ( wo.filter_reset ) {
|
||||
$( document ).undelegate( wo.filter_reset, 'click.tsfilter' );
|
||||
$( document ).undelegate( wo.filter_reset, 'click' + c.namespace + 'filter' );
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -816,8 +816,8 @@
|
||||
} else if ( $( wo.filter_reset ).length ) {
|
||||
// reset is a jQuery selector, use event delegation
|
||||
$( document )
|
||||
.undelegate( wo.filter_reset, 'click.tsfilter' )
|
||||
.delegate( wo.filter_reset, 'click.tsfilter', function() {
|
||||
.undelegate( wo.filter_reset, 'click' + c.namespace + 'filter' )
|
||||
.delegate( wo.filter_reset, 'click' + c.namespace + 'filter', function() {
|
||||
// trigger a reset event, so other functions ( filter_formatter ) know when to reset
|
||||
c.$table.trigger( 'filterReset' );
|
||||
});
|
||||
@ -1979,7 +1979,7 @@
|
||||
}
|
||||
$column
|
||||
.val( setFilters[ i ] )
|
||||
.trigger( 'change.tsfilter' );
|
||||
.trigger( 'change' );
|
||||
} else {
|
||||
filters[i] = $column.val() || '';
|
||||
// don't change the first... it will move the cursor
|
||||
|
@ -61,7 +61,7 @@
|
||||
.split( ' ' ).join( c.namespace + 'filter ' );
|
||||
$table
|
||||
.removeClass( 'hasFilters' )
|
||||
// add .tsfilter namespace to all BUT search
|
||||
// add filter namespace to all BUT search
|
||||
.unbind( events.replace( ts.regex.spaces, ' ' ) )
|
||||
// remove the filter row even if refreshing, because the column might have been moved
|
||||
.find( '.' + tscss.filterRow ).remove();
|
||||
@ -72,7 +72,7 @@
|
||||
ts.processTbody( table, $tbody, false ); // restore tbody
|
||||
}
|
||||
if ( wo.filter_reset ) {
|
||||
$( document ).undelegate( wo.filter_reset, 'click.tsfilter' );
|
||||
$( document ).undelegate( wo.filter_reset, 'click' + c.namespace + 'filter' );
|
||||
}
|
||||
}
|
||||
});
|
||||
@ -442,8 +442,8 @@
|
||||
} else if ( $( wo.filter_reset ).length ) {
|
||||
// reset is a jQuery selector, use event delegation
|
||||
$( document )
|
||||
.undelegate( wo.filter_reset, 'click.tsfilter' )
|
||||
.delegate( wo.filter_reset, 'click.tsfilter', function() {
|
||||
.undelegate( wo.filter_reset, 'click' + c.namespace + 'filter' )
|
||||
.delegate( wo.filter_reset, 'click' + c.namespace + 'filter', function() {
|
||||
// trigger a reset event, so other functions ( filter_formatter ) know when to reset
|
||||
c.$table.trigger( 'filterReset' );
|
||||
});
|
||||
@ -1605,7 +1605,7 @@
|
||||
}
|
||||
$column
|
||||
.val( setFilters[ i ] )
|
||||
.trigger( 'change.tsfilter' );
|
||||
.trigger( 'change' );
|
||||
} else {
|
||||
filters[i] = $column.val() || '';
|
||||
// don't change the first... it will move the cursor
|
||||
|
Loading…
Reference in New Issue
Block a user