mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Filter: restore triggered change namespace & prevent search before init. Fixes #1002
This commit is contained in:
parent
3282dc52fc
commit
7756fdf9a2
10
dist/js/jquery.tablesorter.combined.js
vendored
10
dist/js/jquery.tablesorter.combined.js
vendored
@ -1,4 +1,4 @@
|
|||||||
/*! tablesorter (FORK) - updated 08-26-2015 (v2.23.2)*/
|
/*! tablesorter (FORK) - updated 08-27-2015 (v2.23.2)*/
|
||||||
/* 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) {
|
||||||
@ -29,7 +29,6 @@
|
|||||||
* @contributor Rob Garrison - https://github.com/Mottie/tablesorter
|
* @contributor Rob Garrison - https://github.com/Mottie/tablesorter
|
||||||
*/
|
*/
|
||||||
/*jshint browser:true, jquery:true, unused:false, expr: true */
|
/*jshint browser:true, jquery:true, unused:false, expr: true */
|
||||||
/*global console:false */
|
|
||||||
;(function($){
|
;(function($){
|
||||||
'use strict';
|
'use strict';
|
||||||
$.extend({
|
$.extend({
|
||||||
@ -3468,8 +3467,8 @@
|
|||||||
// don't get cached data, in case data-column changes dynamically
|
// don't get cached data, in case data-column changes dynamically
|
||||||
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
||||||
// don't allow 'change' event to process if the input value is the same - fixes #685
|
// don't allow 'change' event to process if the input value is the same - fixes #685
|
||||||
if ( event.which === 13 || event.type === 'search' ||
|
if ( wo.filter_initialized && ( event.which === 13 || event.type === 'search' ||
|
||||||
event.type === 'change' && this.value !== c.lastSearch[column] ) {
|
event.type === 'change' && this.value !== c.lastSearch[column] ) ) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// init search with no delay
|
// init search with no delay
|
||||||
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
||||||
@ -4315,7 +4314,8 @@
|
|||||||
}
|
}
|
||||||
$column
|
$column
|
||||||
.val( setFilters[ i ] )
|
.val( setFilters[ i ] )
|
||||||
.trigger( 'change' );
|
// must include a namespace here; but not c.namespace + 'filter'?
|
||||||
|
.trigger( 'change' + c.namespace );
|
||||||
} else {
|
} else {
|
||||||
filters[i] = $column.val() || '';
|
filters[i] = $column.val() || '';
|
||||||
// don't change the first... it will move the cursor
|
// 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
1
dist/js/jquery.tablesorter.js
vendored
1
dist/js/jquery.tablesorter.js
vendored
@ -27,7 +27,6 @@
|
|||||||
* @contributor Rob Garrison - https://github.com/Mottie/tablesorter
|
* @contributor Rob Garrison - https://github.com/Mottie/tablesorter
|
||||||
*/
|
*/
|
||||||
/*jshint browser:true, jquery:true, unused:false, expr: true */
|
/*jshint browser:true, jquery:true, unused:false, expr: true */
|
||||||
/*global console:false */
|
|
||||||
;(function($){
|
;(function($){
|
||||||
'use strict';
|
'use strict';
|
||||||
$.extend({
|
$.extend({
|
||||||
|
9
dist/js/jquery.tablesorter.widgets.js
vendored
9
dist/js/jquery.tablesorter.widgets.js
vendored
@ -1,4 +1,4 @@
|
|||||||
/*! tablesorter (FORK) - updated 08-26-2015 (v2.23.2)*/
|
/*! tablesorter (FORK) - updated 08-27-2015 (v2.23.2)*/
|
||||||
/* 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) {
|
||||||
@ -1126,8 +1126,8 @@
|
|||||||
// don't get cached data, in case data-column changes dynamically
|
// don't get cached data, in case data-column changes dynamically
|
||||||
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
||||||
// don't allow 'change' event to process if the input value is the same - fixes #685
|
// don't allow 'change' event to process if the input value is the same - fixes #685
|
||||||
if ( event.which === 13 || event.type === 'search' ||
|
if ( wo.filter_initialized && ( event.which === 13 || event.type === 'search' ||
|
||||||
event.type === 'change' && this.value !== c.lastSearch[column] ) {
|
event.type === 'change' && this.value !== c.lastSearch[column] ) ) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// init search with no delay
|
// init search with no delay
|
||||||
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
||||||
@ -1973,7 +1973,8 @@
|
|||||||
}
|
}
|
||||||
$column
|
$column
|
||||||
.val( setFilters[ i ] )
|
.val( setFilters[ i ] )
|
||||||
.trigger( 'change' );
|
// must include a namespace here; but not c.namespace + 'filter'?
|
||||||
|
.trigger( 'change' + c.namespace );
|
||||||
} else {
|
} else {
|
||||||
filters[i] = $column.val() || '';
|
filters[i] = $column.val() || '';
|
||||||
// don't change the first... it will move the cursor
|
// 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-26-2015 (v2.23.2)*/
|
/*! tablesorter (FORK) - updated 08-27-2015 (v2.23.2)*/
|
||||||
/* 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) {
|
||||||
@ -35,7 +35,6 @@
|
|||||||
* @contributor Rob Garrison - https://github.com/Mottie/tablesorter
|
* @contributor Rob Garrison - https://github.com/Mottie/tablesorter
|
||||||
*/
|
*/
|
||||||
/*jshint browser:true, jquery:true, unused:false, expr: true */
|
/*jshint browser:true, jquery:true, unused:false, expr: true */
|
||||||
/*global console:false */
|
|
||||||
;(function($){
|
;(function($){
|
||||||
'use strict';
|
'use strict';
|
||||||
$.extend({
|
$.extend({
|
||||||
@ -3474,8 +3473,8 @@
|
|||||||
// don't get cached data, in case data-column changes dynamically
|
// don't get cached data, in case data-column changes dynamically
|
||||||
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
||||||
// don't allow 'change' event to process if the input value is the same - fixes #685
|
// don't allow 'change' event to process if the input value is the same - fixes #685
|
||||||
if ( event.which === 13 || event.type === 'search' ||
|
if ( wo.filter_initialized && ( event.which === 13 || event.type === 'search' ||
|
||||||
event.type === 'change' && this.value !== c.lastSearch[column] ) {
|
event.type === 'change' && this.value !== c.lastSearch[column] ) ) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// init search with no delay
|
// init search with no delay
|
||||||
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
||||||
@ -4321,7 +4320,8 @@
|
|||||||
}
|
}
|
||||||
$column
|
$column
|
||||||
.val( setFilters[ i ] )
|
.val( setFilters[ i ] )
|
||||||
.trigger( 'change' );
|
// must include a namespace here; but not c.namespace + 'filter'?
|
||||||
|
.trigger( 'change' + c.namespace );
|
||||||
} else {
|
} else {
|
||||||
filters[i] = $column.val() || '';
|
filters[i] = $column.val() || '';
|
||||||
// don't change the first... it will move the cursor
|
// don't change the first... it will move the cursor
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
* @contributor Rob Garrison - https://github.com/Mottie/tablesorter
|
* @contributor Rob Garrison - https://github.com/Mottie/tablesorter
|
||||||
*/
|
*/
|
||||||
/*jshint browser:true, jquery:true, unused:false, expr: true */
|
/*jshint browser:true, jquery:true, unused:false, expr: true */
|
||||||
/*global console:false */
|
|
||||||
;(function($){
|
;(function($){
|
||||||
'use strict';
|
'use strict';
|
||||||
$.extend({
|
$.extend({
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀▀██
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀▀██
|
||||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||||
*/
|
*/
|
||||||
/*! tablesorter (FORK) - updated 08-26-2015 (v2.23.2)*/
|
/*! tablesorter (FORK) - updated 08-27-2015 (v2.23.2)*/
|
||||||
/* 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) {
|
||||||
@ -1132,8 +1132,8 @@
|
|||||||
// don't get cached data, in case data-column changes dynamically
|
// don't get cached data, in case data-column changes dynamically
|
||||||
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
||||||
// don't allow 'change' event to process if the input value is the same - fixes #685
|
// don't allow 'change' event to process if the input value is the same - fixes #685
|
||||||
if ( event.which === 13 || event.type === 'search' ||
|
if ( wo.filter_initialized && ( event.which === 13 || event.type === 'search' ||
|
||||||
event.type === 'change' && this.value !== c.lastSearch[column] ) {
|
event.type === 'change' && this.value !== c.lastSearch[column] ) ) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// init search with no delay
|
// init search with no delay
|
||||||
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
||||||
@ -1979,7 +1979,8 @@
|
|||||||
}
|
}
|
||||||
$column
|
$column
|
||||||
.val( setFilters[ i ] )
|
.val( setFilters[ i ] )
|
||||||
.trigger( 'change' );
|
// must include a namespace here; but not c.namespace + 'filter'?
|
||||||
|
.trigger( 'change' + c.namespace );
|
||||||
} else {
|
} else {
|
||||||
filters[i] = $column.val() || '';
|
filters[i] = $column.val() || '';
|
||||||
// don't change the first... it will move the cursor
|
// don't change the first... it will move the cursor
|
||||||
|
@ -758,8 +758,8 @@
|
|||||||
// don't get cached data, in case data-column changes dynamically
|
// don't get cached data, in case data-column changes dynamically
|
||||||
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
|
||||||
// don't allow 'change' event to process if the input value is the same - fixes #685
|
// don't allow 'change' event to process if the input value is the same - fixes #685
|
||||||
if ( event.which === 13 || event.type === 'search' ||
|
if ( wo.filter_initialized && ( event.which === 13 || event.type === 'search' ||
|
||||||
event.type === 'change' && this.value !== c.lastSearch[column] ) {
|
event.type === 'change' && this.value !== c.lastSearch[column] ) ) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// init search with no delay
|
// init search with no delay
|
||||||
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
$( this ).attr( 'data-lastSearchTime', new Date().getTime() );
|
||||||
@ -1605,7 +1605,8 @@
|
|||||||
}
|
}
|
||||||
$column
|
$column
|
||||||
.val( setFilters[ i ] )
|
.val( setFilters[ i ] )
|
||||||
.trigger( 'change' );
|
// must include a namespace here; but not c.namespace + 'filter'?
|
||||||
|
.trigger( 'change' + c.namespace );
|
||||||
} else {
|
} else {
|
||||||
filters[i] = $column.val() || '';
|
filters[i] = $column.val() || '';
|
||||||
// don't change the first... it will move the cursor
|
// don't change the first... it will move the cursor
|
||||||
|
Loading…
Reference in New Issue
Block a user