mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Merge branch 'master' into gh-pages
This commit is contained in:
commit
1c3ea722dc
@ -108,7 +108,7 @@ module.exports = function( grunt ) {
|
|||||||
|
|
||||||
// minified banner template - updated ##/##/20## (v2.##.##)
|
// minified banner template - updated ##/##/20## (v2.##.##)
|
||||||
pkg.banner = '/*! <%= pkg.name %> (FORK) - updated ' +
|
pkg.banner = '/*! <%= pkg.name %> (FORK) - updated ' +
|
||||||
'<%= grunt.template.today("mm-dd-yyyy") %> (v<%= pkg.version %>)*/\n';
|
'<%= grunt.template.today("yyyy-mm-dd") %> (v<%= pkg.version %>)*/\n';
|
||||||
|
|
||||||
pkg.buildWidget = defaults.standardWidgetFileName;
|
pkg.buildWidget = defaults.standardWidgetFileName;
|
||||||
pkg.buildCombined = 'jquery.tablesorter.combined.js';
|
pkg.buildCombined = 'jquery.tablesorter.combined.js';
|
||||||
|
75
README.md
75
README.md
@ -104,13 +104,25 @@ 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:
|
||||||
* Update Bootstrap to v4-beta.3.
|
* Update Bootstrap to v4-beta.3.
|
||||||
* Add scroller widget incompatibilities section.
|
* Add scroller widget incompatibilities section.
|
||||||
* Add pager size all setting.
|
* Add pager size all setting.
|
||||||
|
* Parser:
|
||||||
|
* Network parsers now return a text value. Fixes [issue #1494](https://github.com/Mottie/tablesorter/issues/1494).
|
||||||
|
|
||||||
#### <a name="v2.29.1">Version 2.29.1</a> & <a name="v2.29.2">Version 2.29.2</a> (12/13/2017)
|
#### <a name="v2.29.1">Version 2.29.1</a> & <a name="v2.29.2">Version 2.29.2</a> (12/13/2017)
|
||||||
|
|
||||||
@ -133,64 +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 & 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).
|
|
||||||
|
|
||||||
#### <a name="v2.28.15">Version 2.28.15</a> (7/4/2017)
|
|
||||||
|
|
||||||
* Core:
|
|
||||||
* Use calculated index instead of DOM index. See [pull #1424](https://github.com/Mottie/tablesorter/pull/1424); thanks [@ced-b](https://github.com/ced-b)!
|
|
||||||
* Fix check count cell indexing.
|
|
||||||
* ColumnSelector:
|
|
||||||
* Remove colspan adjustments when widget removed.
|
|
||||||
* Include tbody colspan updates on removal.
|
|
||||||
* Filter:
|
|
||||||
* Add namespacing to filter-formatter listeners. Needed to prevent JS error when a "resetToLoadState" is triggered and the "filterFomatterUpdate" bindings are still firing.
|
|
||||||
* Fix namespacing of events.
|
|
||||||
* Sort2Hash:
|
|
||||||
* Prevent filter update if unchanged & compare (with) hash filter.
|
|
||||||
* Fix p's (reference to pager object).
|
|
||||||
* Docs
|
|
||||||
* CSS fixed to comply with editable_wrapContent : `<div>`. See [pull #1420](https://github.com/Mottie/tablesorter/pull/1420); thanks [@LaurentBarbareau](https://github.com/LaurentBarbareau)!
|
|
||||||
* Remove note on contenteditable wrapping. See [pull #1420](https://github.com/Mottie/tablesorter/pull/1420).
|
|
||||||
* Update pager widget options in demo code.
|
|
||||||
* Use src files in filter formatter demo for testing.
|
|
||||||
* Meta:
|
|
||||||
* Include `js` & `css` folders with bower installs.
|
|
||||||
|
26
dist/js/jquery.tablesorter.combined.js
vendored
26
dist/js/jquery.tablesorter.combined.js
vendored
@ -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;
|
||||||
}
|
}
|
||||||
|
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) {
|
}(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 : [],
|
||||||
|
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
22
dist/js/jquery.tablesorter.widgets.js
vendored
22
dist/js/jquery.tablesorter.widgets.js
vendored
@ -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;
|
||||||
}
|
}
|
||||||
|
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
@ -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);
|
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
@ -83,7 +83,7 @@ div.ui-slider .ui-slider-handle { width: 0.8em; height: 0.8em; }
|
|||||||
a.alert, a.permalink.alert { color: #a00; padding: 0; }
|
a.alert, a.permalink.alert { color: #a00; padding: 0; }
|
||||||
span.alert { padding: 1px 3px; }
|
span.alert { padding: 1px 3px; }
|
||||||
.hidden { display: none; }
|
.hidden { display: none; }
|
||||||
.fade { opacity: 0.5; }
|
.ts-fade { opacity: 0.5; } /* don't effect Bootstrap's fade class */
|
||||||
.results { color: red; }
|
.results { color: red; }
|
||||||
.clear { clear: both; }
|
.clear { clear: both; }
|
||||||
.good { color: #080; }
|
.good { color: #080; }
|
||||||
|
@ -83,6 +83,10 @@
|
|||||||
// class added to filtered rows (rows that are not showing); needed by pager plugin
|
// class added to filtered rows (rows that are not showing); needed by pager plugin
|
||||||
filter_filteredRow : 'filtered',
|
filter_filteredRow : 'filtered',
|
||||||
|
|
||||||
|
// ARIA-label added to filter input/select; {{label}} is replaced by the column header
|
||||||
|
// "data-label" attribute, if it exists, or it uses the column header text
|
||||||
|
filter_filterLabel : 'Filter "{{label}}" column by...',
|
||||||
|
|
||||||
// add custom filter elements to the filter row
|
// add custom filter elements to the filter row
|
||||||
// see the filter formatter demos for more specifics
|
// see the filter formatter demos for more specifics
|
||||||
filter_formatter : null,
|
filter_formatter : null,
|
||||||
@ -251,6 +255,7 @@ $(function(){
|
|||||||
<h3 id="notes"><a href="#">Notes</a></h3>
|
<h3 id="notes"><a href="#">Notes</a></h3>
|
||||||
<div>
|
<div>
|
||||||
<ul>
|
<ul>
|
||||||
|
<li>In <span class="version">v2.29.4</span>, <code>filter_filterLabel</code> option was added to include an ARIA-label to the filter inputs and selects.</li>
|
||||||
<li>In <span class="verison">v2.27.3</span>, <code>filter_liveSearch</code> will now accept an object containing zero-based column indexes or header class names.</li>
|
<li>In <span class="verison">v2.27.3</span>, <code>filter_liveSearch</code> will now accept an object containing zero-based column indexes or header class names.</li>
|
||||||
<li>In <span class="verison">v2.26.6</span>, the <a class="intlink" href="#filter-hidefilters"><code>hideFilters</code></a> setting will now accept a function to determine when to hide the filter row.</li>
|
<li>In <span class="verison">v2.26.6</span>, the <a class="intlink" href="#filter-hidefilters"><code>hideFilters</code></a> setting will now accept a function to determine when to hide the filter row.</li>
|
||||||
<li>In <span class="version">v2.25.6</span>, added <a class="intlink" href="#methods"><code>filterResetSaved</code></a> method to clear stored filter values.</li>
|
<li>In <span class="version">v2.25.6</span>, added <a class="intlink" href="#methods"><code>filterResetSaved</code></a> method to clear stored filter values.</li>
|
||||||
@ -466,6 +471,20 @@ $(function(){
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr id="filter-filter-label">
|
||||||
|
<td><a href="#" class="permalink">filter_filterLabel</a></td>
|
||||||
|
<td>'Filter "{{label}}" column by...'</td>
|
||||||
|
<td>
|
||||||
|
This option contains the ARIA-label value to be added to the filter input or select (<span class="version">v2.29.4</span>).
|
||||||
|
<div class="collapsible">
|
||||||
|
<p>
|
||||||
|
By default, a <code>{{label}}</code> is included in the setting to insert a column label. The content is obtained from the header cell's <code>data-label</code> attribute (do not include the <code>data-</code> prefix), if it exists, or the column header text. See the "First Name" column below for an example.
|
||||||
|
</p>
|
||||||
|
<span class="label label-info">Note</span> See the <a href="index.html#filter-filter-label">main page documentation for more important details</a>!
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr id="filter-formatter">
|
<tr id="filter-formatter">
|
||||||
<td><a href="#" class="permalink">filter_formatter</a></td>
|
<td><a href="#" class="permalink">filter_formatter</a></td>
|
||||||
<td>null</td>
|
<td>null</td>
|
||||||
@ -829,7 +848,7 @@ $.extend($.tablesorter.language, {
|
|||||||
<tr>
|
<tr>
|
||||||
<!-- you can also add a placeholder using script; $('.tablesorter th:eq(0)').data('placeholder', 'hello') -->
|
<!-- you can also add a placeholder using script; $('.tablesorter th:eq(0)').data('placeholder', 'hello') -->
|
||||||
<th data-placeholder="" class="filter-false">Rank</th>
|
<th data-placeholder="" class="filter-false">Rank</th>
|
||||||
<th data-placeholder="Try B*{space} or alex|br*|c" class="filter-match">First Name (<span></span> filter-match )</th>
|
<th data-placeholder="Try B*{space} or alex|br*|c" data-label="First Name" data-test="" class="filter-match">First Name (<span></span> filter-match )</th>
|
||||||
<th data-placeholder="Try <d">Last Name</th>
|
<th data-placeholder="Try <d">Last Name</th>
|
||||||
<th data-placeholder="Try >=33">Age</th>
|
<th data-placeholder="Try >=33">Age</th>
|
||||||
<th data-placeholder="Try <9.99">Total</th>
|
<th data-placeholder="Try <9.99">Total</th>
|
||||||
|
@ -417,7 +417,7 @@ table.tablesorter tbody tr.even.checked td {
|
|||||||
});
|
});
|
||||||
});</pre>
|
});</pre>
|
||||||
Modification of the <code>.htaccess</code> is no longer required
|
Modification of the <code>.htaccess</code> is no longer required
|
||||||
<div class="fade">
|
<div class="ts-fade">
|
||||||
<h4>.htaccess</h4>
|
<h4>.htaccess</h4>
|
||||||
The Content-disposition headers <em>may need to be set</em> in order to make downloads work properly in IE. So <code>.htaccess</code> can look like:
|
The Content-disposition headers <em>may need to be set</em> in order to make downloads work properly in IE. So <code>.htaccess</code> can look like:
|
||||||
<pre class="prettyprint lang-xml"><FilesMatch "\.(?i:csv|txt)$">
|
<pre class="prettyprint lang-xml"><FilesMatch "\.(?i:csv|txt)$">
|
||||||
@ -905,7 +905,7 @@ line,value1,value2,value3
|
|||||||
<span class="label warning">Note</span> The trailing comma is important!
|
<span class="label warning">Note</span> The trailing comma is important!
|
||||||
<hr>
|
<hr>
|
||||||
The information below is no longer relavant:
|
The information below is no longer relavant:
|
||||||
<div class="fade">
|
<div class="ts-fade">
|
||||||
With the default settings (utf-8 no BOM), Excel does not properly encode accented characters unless the csv file is imported. Depending on the characters used, there are various methods which will allow proper encoding, but no one method is ideal. So this option can be set to allow the user to try different encodings. Set it as follows:
|
With the default settings (utf-8 no BOM), Excel does not properly encode accented characters unless the csv file is imported. Depending on the characters used, there are various methods which will allow proper encoding, but no one method is ideal. So this option can be set to allow the user to try different encodings. Set it as follows:
|
||||||
<pre class="prettyprint lang-js">// output data type (with BOM or Windows-1252 is needed for excel)
|
<pre class="prettyprint lang-js">// output data type (with BOM or Windows-1252 is needed for excel)
|
||||||
// NO BOM : 'data:text/csv;charset=utf8,'
|
// NO BOM : 'data:text/csv;charset=utf8,'
|
||||||
|
@ -465,9 +465,9 @@
|
|||||||
<li><a href="example-widget-editable.html">Content editable widget</a> (v2.9; <span class="version updated">v2.28.7</span>).</li>
|
<li><a href="example-widget-editable.html">Content editable widget</a> (v2.9; <span class="version updated">v2.28.7</span>).</li>
|
||||||
<li><a href="example-widget-current-sort.html">Current Sort Widget</a> (<span class="version">v2.27.0</span>).</li>
|
<li><a href="example-widget-current-sort.html">Current Sort Widget</a> (<span class="version">v2.27.0</span>).</li>
|
||||||
<li><span class="label label-info">Beta</span> <a href="example-dragtable.html">Dragtable mod</a> - (jQuery UI widget for column reordering [<a class="external" href="http://stackoverflow.com/a/27770224/145346">ref</a>]; <span class="version">v2.24.0</span>).</li>
|
<li><span class="label label-info">Beta</span> <a href="example-dragtable.html">Dragtable mod</a> - (jQuery UI widget for column reordering [<a class="external" href="http://stackoverflow.com/a/27770224/145346">ref</a>]; <span class="version">v2.24.0</span>).</li>
|
||||||
<li><span class="results">†</span> Filter widget (<span class="version updated">v2.29.2</span>):
|
<li><span class="results">†</span> Filter widget (<span class="version updated">v2.29.4</span>):
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="example-widget-filter.html">basic</a> (v2.0.18; <span class="version updated">v2.26.6</span>).</li>
|
<li><a href="example-widget-filter.html">basic</a> (v2.0.18; <span class="version updated">v2.29.4</span>).</li>
|
||||||
<li><a href="example-widget-filter-any-match.html">external option (match any column)</a> (<span class="version">v2.13.3</span>; <span class="version updated">v2.27.5</span>).</li>
|
<li><a href="example-widget-filter-any-match.html">external option (match any column)</a> (<span class="version">v2.13.3</span>; <span class="version updated">v2.27.5</span>).</li>
|
||||||
<li><a href="example-widget-filter-external-inputs.html">external inputs</a> (<span class="version">v2.14</span>; <span class="version updated">v2.18.0</span>).</li>
|
<li><a href="example-widget-filter-external-inputs.html">external inputs</a> (<span class="version">v2.14</span>; <span class="version updated">v2.18.0</span>).</li>
|
||||||
<li><a href="example-widget-filter-custom.html">custom filter functions</a> (v2.3.6; <span class="version updated">v2.22.0</span>).</li>
|
<li><a href="example-widget-filter-custom.html">custom filter functions</a> (v2.3.6; <span class="version updated">v2.22.0</span>).</li>
|
||||||
@ -1976,6 +1976,11 @@ $(function(){
|
|||||||
// class added to filtered rows; needed by pager plugin
|
// class added to filtered rows; needed by pager plugin
|
||||||
filter_filteredRow: 'filtered',
|
filter_filteredRow: 'filtered',
|
||||||
|
|
||||||
|
// ARIA-label added to filter input/select; {{label}} is replaced by
|
||||||
|
// the column header "data-label" attribute, if it exists, or it uses the
|
||||||
|
// column header text
|
||||||
|
filter_filterLabel : 'Filter "{{label}}" column by...',
|
||||||
|
|
||||||
// add custom filter elements to the filter row
|
// add custom filter elements to the filter row
|
||||||
filter_formatter: null,
|
filter_formatter: null,
|
||||||
|
|
||||||
@ -2833,6 +2838,36 @@ filter_cellFilter : [ '', 'hidden', '', 'hidden' ]</pre>
|
|||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<tr id="widget-filter-filterlabel">
|
||||||
|
<td><a href="#" class="permalink">filter_filterLabel</a></td>
|
||||||
|
<td>String</td>
|
||||||
|
<td>'Filter "{{label}}" column by...'</td>
|
||||||
|
<td>
|
||||||
|
This option contains the ARIA-label value to be added to the filter input or select (<span class="version">v2.29.4</span>).
|
||||||
|
<div class="collapsible">
|
||||||
|
<p>
|
||||||
|
By default, a <code>{{label}}</code> is included in the setting to insert a column label. The content is obtained from the header cell's <code>data-label</code> attribute (do not include the <code>data-</code> prefix), if it exists, or the column header text. See the "First Name" column on the example page.
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
More complex labels may be included by adding multiple "data-attributes". For example, the following option:
|
||||||
|
<pre class="pretty-print lang-js">filter_filterLabel : 'Filter the {{column-name}}, the {{ordinal-number}} column{{label-extra}}{{default-filter}}'</pre>
|
||||||
|
with this header cell HTML
|
||||||
|
<pre class="pretty-print lang-html"><th data-column-name="last name" data-ordinal-number="second" data-default-filter=", using a fuzzy search" data-label-extra="">
|
||||||
|
Last
|
||||||
|
<th></pre>
|
||||||
|
would result in an ARIA-label of <code>'Filter the last name, the second column, using a fuzzy search'</code>
|
||||||
|
</p>
|
||||||
|
<span class="label label-info">Note:</span>
|
||||||
|
<ul>
|
||||||
|
<li>The <code>data-</code> prefix must not be added in the placeholders.</li>
|
||||||
|
<li>The empty <code>data-label-extra</code> attribute did add any content to the resulting label.</li>
|
||||||
|
<li>If an included data-attribute does not exist on the header, it will be replaced by the header text.</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
<td><a href="example-widget-filter.html#demo">Example</a></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr id="widget-filter-formatter">
|
<tr id="widget-filter-formatter">
|
||||||
<td><a href="#" class="permalink">filter_formatter</a></td>
|
<td><a href="#" class="permalink">filter_formatter</a></td>
|
||||||
<td>Object</td>
|
<td>Object</td>
|
||||||
|
10
docs/js/bootstrap.min.js
vendored
10
docs/js/bootstrap.min.js
vendored
File diff suppressed because one or more lines are too long
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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 : [],
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -70,7 +70,7 @@
|
|||||||
if (arry) {
|
if (arry) {
|
||||||
v = v.split('\u0000');
|
v = v.split('\u0000');
|
||||||
}
|
}
|
||||||
if (!ts.isEmptyObject($input.find('.select2').data())) {
|
if (!ts.isEmptyObject($cell.find('.select2').data())) {
|
||||||
$input
|
$input
|
||||||
// add regex, so we filter exact numbers
|
// add regex, so we filter exact numbers
|
||||||
.val(
|
.val(
|
||||||
@ -78,8 +78,8 @@
|
|||||||
'/(' + matchPrefix + (v || []).join(matchSuffix + '|' + matchPrefix) + matchSuffix + ')/' + flags :
|
'/(' + matchPrefix + (v || []).join(matchSuffix + '|' + matchPrefix) + matchSuffix + ')/' + flags :
|
||||||
''
|
''
|
||||||
)
|
)
|
||||||
.trigger('search').end()
|
.trigger('search');
|
||||||
.find('.select2').select2('val', v);
|
$cell.find('.select2').select2('val', v);
|
||||||
// update sticky header cell
|
// update sticky header cell
|
||||||
if (c.widgetOptions.$sticky) {
|
if (c.widgetOptions.$sticky) {
|
||||||
c.widgetOptions.$sticky.find('.select2col' + indx + ' .select2').select2('val', v);
|
c.widgetOptions.$sticky.find('.select2col' + indx + ' .select2').select2('val', v);
|
||||||
|
@ -40,6 +40,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
|
||||||
@ -696,7 +697,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
|
||||||
@ -765,7 +766,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;
|
||||||
}
|
}
|
||||||
|
@ -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",
|
||||||
|
@ -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",
|
||||||
|
Loading…
Reference in New Issue
Block a user