Skip to content

Commit

Permalink
v2.28.12
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed May 26, 2017
1 parent 7385ed4 commit c77d7b2
Show file tree
Hide file tree
Showing 19 changed files with 126 additions and 66 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,18 @@ If you would like to contribute, please...

View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes).

#### <a name="v2.28.12">Version 2.28.12</a> (5/26/2017)

* ColumnSelector:
* Don't clear container on updateAll. Fixes [issue #1406](https://github.com/Mottie/tablesorter/issues/1406).
* Filter:
* Return `null` from `filter_selectSource` to prevent select updates; From discussion in IRC with [@alexweissman](https://github.com/alexweissman).
* Select searches now process filter types, then exactly match. Previously only exact matches were performed by default, filter types were ignored. This broke the filter + jQuery UI selectmenu demo.
* Docs/Meta:
* Fix linting issues.
* Update jQuery UI to v1.12.1.
* Update [filter selectmenu demo](https://mottie.github.io/tablesorter/docs/example-widget-filter-selectmenu.html).

#### <a name="v2.28.11">Version 2.28.11</a> (5/24/2017)

* Docs:
Expand Down
2 changes: 1 addition & 1 deletion dist/js/extras/jquery.tablesorter.pager.min.js

Large diffs are not rendered by default.

38 changes: 25 additions & 13 deletions dist/js/jquery.tablesorter.combined.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 05-24-2017 (v2.28.11)*/
/*! tablesorter (FORK) - updated 05-26-2017 (v2.28.12)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
Expand All @@ -10,7 +10,7 @@
}
}(function(jQuery) {

/*! TableSorter (FORK) v2.28.11 *//*
/*! TableSorter (FORK) v2.28.12 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
Expand All @@ -34,7 +34,7 @@
'use strict';
var ts = $.tablesorter = {

version : '2.28.11',
version : '2.28.12',

parsers : [],
widgets : [],
Expand Down Expand Up @@ -4073,7 +4073,7 @@
// change & input events must be ignored if liveSearch !== true
( eventType === 'change' || eventType === 'input' ) &&
// prevent search if liveSearch is a number
( liveSearch === true || liveSearch !== true && event.target.nodeName !== "INPUT" ) &&
( liveSearch === true || liveSearch !== true && event.target.nodeName !== 'INPUT' ) &&
// don't allow 'change' or 'input' event to process if the input value
// is the same - fixes #685
this.value !== c.lastSearch[column]
Expand Down Expand Up @@ -4468,13 +4468,7 @@
fxn = vars.functions[ columnIndex ];
filterMatched = null;
if ( fxn ) {
if ( fxn === true ) {
// default selector uses exact match unless 'filter-match' class is found
filterMatched = data.isMatch ?
// data.iExact may be a number
( '' + data.iExact ).search( data.iFilter ) >= 0 :
data.filter === data.exact;
} else if ( typeof fxn === 'function' ) {
if ( typeof fxn === 'function' ) {
// filter callback( exact cell content, parser normalized content,
// filter input value, column index, jQuery row object )
filterMatched = fxn( data.exact, data.cache, data.filter, columnIndex, data.$row, c, data );
Expand All @@ -4493,8 +4487,18 @@
result = filterMatched;
// Look for match, and add child row data for matching
} else {
txt = ( data.iExact + data.childRowText ).indexOf( tsf.parseFilter( c, data.iFilter, data ) );
result = ( ( !wo.filter_startsWith && txt >= 0 ) || ( wo.filter_startsWith && txt === 0 ) );
// check fxn (filter-select in header) after filter types are checked
// without this, the filter + jQuery UI selectmenu demo was breaking
if ( fxn === true ) {
// default selector uses exact match unless 'filter-match' class is found
result = data.isMatch ?
// data.iExact may be a number
( '' + data.iExact ).search( data.iFilter ) >= 0 :
data.filter === data.exact;
} else {
txt = ( data.iExact + data.childRowText ).indexOf( tsf.parseFilter( c, data.iFilter, data ) );
result = ( ( !wo.filter_startsWith && txt >= 0 ) || ( wo.filter_startsWith && txt === 0 ) );
}
}
} else {
result = filterMatched;
Expand Down Expand Up @@ -4794,6 +4798,10 @@
} else if ( $.type( source ) === 'object' && fxn ) {
// custom select source function for a SPECIFIC COLUMN
arry = fxn( table, column, onlyAvail );
// abort - updating the selects from an external method
if (arry === null) {
return null;
}
}
if ( arry === false ) {
// fall back to original method
Expand Down Expand Up @@ -4951,6 +4959,10 @@
// filter_selectSource or column data
if ( typeof arry === 'undefined' || arry === '' ) {
arry = tsf.getOptionSource( table, column, onlyAvail );
// abort, selects are updated by an external method
if (arry === null) {
return;
}
}

if ( $.isArray( arry ) ) {
Expand Down
4 changes: 2 additions & 2 deletions dist/js/jquery.tablesorter.combined.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/js/jquery.tablesorter.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
}
}(function(jQuery) {

/*! TableSorter (FORK) v2.28.11 *//*
/*! TableSorter (FORK) v2.28.12 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
Expand All @@ -32,7 +32,7 @@
'use strict';
var ts = $.tablesorter = {

version : '2.28.11',
version : '2.28.12',

parsers : [],
widgets : [],
Expand Down
2 changes: 1 addition & 1 deletion dist/js/jquery.tablesorter.min.js

Large diffs are not rendered by default.

34 changes: 23 additions & 11 deletions dist/js/jquery.tablesorter.widgets.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 05-24-2017 (v2.28.11)*/
/*! tablesorter (FORK) - updated 05-26-2017 (v2.28.12)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
Expand Down Expand Up @@ -1253,7 +1253,7 @@
// change & input events must be ignored if liveSearch !== true
( eventType === 'change' || eventType === 'input' ) &&
// prevent search if liveSearch is a number
( liveSearch === true || liveSearch !== true && event.target.nodeName !== "INPUT" ) &&
( liveSearch === true || liveSearch !== true && event.target.nodeName !== 'INPUT' ) &&
// don't allow 'change' or 'input' event to process if the input value
// is the same - fixes #685
this.value !== c.lastSearch[column]
Expand Down Expand Up @@ -1648,13 +1648,7 @@
fxn = vars.functions[ columnIndex ];
filterMatched = null;
if ( fxn ) {
if ( fxn === true ) {
// default selector uses exact match unless 'filter-match' class is found
filterMatched = data.isMatch ?
// data.iExact may be a number
( '' + data.iExact ).search( data.iFilter ) >= 0 :
data.filter === data.exact;
} else if ( typeof fxn === 'function' ) {
if ( typeof fxn === 'function' ) {
// filter callback( exact cell content, parser normalized content,
// filter input value, column index, jQuery row object )
filterMatched = fxn( data.exact, data.cache, data.filter, columnIndex, data.$row, c, data );
Expand All @@ -1673,8 +1667,18 @@
result = filterMatched;
// Look for match, and add child row data for matching
} else {
txt = ( data.iExact + data.childRowText ).indexOf( tsf.parseFilter( c, data.iFilter, data ) );
result = ( ( !wo.filter_startsWith && txt >= 0 ) || ( wo.filter_startsWith && txt === 0 ) );
// check fxn (filter-select in header) after filter types are checked
// without this, the filter + jQuery UI selectmenu demo was breaking
if ( fxn === true ) {
// default selector uses exact match unless 'filter-match' class is found
result = data.isMatch ?
// data.iExact may be a number
( '' + data.iExact ).search( data.iFilter ) >= 0 :
data.filter === data.exact;
} else {
txt = ( data.iExact + data.childRowText ).indexOf( tsf.parseFilter( c, data.iFilter, data ) );
result = ( ( !wo.filter_startsWith && txt >= 0 ) || ( wo.filter_startsWith && txt === 0 ) );
}
}
} else {
result = filterMatched;
Expand Down Expand Up @@ -1974,6 +1978,10 @@
} else if ( $.type( source ) === 'object' && fxn ) {
// custom select source function for a SPECIFIC COLUMN
arry = fxn( table, column, onlyAvail );
// abort - updating the selects from an external method
if (arry === null) {
return null;
}
}
if ( arry === false ) {
// fall back to original method
Expand Down Expand Up @@ -2131,6 +2139,10 @@
// filter_selectSource or column data
if ( typeof arry === 'undefined' || arry === '' ) {
arry = tsf.getOptionSource( table, column, onlyAvail );
// abort, selects are updated by an external method
if (arry === null) {
return;
}
}

if ( $.isArray( arry ) ) {
Expand Down
4 changes: 2 additions & 2 deletions dist/js/jquery.tablesorter.widgets.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/parsers/parser-input-select.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c77d7b2

Please sign in to comment.