This commit is contained in:
Rob Garrison 2018-01-18 17:30:03 -06:00
parent 9d5c10e210
commit bf7339036c
13 changed files with 103 additions and 67 deletions

View File

@ -104,6 +104,17 @@ If you would like to contribute, please...
View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes). View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes).
#### <a name="v2.29.4">Version 2.29.4</a> (2018-01-18)
* Docs:
* Downgrade Bootstrap JS (v3.3.7) in demos.
* Filter:
* Add `filter_filterLabel` to support filter input ARIA labels. See [issue #1495](https://github.com/Mottie/tablesorter/issues/1495).
* Change filter row role from "row" to "search".
* Fix select2 issue. Closes [issue #1497](https://github.com/Mottie/tablesorter/issues/1497).
* Meta:
* Change date format in file comments to "YYYY-MM-DD".
#### <a name="v2.29.3">Version 2.29.3</a> (2018-01-10) #### <a name="v2.29.3">Version 2.29.3</a> (2018-01-10)
* Docs: * Docs:
@ -134,42 +145,3 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C
* Fix Bootstrap v2 demo; restored gyphs images. * Fix Bootstrap v2 demo; restored gyphs images.
* Meta: * Meta:
* Update authors. * Update authors.
#### <a name="v2.29.0">Version 2.29.0</a> (9/27/2017)
* Core:
* Include callback method for ["applyWidgets"](https://mottie.github.io/tablesorter/docs/index.html#applywidgets).
* Add ["widgetRemoveEnd" event](https://mottie.github.io/tablesorter/docs/index.html#widgetremoveend). Fixes [issue #1430](https://github.com/Mottie/tablesorter/issues/1430).
* Clarify warning message (widget enabled but code not loaded).
* Target header cells for data-column. Fixes [issue #1459](https://github.com/Mottie/tablesorter/issues/1459).
* ColumnSelector:
* Add [`classHasSpan` option](https://mottie.github.io/tablesorter/docs/example-widget-column-selector.html#column-selector-class-has-span).
* Fix compatibility with grouping widget.
* Grouping:
* Fix compatibility with columnSelector widget.
* Output:
* Modify internal `process` function to allow outputting of data without adding it to the table.
* Resizable:
* Add resizableComplete event. Fixes [issue #1444](https://github.com/Mottie/tablesorter/issues/1444).
* Scroller:
* Save position to fix `scroller_upAfterSort: false`; See [PR #1441](https://github.com/Mottie/tablesorter/pull/1441). This should fix [issue #1297](https://github.com/Mottie/tablesorter/issues/1297) - The current position is now saved on scroll so it can be restored after sorting; thanks [@lbodtke](https://github.com/lbodtke)!
* Update scroll position after fixing columns.
* Sort2Hash:
* Prevent sort2Hash from adding extraneous entries to browser history. Use `window.location.replace` to update the browser URL only, rather than `window.location.hash`, which modifies the browser history. See [PR #1447](https://github.com/Mottie/tablesorter/pull/1447); thanks [@alexweissman](https://github.com/alexweissman)!
* StickyHeaders:
* Only update class as needed. See [issue #1018](https://github.com/Mottie/tablesorter/issues/1018).
* Check horizontal scrolling. Fixes [issue #1455](https://github.com/Mottie/tablesorter/issues/1455).
* UITheme:
* Remove bootstrap v2 refs &amp; fix docs. See [issue #1432](https://github.com/Mottie/tablesorter/issues/1432).
* Docs:
* Miscellaneous fixes and updates.
* Add more info about zebra widget when the table is not visible. See [PR #1438](https://github.com/Mottie/tablesorter/pull/1438); thanks [@Federico-G](https://github.com/Federico-G)!
* Fix alignCharacter widget reference to css4.
* Update userfrosting link in the readme.
* Update to Bootstrap v4.0.0-beta.
* Fix colspan demo.
* Themes:
* Rename `icon-white` to `bootstrap-icon-white`. Fixes [issue #1432](https://github.com/Mottie/tablesorter/issues/1432).
* Meta:
* Update dependencies.
* Build: maintain ie8 support to fix [issue #1431](https://github.com/Mottie/tablesorter/issues/1431).

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 01-10-2018 (v2.29.3)*/ /*! tablesorter (FORK) - updated 2018-01-18 (v2.29.4)*/
/* 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) {
@ -10,7 +10,7 @@
} }
}(function(jQuery) { }(function(jQuery) {
/*! TableSorter (FORK) v2.29.3 *//* /*! TableSorter (FORK) v2.29.4 *//*
* Client-side table sorting with ease! * Client-side table sorting with ease!
* @requires jQuery v1.2.6+ * @requires jQuery v1.2.6+
* *
@ -34,7 +34,7 @@
'use strict'; 'use strict';
var ts = $.tablesorter = { var ts = $.tablesorter = {
version : '2.29.3', version : '2.29.4',
parsers : [], parsers : [],
widgets : [], widgets : [],
@ -3324,6 +3324,7 @@
filter_excludeFilter : {}, // filters to exclude, per column filter_excludeFilter : {}, // filters to exclude, per column
filter_external : '', // jQuery selector string ( or jQuery object ) of external filters filter_external : '', // jQuery selector string ( or jQuery object ) of external filters
filter_filteredRow : 'filtered', // class added to filtered rows; define in css with "display:none" to hide the filtered-out rows filter_filteredRow : 'filtered', // class added to filtered rows; define in css with "display:none" to hide the filtered-out rows
filter_filterLabel : 'Filter "{{label}}" column by...', // Aria-label added to filter input/select; see #1495
filter_formatter : null, // add custom filter elements to the filter row filter_formatter : null, // add custom filter elements to the filter row
filter_functions : null, // add custom filter functions using this option filter_functions : null, // add custom filter functions using this option
filter_hideEmpty : true, // hide filter row when table is empty filter_hideEmpty : true, // hide filter row when table is empty
@ -3980,7 +3981,7 @@
cellFilter = wo.filter_cellFilter, cellFilter = wo.filter_cellFilter,
columns = c.columns, columns = c.columns,
arry = $.isArray( cellFilter ), arry = $.isArray( cellFilter ),
buildFilter = '<tr role="row" class="' + tscss.filterRow + ' ' + c.cssIgnoreRow + '">'; buildFilter = '<tr role="search" class="' + tscss.filterRow + ' ' + c.cssIgnoreRow + '">';
for ( column = 0; column < columns; column++ ) { for ( column = 0; column < columns; column++ ) {
if ( c.$headerIndexed[ column ].length ) { if ( c.$headerIndexed[ column ].length ) {
// account for entire column set with colspan. See #1047 // account for entire column set with colspan. See #1047
@ -4049,7 +4050,22 @@
( typeof wo.filter_cssFilter[column] !== 'undefined' ? wo.filter_cssFilter[column] || '' : '' ) : ( typeof wo.filter_cssFilter[column] !== 'undefined' ? wo.filter_cssFilter[column] || '' : '' ) :
wo.filter_cssFilter ) || ''; wo.filter_cssFilter ) || '';
// copy data-column from table cell (it will include colspan) // copy data-column from table cell (it will include colspan)
buildFilter.addClass( tscss.filter + ' ' + name ).attr( 'data-column', $filter.attr( 'data-column' ) ); buildFilter.addClass( tscss.filter + ' ' + name );
name = wo.filter_filterLabel;
tmp = name.match(/{{([^}]+?)}}/g);
if (!tmp) {
tmp = ['{{label}}'];
}
$.each(tmp, function(indx, attr) {
var regex = new RegExp(attr, 'g'),
data = $header.attr('data-' + attr.replace(/{{|}}/g, '')),
text = typeof data === 'undefined' ? $header.text() : data;
name = name.replace( regex, $.trim( text ) );
});
buildFilter.attr({
'data-column': $filter.attr( 'data-column' ),
'aria-label': name
});
if ( disabled ) { if ( disabled ) {
buildFilter.attr( 'placeholder', '' ).addClass( tscss.filterDisabled )[0].disabled = true; buildFilter.attr( 'placeholder', '' ).addClass( tscss.filterDisabled )[0].disabled = true;
} }

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
} }
}(function(jQuery) { }(function(jQuery) {
/*! TableSorter (FORK) v2.29.3 *//* /*! TableSorter (FORK) v2.29.4 *//*
* Client-side table sorting with ease! * Client-side table sorting with ease!
* @requires jQuery v1.2.6+ * @requires jQuery v1.2.6+
* *
@ -32,7 +32,7 @@
'use strict'; 'use strict';
var ts = $.tablesorter = { var ts = $.tablesorter = {
version : '2.29.3', version : '2.29.4',
parsers : [], parsers : [],
widgets : [], widgets : [],

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 01-10-2018 (v2.29.3)*/ /*! tablesorter (FORK) - updated 2018-01-18 (v2.29.4)*/
/* 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) {
@ -444,6 +444,7 @@
filter_excludeFilter : {}, // filters to exclude, per column filter_excludeFilter : {}, // filters to exclude, per column
filter_external : '', // jQuery selector string ( or jQuery object ) of external filters filter_external : '', // jQuery selector string ( or jQuery object ) of external filters
filter_filteredRow : 'filtered', // class added to filtered rows; define in css with "display:none" to hide the filtered-out rows filter_filteredRow : 'filtered', // class added to filtered rows; define in css with "display:none" to hide the filtered-out rows
filter_filterLabel : 'Filter "{{label}}" column by...', // Aria-label added to filter input/select; see #1495
filter_formatter : null, // add custom filter elements to the filter row filter_formatter : null, // add custom filter elements to the filter row
filter_functions : null, // add custom filter functions using this option filter_functions : null, // add custom filter functions using this option
filter_hideEmpty : true, // hide filter row when table is empty filter_hideEmpty : true, // hide filter row when table is empty
@ -1100,7 +1101,7 @@
cellFilter = wo.filter_cellFilter, cellFilter = wo.filter_cellFilter,
columns = c.columns, columns = c.columns,
arry = $.isArray( cellFilter ), arry = $.isArray( cellFilter ),
buildFilter = '<tr role="row" class="' + tscss.filterRow + ' ' + c.cssIgnoreRow + '">'; buildFilter = '<tr role="search" class="' + tscss.filterRow + ' ' + c.cssIgnoreRow + '">';
for ( column = 0; column < columns; column++ ) { for ( column = 0; column < columns; column++ ) {
if ( c.$headerIndexed[ column ].length ) { if ( c.$headerIndexed[ column ].length ) {
// account for entire column set with colspan. See #1047 // account for entire column set with colspan. See #1047
@ -1169,7 +1170,22 @@
( typeof wo.filter_cssFilter[column] !== 'undefined' ? wo.filter_cssFilter[column] || '' : '' ) : ( typeof wo.filter_cssFilter[column] !== 'undefined' ? wo.filter_cssFilter[column] || '' : '' ) :
wo.filter_cssFilter ) || ''; wo.filter_cssFilter ) || '';
// copy data-column from table cell (it will include colspan) // copy data-column from table cell (it will include colspan)
buildFilter.addClass( tscss.filter + ' ' + name ).attr( 'data-column', $filter.attr( 'data-column' ) ); buildFilter.addClass( tscss.filter + ' ' + name );
name = wo.filter_filterLabel;
tmp = name.match(/{{([^}]+?)}}/g);
if (!tmp) {
tmp = ['{{label}}'];
}
$.each(tmp, function(indx, attr) {
var regex = new RegExp(attr, 'g'),
data = $header.attr('data-' + attr.replace(/{{|}}/g, '')),
text = typeof data === 'undefined' ? $header.text() : data;
name = name.replace( regex, $.trim( text ) );
});
buildFilter.attr({
'data-column': $filter.attr( 'data-column' ),
'aria-label': name
});
if ( disabled ) { if ( disabled ) {
buildFilter.attr( 'placeholder', '' ).addClass( tscss.filterDisabled )[0].disabled = true; buildFilter.attr( 'placeholder', '' ).addClass( tscss.filterDisabled )[0].disabled = true;
} }

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! Widget: filter, select2 formatter function - updated 7/11/2016 (v2.26.6) */ /*! 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 l=!1,i=d.$table.find(".select2col"+c+" .select2").select2("val")||s.value||"";e.isArray(i)&&(l=!0,i=i.join("\0")),i=i.replace(/[-[\]{}()*+?.,/\\^$|#\s]/g,"\\$&"),l&&(i=i.split("\0")),t.isEmptyObject(o.find(".select2").data())||(o.val(e.isArray(i)&&i.length&&""!==i.join("")?"/("+u+(i||[]).join(b+"|"+u)+b+")/"+$:"").trigger("search").end().find(".select2").select2("val",i),d.widgetOptions.$sticky&&d.widgetOptions.$sticky.find(".select2col"+c+" .select2").select2("val",i))},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 i=!1,a=d.$table.find(".select2col"+c+" .select2").select2("val")||s.value||"";e.isArray(a)&&(i=!0,a=a.join("\0")),a=a.replace(/[-[\]{}()*+?.,/\\^$|#\s]/g,"\\$&"),i&&(a=a.split("\0")),t.isEmptyObject(l.find(".select2").data())||(o.val(e.isArray(a)&&a.length&&""!==a.join("")?"/("+u+(a||[]).join(b+"|"+u)+b+")/"+$:"").trigger("search"),l.find(".select2").select2("val",a),d.widgetOptions.$sticky&&d.widgetOptions.$sticky.find(".select2col"+c+" .select2").select2("val",a))},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);

View File

@ -4,7 +4,7 @@
*/ */
/*! tablesorter (FORK) - updated 01-10-2018 (v2.29.3)*/ /*! tablesorter (FORK) - updated 2018-01-18 (v2.29.4)*/
/* 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) {
@ -16,7 +16,7 @@
} }
}(function(jQuery) { }(function(jQuery) {
/*! TableSorter (FORK) v2.29.3 *//* /*! TableSorter (FORK) v2.29.4 *//*
* Client-side table sorting with ease! * Client-side table sorting with ease!
* @requires jQuery v1.2.6+ * @requires jQuery v1.2.6+
* *
@ -40,7 +40,7 @@
'use strict'; 'use strict';
var ts = $.tablesorter = { var ts = $.tablesorter = {
version : '2.29.3', version : '2.29.4',
parsers : [], parsers : [],
widgets : [], widgets : [],
@ -3330,6 +3330,7 @@
filter_excludeFilter : {}, // filters to exclude, per column filter_excludeFilter : {}, // filters to exclude, per column
filter_external : '', // jQuery selector string ( or jQuery object ) of external filters filter_external : '', // jQuery selector string ( or jQuery object ) of external filters
filter_filteredRow : 'filtered', // class added to filtered rows; define in css with "display:none" to hide the filtered-out rows filter_filteredRow : 'filtered', // class added to filtered rows; define in css with "display:none" to hide the filtered-out rows
filter_filterLabel : 'Filter "{{label}}" column by...', // Aria-label added to filter input/select; see #1495
filter_formatter : null, // add custom filter elements to the filter row filter_formatter : null, // add custom filter elements to the filter row
filter_functions : null, // add custom filter functions using this option filter_functions : null, // add custom filter functions using this option
filter_hideEmpty : true, // hide filter row when table is empty filter_hideEmpty : true, // hide filter row when table is empty
@ -3986,7 +3987,7 @@
cellFilter = wo.filter_cellFilter, cellFilter = wo.filter_cellFilter,
columns = c.columns, columns = c.columns,
arry = $.isArray( cellFilter ), arry = $.isArray( cellFilter ),
buildFilter = '<tr role="row" class="' + tscss.filterRow + ' ' + c.cssIgnoreRow + '">'; buildFilter = '<tr role="search" class="' + tscss.filterRow + ' ' + c.cssIgnoreRow + '">';
for ( column = 0; column < columns; column++ ) { for ( column = 0; column < columns; column++ ) {
if ( c.$headerIndexed[ column ].length ) { if ( c.$headerIndexed[ column ].length ) {
// account for entire column set with colspan. See #1047 // account for entire column set with colspan. See #1047
@ -4055,7 +4056,22 @@
( typeof wo.filter_cssFilter[column] !== 'undefined' ? wo.filter_cssFilter[column] || '' : '' ) : ( typeof wo.filter_cssFilter[column] !== 'undefined' ? wo.filter_cssFilter[column] || '' : '' ) :
wo.filter_cssFilter ) || ''; wo.filter_cssFilter ) || '';
// copy data-column from table cell (it will include colspan) // copy data-column from table cell (it will include colspan)
buildFilter.addClass( tscss.filter + ' ' + name ).attr( 'data-column', $filter.attr( 'data-column' ) ); buildFilter.addClass( tscss.filter + ' ' + name );
name = wo.filter_filterLabel;
tmp = name.match(/{{([^}]+?)}}/g);
if (!tmp) {
tmp = ['{{label}}'];
}
$.each(tmp, function(indx, attr) {
var regex = new RegExp(attr, 'g'),
data = $header.attr('data-' + attr.replace(/{{|}}/g, '')),
text = typeof data === 'undefined' ? $header.text() : data;
name = name.replace( regex, $.trim( text ) );
});
buildFilter.attr({
'data-column': $filter.attr( 'data-column' ),
'aria-label': name
});
if ( disabled ) { if ( disabled ) {
buildFilter.attr( 'placeholder', '' ).addClass( tscss.filterDisabled )[0].disabled = true; buildFilter.attr( 'placeholder', '' ).addClass( tscss.filterDisabled )[0].disabled = true;
} }

View File

@ -1,4 +1,4 @@
/*! TableSorter (FORK) v2.29.3 *//* /*! TableSorter (FORK) v2.29.4 *//*
* Client-side table sorting with ease! * Client-side table sorting with ease!
* @requires jQuery v1.2.6+ * @requires jQuery v1.2.6+
* *
@ -22,7 +22,7 @@
'use strict'; 'use strict';
var ts = $.tablesorter = { var ts = $.tablesorter = {
version : '2.29.3', version : '2.29.4',
parsers : [], parsers : [],
widgets : [], widgets : [],

View File

@ -4,7 +4,7 @@
*/ */
/*! tablesorter (FORK) - updated 01-10-2018 (v2.29.3)*/ /*! tablesorter (FORK) - updated 2018-01-18 (v2.29.4)*/
/* 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) {
@ -450,6 +450,7 @@
filter_excludeFilter : {}, // filters to exclude, per column filter_excludeFilter : {}, // filters to exclude, per column
filter_external : '', // jQuery selector string ( or jQuery object ) of external filters filter_external : '', // jQuery selector string ( or jQuery object ) of external filters
filter_filteredRow : 'filtered', // class added to filtered rows; define in css with "display:none" to hide the filtered-out rows filter_filteredRow : 'filtered', // class added to filtered rows; define in css with "display:none" to hide the filtered-out rows
filter_filterLabel : 'Filter "{{label}}" column by...', // Aria-label added to filter input/select; see #1495
filter_formatter : null, // add custom filter elements to the filter row filter_formatter : null, // add custom filter elements to the filter row
filter_functions : null, // add custom filter functions using this option filter_functions : null, // add custom filter functions using this option
filter_hideEmpty : true, // hide filter row when table is empty filter_hideEmpty : true, // hide filter row when table is empty
@ -1106,7 +1107,7 @@
cellFilter = wo.filter_cellFilter, cellFilter = wo.filter_cellFilter,
columns = c.columns, columns = c.columns,
arry = $.isArray( cellFilter ), arry = $.isArray( cellFilter ),
buildFilter = '<tr role="row" class="' + tscss.filterRow + ' ' + c.cssIgnoreRow + '">'; buildFilter = '<tr role="search" class="' + tscss.filterRow + ' ' + c.cssIgnoreRow + '">';
for ( column = 0; column < columns; column++ ) { for ( column = 0; column < columns; column++ ) {
if ( c.$headerIndexed[ column ].length ) { if ( c.$headerIndexed[ column ].length ) {
// account for entire column set with colspan. See #1047 // account for entire column set with colspan. See #1047
@ -1175,7 +1176,22 @@
( typeof wo.filter_cssFilter[column] !== 'undefined' ? wo.filter_cssFilter[column] || '' : '' ) : ( typeof wo.filter_cssFilter[column] !== 'undefined' ? wo.filter_cssFilter[column] || '' : '' ) :
wo.filter_cssFilter ) || ''; wo.filter_cssFilter ) || '';
// copy data-column from table cell (it will include colspan) // copy data-column from table cell (it will include colspan)
buildFilter.addClass( tscss.filter + ' ' + name ).attr( 'data-column', $filter.attr( 'data-column' ) ); buildFilter.addClass( tscss.filter + ' ' + name );
name = wo.filter_filterLabel;
tmp = name.match(/{{([^}]+?)}}/g);
if (!tmp) {
tmp = ['{{label}}'];
}
$.each(tmp, function(indx, attr) {
var regex = new RegExp(attr, 'g'),
data = $header.attr('data-' + attr.replace(/{{|}}/g, '')),
text = typeof data === 'undefined' ? $header.text() : data;
name = name.replace( regex, $.trim( text ) );
});
buildFilter.attr({
'data-column': $filter.attr( 'data-column' ),
'aria-label': name
});
if ( disabled ) { if ( disabled ) {
buildFilter.attr( 'placeholder', '' ).addClass( tscss.filterDisabled )[0].disabled = true; buildFilter.attr( 'placeholder', '' ).addClass( tscss.filterDisabled )[0].disabled = true;
} }

View File

@ -1,7 +1,7 @@
{ {
"name": "tablesorter", "name": "tablesorter",
"title": "tablesorter", "title": "tablesorter",
"version": "2.29.3", "version": "2.29.4",
"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.", "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": { "author": {
"name": "Christian Bach", "name": "Christian Bach",

View File

@ -1,7 +1,7 @@
{ {
"name": "tablesorter", "name": "tablesorter",
"title": "tablesorter", "title": "tablesorter",
"version": "2.29.3", "version": "2.29.4",
"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.", "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": { "author": {
"name": "Christian Bach", "name": "Christian Bach",