mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
v2.28.12
This commit is contained in:
parent
7385ed4bf1
commit
c77d7b2d6e
12
README.md
12
README.md
@ -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:
|
||||
|
File diff suppressed because one or more lines are too long
38
dist/js/jquery.tablesorter.combined.js
vendored
38
dist/js/jquery.tablesorter.combined.js
vendored
@ -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) {
|
||||
@ -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+
|
||||
*
|
||||
@ -34,7 +34,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.28.11',
|
||||
version : '2.28.12',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
@ -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]
|
||||
@ -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 );
|
||||
@ -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;
|
||||
@ -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
|
||||
@ -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 ) ) {
|
||||
|
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
4
dist/js/jquery.tablesorter.js
vendored
4
dist/js/jquery.tablesorter.js
vendored
@ -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+
|
||||
*
|
||||
@ -32,7 +32,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.28.11',
|
||||
version : '2.28.12',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
|
2
dist/js/jquery.tablesorter.min.js
vendored
2
dist/js/jquery.tablesorter.min.js
vendored
File diff suppressed because one or more lines are too long
34
dist/js/jquery.tablesorter.widgets.js
vendored
34
dist/js/jquery.tablesorter.widgets.js
vendored
@ -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) {
|
||||
@ -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]
|
||||
@ -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 );
|
||||
@ -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;
|
||||
@ -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
|
||||
@ -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 ) ) {
|
||||
|
4
dist/js/jquery.tablesorter.widgets.min.js
vendored
4
dist/js/jquery.tablesorter.widgets.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/parsers/parser-input-select.min.js
vendored
2
dist/js/parsers/parser-input-select.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/parsers/parser-roman.min.js
vendored
2
dist/js/parsers/parser-roman.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! Parser: roman - updated 6/28/MMXIV (v2.17.3) */
|
||||
!function(r){"use strict";var t=/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/i,e={I:1,V:5,X:10,L:50,C:100,D:500,M:1e3};r.tablesorter.addParser({id:"roman",is:function(){return!1},format:function(r){var n,i=r.toUpperCase().split(""),a=0;if(!r||!t.test(r))return r;for(;i.length;)a+=(n=e[i.shift()])*(n<e[i[0]]?-1:1);return a},type:"numeric"}),r.tablesorter.addParser({id:"roman-ignore",is:function(){return!1},format:function(n,i,a,o){var s,u,f=i.config,c=r.isArray(f.roman_ignore)?f.roman_ignore[o]:0,p=(isNaN(c)?r.trim(n.replace(c,"")):r.trim(n.substring(0,n.length-c))).match(/\b([MCDLXVI]+\b)/gi),m=0;if(!t.test(p))return n;for(p=(u=p[0]).toUpperCase().split("");p.length;)(s=e[p.shift()])&&(m+=s*(s<e[p[0]]?-1:1));return m?n.replace(u,m):n},type:"text"}),r.tablesorter.addParser({id:"roman-extract",is:function(){return!1},format:function(n){var i,a=r.grep(n.split(/\b/),function(r,e){return t.test(r)?r:""}).join("").match(/\b([MCDLXVI]+\b)/gi),o=0;if(!(a?t.test(a):0))return n;for(a=a[0].toUpperCase().split("");a.length;)(i=e[a.shift()])&&(o+=i*(i<e[a[0]]?-1:1));return o||n},type:"numeric"})}(jQuery);
|
||||
!function(r){"use strict";var t=/^M*(?:D?C{0,3}|C[MD])(?:L?X{0,3}|X[CL])(?:V?I{0,3}|I[XV])$/i,e=/\b([MCDLXVI]+\b)/gi,n={I:1,V:5,X:10,L:50,C:100,D:500,M:1e3};r.tablesorter.addParser({id:"roman",is:function(){return!1},format:function(r){var e,i=r.toUpperCase().split(""),a=0;if(!r||!t.test(r))return r;for(;i.length;)a+=(e=n[i.shift()])*(e<n[i[0]]?-1:1);return a},type:"numeric"}),r.tablesorter.addParser({id:"roman-ignore",is:function(){return!1},format:function(i,a,o,s){var u,f,c=a.config,p=r.isArray(c.roman_ignore)?c.roman_ignore[s]:0,m=(isNaN(p)?r.trim(i.replace(p,"")):r.trim(i.substring(0,i.length-p))).match(e),l=0;if(!t.test(m))return i;for(m=(f=m[0]).toUpperCase().split("");m.length;)(u=n[m.shift()])&&(l+=u*(u<n[m[0]]?-1:1));return l?i.replace(f,l):i},type:"text"}),r.tablesorter.addParser({id:"roman-extract",is:function(){return!1},format:function(i){var a,o=r.grep(i.split(/\b/),function(r,e){return t.test(r)?r:""}).join("").match(e),s=0;if(!(o?t.test(o):0))return i;for(o=o[0].toUpperCase().split("");o.length;)(a=n[o.shift()])&&(s+=a*(a<n[o[0]]?-1:1));return s||i},type:"numeric"})}(jQuery);
|
2
dist/js/widgets/widget-columnSelector.min.js
vendored
2
dist/js/widgets/widget-columnSelector.min.js
vendored
File diff suppressed because one or more lines are too long
@ -1,2 +1,2 @@
|
||||
/*! Widget: filter, select2 formatter function - updated 7/11/2016 (v2.26.6) */
|
||||
!function(e){"use strict";var t=e.tablesorter||{};t.filterFormatter=t.filterFormatter||{},t.filterFormatter.select2=function(l,c,i){var a,n,s=e.extend({cellText:"",match:!0,value:"",multiple:!0,width:"100%"},i),d=l.addClass("select2col"+c).closest("table")[0].config,r=d.widgetOptions,o=e('<input class="filter" type="hidden">').appendTo(l).bind("change"+d.namespace+"filter",function(){var e=v(this.value);d.$table.find(".select2col"+c+" .select2").select2("val",e),g()}),f=d.$headerIndexed[c],p=f.hasClass(r.filter_onlyAvail),u=s.match?"":"^",b=s.match?"":"$",$=r.filter_ignoreCase?"i":"",v=function(e){return e.replace(/^\/\(\^?/,"").replace(/\$\|\^/g,"|").replace(/\$?\)\/i?$/g,"").replace(/\\/g,"").split("|")},g=function(){var t=!1,l=d.$table.find(".select2col"+c+" .select2").select2("val")||s.value||"";e.isArray(l)&&(t=!0,l=l.join("\0")),l=l.replace(/[-[\]{}()*+?.,\/\\^$|#\s]/g,"\\$&"),t&&(l=l.split("\0")),o.val(e.isArray(l)&&l.length&&""!==l.join("")?"/("+u+(l||[]).join(b+"|"+u)+b+")/"+$:"").trigger("search").end().find(".select2").select2("val",l),d.widgetOptions.$sticky&&d.widgetOptions.$sticky.find(".select2col"+c+" .select2").select2("val",l)},h=function(){n=[],a=t.filter.getOptionSource(d.$table[0],c,p)||[],e.each(a,function(e,t){n.push({id:""+t.parsed,text:t.text})}),s.data=n};return f.toggleClass("filter-match",s.match),s.cellText&&l.prepend("<label>"+s.cellText+"</label>"),s.ajax&&!e.isEmptyObject(s.ajax)||s.data||(h(),d.$table.bind("filterEnd",function(){h(),d.$table.find(".select2col"+c).add(d.widgetOptions.$sticky&&d.widgetOptions.$sticky.find(".select2col"+c)).find(".select2").select2(s)})),e('<input class="select2 select2-'+c+'" type="hidden" />').val(s.value).appendTo(l).select2(s).bind("change",function(){g()}),d.$table.bind("filterFomatterUpdate",function(){var e=v(d.$table.data("lastSearch")[c]||"");(l=d.$table.find(".select2col"+c)).find(".select2").select2("val",e),g(),t.filter.formatterUpdated(l,c)}),d.$table.bind("stickyHeadersInit",function(){var t=d.widgetOptions.$sticky.find(".select2col"+c).empty();e('<input class="select2 select2-'+c+'" type="hidden">').val(s.value).appendTo(t).select2(s).bind("change",function(){d.$table.find(".select2col"+c).find(".select2").select2("val",d.widgetOptions.$sticky.find(".select2col"+c+" .select2").select2("val")),g()}),s.cellText&&t.prepend("<label>"+s.cellText+"</label>")}),d.$table.bind("filterReset",function(){d.$table.find(".select2col"+c).find(".select2").select2("val",s.value||""),setTimeout(function(){g()},0)}),g(),o}}(jQuery);
|
||||
!function(e){"use strict";var t=e.tablesorter||{};t.filterFormatter=t.filterFormatter||{},t.filterFormatter.select2=function(l,c,i){var a,n,s=e.extend({cellText:"",match:!0,value:"",multiple:!0,width:"100%"},i),d=l.addClass("select2col"+c).closest("table")[0].config,r=d.widgetOptions,o=e('<input class="filter" type="hidden">').appendTo(l).bind("change"+d.namespace+"filter",function(){var e=v(this.value);d.$table.find(".select2col"+c+" .select2").select2("val",e),g()}),f=d.$headerIndexed[c],p=f.hasClass(r.filter_onlyAvail),u=s.match?"":"^",b=s.match?"":"$",$=r.filter_ignoreCase?"i":"",v=function(e){return e.replace(/^\/\(\^?/,"").replace(/\$\|\^/g,"|").replace(/\$?\)\/i?$/g,"").replace(/\\/g,"").split("|")},g=function(){var t=!1,l=d.$table.find(".select2col"+c+" .select2").select2("val")||s.value||"";e.isArray(l)&&(t=!0,l=l.join("\0")),l=l.replace(/[-[\]{}()*+?.,/\\^$|#\s]/g,"\\$&"),t&&(l=l.split("\0")),o.val(e.isArray(l)&&l.length&&""!==l.join("")?"/("+u+(l||[]).join(b+"|"+u)+b+")/"+$:"").trigger("search").end().find(".select2").select2("val",l),d.widgetOptions.$sticky&&d.widgetOptions.$sticky.find(".select2col"+c+" .select2").select2("val",l)},h=function(){n=[],a=t.filter.getOptionSource(d.$table[0],c,p)||[],e.each(a,function(e,t){n.push({id:""+t.parsed,text:t.text})}),s.data=n};return f.toggleClass("filter-match",s.match),s.cellText&&l.prepend("<label>"+s.cellText+"</label>"),s.ajax&&!e.isEmptyObject(s.ajax)||s.data||(h(),d.$table.bind("filterEnd",function(){h(),d.$table.find(".select2col"+c).add(d.widgetOptions.$sticky&&d.widgetOptions.$sticky.find(".select2col"+c)).find(".select2").select2(s)})),e('<input class="select2 select2-'+c+'" type="hidden" />').val(s.value).appendTo(l).select2(s).bind("change",function(){g()}),d.$table.bind("filterFomatterUpdate",function(){var e=v(d.$table.data("lastSearch")[c]||"");(l=d.$table.find(".select2col"+c)).find(".select2").select2("val",e),g(),t.filter.formatterUpdated(l,c)}),d.$table.bind("stickyHeadersInit",function(){var t=d.widgetOptions.$sticky.find(".select2col"+c).empty();e('<input class="select2 select2-'+c+'" type="hidden">').val(s.value).appendTo(t).select2(s).bind("change",function(){d.$table.find(".select2col"+c).find(".select2").select2("val",d.widgetOptions.$sticky.find(".select2col"+c+" .select2").select2("val")),g()}),s.cellText&&t.prepend("<label>"+s.cellText+"</label>")}),d.$table.bind("filterReset",function(){d.$table.find(".select2col"+c).find(".select2").select2("val",s.value||""),setTimeout(function(){g()},0)}),g(),o}}(jQuery);
|
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
2
dist/js/widgets/widget-pager.min.js
vendored
2
dist/js/widgets/widget-pager.min.js
vendored
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||
*/
|
||||
/*! 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) {
|
||||
@ -16,7 +16,7 @@
|
||||
}
|
||||
}(function(jQuery) {
|
||||
|
||||
/*! TableSorter (FORK) v2.28.11 *//*
|
||||
/*! TableSorter (FORK) v2.28.12 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -40,7 +40,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.28.11',
|
||||
version : '2.28.12',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
@ -4079,7 +4079,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]
|
||||
@ -4474,13 +4474,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 );
|
||||
@ -4499,8 +4493,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;
|
||||
@ -4800,6 +4804,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
|
||||
@ -4957,6 +4965,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 ) ) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! TableSorter (FORK) v2.28.11 *//*
|
||||
/*! TableSorter (FORK) v2.28.12 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -22,7 +22,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.28.11',
|
||||
version : '2.28.12',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
|
@ -4,7 +4,7 @@
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||
*/
|
||||
/*! 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) {
|
||||
@ -1259,7 +1259,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]
|
||||
@ -1654,13 +1654,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 );
|
||||
@ -1679,8 +1673,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;
|
||||
@ -1980,6 +1984,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
|
||||
@ -2137,6 +2145,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 ) ) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tablesorter",
|
||||
"title": "tablesorter",
|
||||
"version": "2.28.11",
|
||||
"version": "2.28.12",
|
||||
"description": "tablesorter (FORK) is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.",
|
||||
"author": {
|
||||
"name": "Christian Bach",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tablesorter",
|
||||
"title": "tablesorter",
|
||||
"version": "2.28.11",
|
||||
"version": "2.28.12",
|
||||
"description": "tablesorter is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.\n\nThis forked version adds lots of new enhancements including: alphanumeric sorting, pager callback functons, multiple widgets providing column styling, ui theme application, sticky headers, column filters and resizer, as well as extended documentation with a lot more demos.",
|
||||
"author": {
|
||||
"name": "Christian Bach",
|
||||
|
Loading…
Reference in New Issue
Block a user