mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
Merge branch 'master' into gh-pages
This commit is contained in:
commit
caf82cd349
5
.eslintignore
Normal file
5
.eslintignore
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
_test*.js
|
||||||
|
*.min.js
|
||||||
|
*mod.js
|
||||||
|
*.metadata.js
|
||||||
|
semver.js
|
31
.eslintrc
Normal file
31
.eslintrc
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"env": {
|
||||||
|
"browser": true,
|
||||||
|
"jquery": true
|
||||||
|
},
|
||||||
|
"rules": {
|
||||||
|
"curly": 1,
|
||||||
|
"dot-location": [2, "property"],
|
||||||
|
"eqeqeq": 1,
|
||||||
|
"linebreak-style": [2, "unix"],
|
||||||
|
"no-else-return": 0,
|
||||||
|
"no-eval": 2,
|
||||||
|
"no-octal": 2,
|
||||||
|
"no-with": 2,
|
||||||
|
"radix": 2,
|
||||||
|
"brace-style": 0,
|
||||||
|
"camelcase": 0,
|
||||||
|
"indent": 0,
|
||||||
|
"no-array-constructor": 2,
|
||||||
|
"quotes": [2, "single", {
|
||||||
|
"allowTemplateLiterals": true,
|
||||||
|
"avoidEscape": true
|
||||||
|
}],
|
||||||
|
"spaced-comment": 0,
|
||||||
|
"space-before-blocks": 1,
|
||||||
|
"keyword-spacing": 1,
|
||||||
|
"arrow-spacing": 2,
|
||||||
|
"no-var": 0,
|
||||||
|
"no-unused-vars": 1
|
||||||
|
}
|
||||||
|
}
|
@ -4,8 +4,6 @@ module.exports = function( grunt ) {
|
|||||||
|
|
||||||
var pkg = grunt.file.readJSON( 'package.json' ),
|
var pkg = grunt.file.readJSON( 'package.json' ),
|
||||||
tasks,
|
tasks,
|
||||||
widgetFilePrefix,
|
|
||||||
widgetFileSuffix,
|
|
||||||
|
|
||||||
defaults = {
|
defaults = {
|
||||||
dependencies : {
|
dependencies : {
|
||||||
@ -428,7 +426,7 @@ module.exports = function( grunt ) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function escapeRegExp(str) {
|
function escapeRegExp(str) {
|
||||||
return str.replace(/[$()*+\-.\/?[\\\]^{|}]/g, "\\$&");
|
return str.replace(/[$()*+\-.\/?[\\\]^{|}]/g, '\\$&');
|
||||||
}
|
}
|
||||||
|
|
||||||
// update tablesorter.jquery.json file version numbers to match the package.json version
|
// update tablesorter.jquery.json file version numbers to match the package.json version
|
||||||
|
28
README.md
28
README.md
@ -104,6 +104,23 @@ 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.30.0">Version 2.30.0</a> (2018-03-18)
|
||||||
|
|
||||||
|
* Core:
|
||||||
|
* [Debug](https://mottie.github.io/tablesorter/docs/#debug) now allows you to debug components separately; set to `true` as usual, or set to `'core filter'` to only show the core and filter widget debug logs.
|
||||||
|
* Change pager `removeRows` check. Fixes issues [#1525](https://github.com/Mottie/tablesorter/issues/1525) & [#1466](https://github.com/Mottie/tablesorter/issues/1466).
|
||||||
|
* Filter:
|
||||||
|
* Make `onlyAvail` work with showProcessing. Fixes [issue #1518](https://github.com/Mottie/tablesorter/issues/1518).
|
||||||
|
* Escape quotes in select options. See [issue #1527](https://github.com/Mottie/tablesorter/issues/1527).
|
||||||
|
* Pager:
|
||||||
|
* Change pager `removeRows` check. Fixes issues [#1525](https://github.com/Mottie/tablesorter/issues/1525) & [#1466](https://github.com/Mottie/tablesorter/issues/1466).
|
||||||
|
* Global:
|
||||||
|
* Add editor eslint & fix issues. File versions were not updated for this change!
|
||||||
|
* Docs:
|
||||||
|
* Update Bootstrap v4.0.0.
|
||||||
|
* Adjust (accordion) link position.
|
||||||
|
* Fix scroller fixed column border alignment.
|
||||||
|
|
||||||
#### <a name="v2.29.6">Version 2.29.6</a> (2018-02-25)
|
#### <a name="v2.29.6">Version 2.29.6</a> (2018-02-25)
|
||||||
|
|
||||||
* Docs:
|
* Docs:
|
||||||
@ -129,14 +146,3 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C
|
|||||||
* Fix version numbering.
|
* Fix version numbering.
|
||||||
* Parser:
|
* Parser:
|
||||||
* Add radio parser. See [issue #1502](https://github.com/Mottie/tablesorter/issues/1502).
|
* Add radio parser. See [issue #1502](https://github.com/Mottie/tablesorter/issues/1502).
|
||||||
|
|
||||||
#### <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".
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*!
|
/*!
|
||||||
* tablesorter (FORK) pager plugin
|
* tablesorter (FORK) pager plugin
|
||||||
* updated 4/18/2017 (v2.28.8)
|
* updated 2018-03-18 (v2.30.0)
|
||||||
*/
|
*/
|
||||||
/*jshint browser:true, jquery:true, unused:false */
|
/*jshint browser:true, jquery:true, unused:false */
|
||||||
;(function($) {
|
;(function($) {
|
||||||
@ -52,7 +52,7 @@
|
|||||||
// ],
|
// ],
|
||||||
// [ "header1", "header2", ... "headerN" ] // optional
|
// [ "header1", "header2", ... "headerN" ] // optional
|
||||||
// ]
|
// ]
|
||||||
ajaxProcessing: function(ajax){ return [ 0, [], null ]; },
|
ajaxProcessing: function( /* ajax */ ) { return [ 0, [], null ]; },
|
||||||
|
|
||||||
// output default: '{page}/{totalPages}'
|
// output default: '{page}/{totalPages}'
|
||||||
// possible variables: {size}, {page}, {totalPages}, {filteredPages}, {startRow},
|
// possible variables: {size}, {page}, {totalPages}, {filteredPages}, {startRow},
|
||||||
@ -246,8 +246,8 @@
|
|||||||
pagerArrows( table, p );
|
pagerArrows( table, p );
|
||||||
fixHeight(table, p);
|
fixHeight(table, p);
|
||||||
if (p.initialized && completed !== false) {
|
if (p.initialized && completed !== false) {
|
||||||
if (c.debug) {
|
if (ts.debug(c, 'pager')) {
|
||||||
console.log('Pager: Triggering pagerComplete');
|
console.log('Pager >> Triggering pagerComplete');
|
||||||
}
|
}
|
||||||
c.$table.triggerHandler('pagerComplete', p);
|
c.$table.triggerHandler('pagerComplete', p);
|
||||||
// save pager info to storage
|
// save pager info to storage
|
||||||
@ -424,15 +424,13 @@
|
|||||||
c = table.config,
|
c = table.config,
|
||||||
$table = c.$table,
|
$table = c.$table,
|
||||||
tds = '',
|
tds = '',
|
||||||
result = p.ajaxProcessing(data, table, xhr) || [ 0, [] ],
|
result = p.ajaxProcessing(data, table, xhr) || [ 0, [] ];
|
||||||
hl = $table.find('thead th').length;
|
|
||||||
|
|
||||||
// Clean up any previous error.
|
// Clean up any previous error.
|
||||||
ts.showError( table );
|
ts.showError( table );
|
||||||
|
|
||||||
if ( exception ) {
|
if ( exception ) {
|
||||||
if (c.debug) {
|
if (ts.debug(c, 'pager')) {
|
||||||
console.error('Pager: >> Ajax Error', xhr, settings, exception);
|
console.error('Pager >> Ajax Error', xhr, settings, exception);
|
||||||
}
|
}
|
||||||
ts.showError( table, xhr, settings, exception );
|
ts.showError( table, xhr, settings, exception );
|
||||||
c.$tbodies.eq(0).children('tr').detach();
|
c.$tbodies.eq(0).children('tr').detach();
|
||||||
@ -529,8 +527,8 @@
|
|||||||
// apply widgets after table has rendered & after a delay to prevent
|
// apply widgets after table has rendered & after a delay to prevent
|
||||||
// multiple applyWidget blocking code from blocking this trigger
|
// multiple applyWidget blocking code from blocking this trigger
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if (c.debug) {
|
if (ts.debug(c, 'pager')) {
|
||||||
console.log('Pager: Triggering pagerChange');
|
console.log('Pager >> Triggering pagerChange');
|
||||||
}
|
}
|
||||||
$table.triggerHandler( 'pagerChange', p );
|
$table.triggerHandler( 'pagerChange', p );
|
||||||
ts.applyWidget( table );
|
ts.applyWidget( table );
|
||||||
@ -575,8 +573,8 @@
|
|||||||
p.oldAjaxSuccess(data);
|
p.oldAjaxSuccess(data);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (c.debug) {
|
if (ts.debug(c, 'pager')) {
|
||||||
console.log('Pager: Ajax initialized', p.ajaxObject);
|
console.log('Pager >> Ajax initialized', p.ajaxObject);
|
||||||
}
|
}
|
||||||
$.ajax(p.ajaxObject);
|
$.ajax(p.ajaxObject);
|
||||||
}
|
}
|
||||||
@ -620,8 +618,8 @@
|
|||||||
if ( typeof p.customAjaxUrl === 'function' ) {
|
if ( typeof p.customAjaxUrl === 'function' ) {
|
||||||
url = p.customAjaxUrl(table, url);
|
url = p.customAjaxUrl(table, url);
|
||||||
}
|
}
|
||||||
if (c.debug) {
|
if (ts.debug(c, 'pager')) {
|
||||||
console.log('Pager: Ajax url = ' + url);
|
console.log('Pager >> Ajax url = ' + url);
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
},
|
},
|
||||||
@ -630,13 +628,14 @@
|
|||||||
var $tb, index, count, added,
|
var $tb, index, count, added,
|
||||||
$t = $(table),
|
$t = $(table),
|
||||||
c = table.config,
|
c = table.config,
|
||||||
|
debug = ts.debug(c, 'pager'),
|
||||||
f = c.$table.hasClass('hasFilters'),
|
f = c.$table.hasClass('hasFilters'),
|
||||||
l = rows && rows.length || 0, // rows may be undefined
|
l = rows && rows.length || 0, // rows may be undefined
|
||||||
e = p.size === 'all' ? p.totalRows : p.size,
|
e = p.size === 'all' ? p.totalRows : p.size,
|
||||||
s = ( p.page * e );
|
s = ( p.page * e );
|
||||||
if ( l < 1 ) {
|
if ( l < 1 ) {
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.warn('Pager: >> No rows for pager to render');
|
console.warn('Pager >> No rows for pager to render');
|
||||||
}
|
}
|
||||||
// empty table, abort!
|
// empty table, abort!
|
||||||
return;
|
return;
|
||||||
@ -648,8 +647,8 @@
|
|||||||
p.cacheIndex = [];
|
p.cacheIndex = [];
|
||||||
p.isDisabled = false; // needed because sorting will change the page and re-enable the pager
|
p.isDisabled = false; // needed because sorting will change the page and re-enable the pager
|
||||||
if (p.initialized) {
|
if (p.initialized) {
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('Pager: Triggering pagerChange');
|
console.log('Pager >> Triggering pagerChange');
|
||||||
}
|
}
|
||||||
$t.triggerHandler( 'pagerChange', p );
|
$t.triggerHandler( 'pagerChange', p );
|
||||||
}
|
}
|
||||||
@ -678,8 +677,8 @@
|
|||||||
}
|
}
|
||||||
updatePageDisplay(table, p);
|
updatePageDisplay(table, p);
|
||||||
if (table.isUpdating) {
|
if (table.isUpdating) {
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('Pager: Triggering updateComplete');
|
console.log('Pager >> Triggering updateComplete');
|
||||||
}
|
}
|
||||||
$t.triggerHandler('updateComplete', [ table, true ]);
|
$t.triggerHandler('updateComplete', [ table, true ]);
|
||||||
}
|
}
|
||||||
@ -702,8 +701,8 @@
|
|||||||
renderTable(table, table.config.rowsCopy, p);
|
renderTable(table, table.config.rowsCopy, p);
|
||||||
p.isDisabled = true;
|
p.isDisabled = true;
|
||||||
ts.applyWidget( table );
|
ts.applyWidget( table );
|
||||||
if (table.config.debug) {
|
if (ts.debug(table.config, 'pager')) {
|
||||||
console.log('Pager: Disabled');
|
console.log('Pager >> Disabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// disable size selector
|
// disable size selector
|
||||||
@ -737,6 +736,7 @@
|
|||||||
if ( p.isDisabled ) { return; }
|
if ( p.isDisabled ) { return; }
|
||||||
var tmp,
|
var tmp,
|
||||||
c = table.config,
|
c = table.config,
|
||||||
|
debug = ts.debug(c, 'pager'),
|
||||||
$t = $(table),
|
$t = $(table),
|
||||||
l = p.last;
|
l = p.last;
|
||||||
if ( pageMoved !== false && p.initialized && ts.isEmptyObject(c.cache)) {
|
if ( pageMoved !== false && p.initialized && ts.isEmptyObject(c.cache)) {
|
||||||
@ -758,8 +758,8 @@
|
|||||||
// & ajax url option changes (dynamically add/remove/rename sort & filter parameters)
|
// & ajax url option changes (dynamically add/remove/rename sort & filter parameters)
|
||||||
(l.optAjaxUrl || '') === (p.ajaxUrl || '') &&
|
(l.optAjaxUrl || '') === (p.ajaxUrl || '') &&
|
||||||
l.sortList === (c.sortList || []).join(',') ) { return; }
|
l.sortList === (c.sortList || []).join(',') ) { return; }
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('Pager: Changing to page ' + p.page);
|
console.log('Pager >> Changing to page ' + p.page);
|
||||||
}
|
}
|
||||||
p.last = {
|
p.last = {
|
||||||
page : p.page,
|
page : p.page,
|
||||||
@ -776,9 +776,9 @@
|
|||||||
p.processAjaxOnInit = true;
|
p.processAjaxOnInit = true;
|
||||||
tmp = p.initialRows;
|
tmp = p.initialRows;
|
||||||
p.totalRows = typeof tmp.total !== 'undefined' ? tmp.total :
|
p.totalRows = typeof tmp.total !== 'undefined' ? tmp.total :
|
||||||
( c.debug ? console.error('Pager: no initial total page set!') || 0 : 0 );
|
( debug ? console.error('Pager >> No initial total page set!') || 0 : 0 );
|
||||||
p.filteredRows = typeof tmp.filtered !== 'undefined' ? tmp.filtered :
|
p.filteredRows = typeof tmp.filtered !== 'undefined' ? tmp.filtered :
|
||||||
( c.debug ? console.error('Pager: no initial filtered page set!') || 0 : 0 );
|
( debug ? console.error('Pager >> No initial filtered page set!') || 0 : 0 );
|
||||||
pagerInitialized( table, p );
|
pagerInitialized( table, p );
|
||||||
} else {
|
} else {
|
||||||
getAjax(table, p);
|
getAjax(table, p);
|
||||||
@ -788,14 +788,14 @@
|
|||||||
}
|
}
|
||||||
$.data(table, 'pagerLastPage', p.page);
|
$.data(table, 'pagerLastPage', p.page);
|
||||||
if (p.initialized && pageMoved !== false) {
|
if (p.initialized && pageMoved !== false) {
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('Pager: Triggering pageMoved');
|
console.log('Pager >> Triggering pageMoved');
|
||||||
}
|
}
|
||||||
$t.triggerHandler('pageMoved', p);
|
$t.triggerHandler('pageMoved', p);
|
||||||
ts.applyWidget( table );
|
ts.applyWidget( table );
|
||||||
if (table.isUpdating) {
|
if (table.isUpdating) {
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('Pager: Triggering updateComplete');
|
console.log('Pager >> Triggering updateComplete');
|
||||||
}
|
}
|
||||||
$t.triggerHandler('updateComplete', [ table, true ]);
|
$t.triggerHandler('updateComplete', [ table, true ]);
|
||||||
}
|
}
|
||||||
@ -868,8 +868,8 @@
|
|||||||
pagerInitialized = function(table, p) {
|
pagerInitialized = function(table, p) {
|
||||||
p.initialized = true;
|
p.initialized = true;
|
||||||
p.initializing = false;
|
p.initializing = false;
|
||||||
if (table.config.debug) {
|
if (ts.debug(table.config, 'pager')) {
|
||||||
console.log('Pager: Triggering pagerInitialized');
|
console.log('Pager >> Triggering pagerInitialized');
|
||||||
}
|
}
|
||||||
$(table).triggerHandler( 'pagerInitialized', p );
|
$(table).triggerHandler( 'pagerInitialized', p );
|
||||||
ts.applyWidget( table );
|
ts.applyWidget( table );
|
||||||
@ -936,16 +936,17 @@
|
|||||||
setPageSize(table, p.size, p);
|
setPageSize(table, p.size, p);
|
||||||
moveToPage(table, p);
|
moveToPage(table, p);
|
||||||
hideRowsSetup(table, p);
|
hideRowsSetup(table, p);
|
||||||
if (c.debug) {
|
if (ts.debug(c, 'pager')) {
|
||||||
console.log('Pager: Enabled');
|
console.log('Pager >> Enabled');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
init = function(table, settings) {
|
init = function(table, settings) {
|
||||||
var t, ctrls, fxn, size, $el,
|
var t, ctrls, fxn, $el,
|
||||||
c = table.config,
|
c = table.config,
|
||||||
wo = c.widgetOptions,
|
wo = c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'pager'),
|
||||||
p = c.pager = $.extend( true, {}, $.tablesorterPager.defaults, settings ),
|
p = c.pager = $.extend( true, {}, $.tablesorterPager.defaults, settings ),
|
||||||
$t = c.$table,
|
$t = c.$table,
|
||||||
namespace = c.namespace + 'pager',
|
namespace = c.namespace + 'pager',
|
||||||
@ -953,8 +954,8 @@
|
|||||||
pager = p.$container = $(p.container).addClass('tablesorter-pager').show();
|
pager = p.$container = $(p.container).addClass('tablesorter-pager').show();
|
||||||
// save a copy of the original settings
|
// save a copy of the original settings
|
||||||
p.settings = $.extend( true, {}, $.tablesorterPager.defaults, settings );
|
p.settings = $.extend( true, {}, $.tablesorterPager.defaults, settings );
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('Pager: Initializing');
|
console.log('Pager >> Initializing');
|
||||||
}
|
}
|
||||||
p.oldAjaxSuccess = p.oldAjaxSuccess || p.ajaxObject.success;
|
p.oldAjaxSuccess = p.oldAjaxSuccess || p.ajaxObject.success;
|
||||||
c.appender = $this.appender;
|
c.appender = $this.appender;
|
||||||
@ -1068,8 +1069,8 @@
|
|||||||
// clicked controls
|
// clicked controls
|
||||||
ctrls = [ p.cssFirst, p.cssPrev, p.cssNext, p.cssLast ];
|
ctrls = [ p.cssFirst, p.cssPrev, p.cssNext, p.cssLast ];
|
||||||
fxn = [ moveToFirstPage, moveToPrevPage, moveToNextPage, moveToLastPage ];
|
fxn = [ moveToFirstPage, moveToPrevPage, moveToNextPage, moveToLastPage ];
|
||||||
if (c.debug && !pager.length) {
|
if (debug && !pager.length) {
|
||||||
console.warn('Pager: >> Container not found');
|
console.warn('Pager >> "container" not found');
|
||||||
}
|
}
|
||||||
pager.find(ctrls.join(','))
|
pager.find(ctrls.join(','))
|
||||||
.attr('tabindex', 0)
|
.attr('tabindex', 0)
|
||||||
@ -1097,8 +1098,8 @@
|
|||||||
moveToPage(table, p, true);
|
moveToPage(table, p, true);
|
||||||
updatePageDisplay(table, p, false);
|
updatePageDisplay(table, p, false);
|
||||||
});
|
});
|
||||||
} else if (c.debug) {
|
} else if (debug) {
|
||||||
console.warn('Pager: >> Goto selector not found');
|
console.warn('Pager >> "goto" selector not found');
|
||||||
}
|
}
|
||||||
// page size selector
|
// page size selector
|
||||||
$el = pager.find(p.cssPageSize);
|
$el = pager.find(p.cssPageSize);
|
||||||
@ -1115,8 +1116,8 @@
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
} else if (c.debug) {
|
} else if (debug) {
|
||||||
console.warn('Pager: >> Size selector not found');
|
console.warn('Pager >> "size" selector not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
// clear initialized flag
|
// clear initialized flag
|
||||||
@ -1147,8 +1148,8 @@
|
|||||||
// update page size on init
|
// update page size on init
|
||||||
setPageSize(table, p.size, p);
|
setPageSize(table, p.size, p);
|
||||||
moveToPage(table, p);
|
moveToPage(table, p);
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('Pager: Triggering pagerInitialized');
|
console.log('Pager >> Triggering pagerInitialized');
|
||||||
}
|
}
|
||||||
c.$table.triggerHandler( 'pagerInitialized', p );
|
c.$table.triggerHandler( 'pagerInitialized', p );
|
||||||
if ( !( c.widgetOptions.filter_initialized && ts.hasWidget(table, 'filter') ) ) {
|
if ( !( c.widgetOptions.filter_initialized && ts.hasWidget(table, 'filter') ) ) {
|
||||||
@ -1187,8 +1188,7 @@
|
|||||||
|
|
||||||
// see #486
|
// see #486
|
||||||
ts.showError = function( table, xhr, settings, exception ) {
|
ts.showError = function( table, xhr, settings, exception ) {
|
||||||
var $row,
|
var $table = $( table ),
|
||||||
$table = $( table ),
|
|
||||||
c = $table[0].config,
|
c = $table[0].config,
|
||||||
wo = c && c.widgetOptions,
|
wo = c && c.widgetOptions,
|
||||||
errorRow = c.pager && c.pager.cssErrorRow ||
|
errorRow = c.pager && c.pager.cssErrorRow ||
|
||||||
@ -1243,7 +1243,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// allow message to include entire row HTML!
|
// allow message to include entire row HTML!
|
||||||
$row = ( /tr\>/.test(message) ? $(message) : $('<tr><td colspan="' + c.columns + '">' + message + '</td></tr>') )
|
$( /tr\>/.test(message) ? message : '<tr><td colspan="' + c.columns + '">' + message + '</td></tr>' )
|
||||||
.click( function() {
|
.click( function() {
|
||||||
$( this ).remove();
|
$( this ).remove();
|
||||||
})
|
})
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
/*jshint browser:true, jquery:true, unused:false */
|
/*jshint browser:true, jquery:true, unused:false */
|
||||||
/*global jQuery: false */
|
/*global jQuery: false */
|
||||||
;(function($) {
|
;(function($) {
|
||||||
"use strict";
|
'use strict';
|
||||||
|
|
||||||
$.tablesorter.addWidget({
|
$.tablesorter.addWidget({
|
||||||
id: 'reorder',
|
id: 'reorder',
|
||||||
@ -22,14 +22,13 @@ $.tablesorter.addWidget({
|
|||||||
init: function(table, thisWidget, c, wo) {
|
init: function(table, thisWidget, c, wo) {
|
||||||
var i, timer, $helper, $bar, clickOffset,
|
var i, timer, $helper, $bar, clickOffset,
|
||||||
lastIndx = -1,
|
lastIndx = -1,
|
||||||
ts = $.tablesorter,
|
|
||||||
endIndex = -1,
|
endIndex = -1,
|
||||||
startIndex = -1,
|
startIndex = -1,
|
||||||
t = wo.reorder_blocked.split(' '),
|
t = wo.reorder_blocked.split(' '),
|
||||||
noReorderLeft = t[0] || 'reorder-block-left',
|
noReorderLeft = t[0] || 'reorder-block-left',
|
||||||
noReorderLast = t[1] || 'reorder-block-end',
|
noReorderLast = t[1] || 'reorder-block-end',
|
||||||
lastOffset = c.$headers.not('.' + noReorderLeft).first(),
|
lastOffset = c.$headers.not('.' + noReorderLeft).first(),
|
||||||
offsets = c.$headers.map(function(i){
|
offsets = c.$headers.map(function() {
|
||||||
var s, $t = $(this);
|
var s, $t = $(this);
|
||||||
if ($t.hasClass(noReorderLeft)) {
|
if ($t.hasClass(noReorderLeft)) {
|
||||||
s = lastOffset;
|
s = lastOffset;
|
||||||
@ -95,7 +94,7 @@ $.tablesorter.addWidget({
|
|||||||
rows = c.$table.find('tr'),
|
rows = c.$table.find('tr'),
|
||||||
cols;
|
cols;
|
||||||
startIndex = -1; // stop mousemove updates
|
startIndex = -1; // stop mousemove updates
|
||||||
if ( s > -1 && endIndex > -1 && s != endIndex && s + 1 !== endIndex ) {
|
if ( s > -1 && endIndex > -1 && s !== endIndex && s + 1 !== endIndex ) {
|
||||||
adj = endIndex !== 0;
|
adj = endIndex !== 0;
|
||||||
if (c.debug) {
|
if (c.debug) {
|
||||||
console.log( 'Inserting column ' + s + (adj ? ' after' : ' before') + ' column ' + (endIndex - adj ? 1 : 0) );
|
console.log( 'Inserting column ' + s + (adj ? ' after' : ' before') + ' column ' + (endIndex - adj ? 1 : 0) );
|
||||||
|
File diff suppressed because one or more lines are too long
190
dist/js/jquery.tablesorter.combined.js
vendored
190
dist/js/jquery.tablesorter.combined.js
vendored
@ -1,4 +1,4 @@
|
|||||||
/*! tablesorter (FORK) - updated 2018-02-25 (v2.29.6)*/
|
/*! tablesorter (FORK) - updated 2018-03-18 (v2.30.0)*/
|
||||||
/* 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.6 *//*
|
/*! TableSorter (FORK) v2.30.0 *//*
|
||||||
* 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.6',
|
version : '2.30.0',
|
||||||
|
|
||||||
parsers : [],
|
parsers : [],
|
||||||
widgets : [],
|
widgets : [],
|
||||||
@ -228,7 +228,7 @@
|
|||||||
setup : function( table, c ) {
|
setup : function( table, c ) {
|
||||||
// if no thead or tbody, or tablesorter is already present, quit
|
// if no thead or tbody, or tablesorter is already present, quit
|
||||||
if ( !table || !table.tHead || table.tBodies.length === 0 || table.hasInitialized === true ) {
|
if ( !table || !table.tHead || table.tBodies.length === 0 || table.hasInitialized === true ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
if ( table.hasInitialized ) {
|
if ( table.hasInitialized ) {
|
||||||
console.warn( 'Stopping initialization. Tablesorter has already been initialized' );
|
console.warn( 'Stopping initialization. Tablesorter has already been initialized' );
|
||||||
} else {
|
} else {
|
||||||
@ -249,7 +249,7 @@
|
|||||||
table.config = c;
|
table.config = c;
|
||||||
// save the settings where they read
|
// save the settings where they read
|
||||||
$.data( table, 'tablesorter', c );
|
$.data( table, 'tablesorter', c );
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Initializing tablesorter v' + ts.version );
|
console[ console.group ? 'group' : 'log' ]( 'Initializing tablesorter v' + ts.version );
|
||||||
$.data( table, 'startoveralltimer', new Date() );
|
$.data( table, 'startoveralltimer', new Date() );
|
||||||
}
|
}
|
||||||
@ -355,9 +355,9 @@
|
|||||||
// initialized
|
// initialized
|
||||||
table.hasInitialized = true;
|
table.hasInitialized = true;
|
||||||
table.isProcessing = false;
|
table.isProcessing = false;
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'Overall initialization time:' + ts.benchmark( $.data( table, 'startoveralltimer' ) ) );
|
console.log( 'Overall initialization time:' + ts.benchmark( $.data( table, 'startoveralltimer' ) ) );
|
||||||
if ( c.debug && console.groupEnd ) { console.groupEnd(); }
|
if ( ts.debug(c, 'core') && console.groupEnd ) { console.groupEnd(); }
|
||||||
}
|
}
|
||||||
$table.triggerHandler( 'tablesorter-initialized', table );
|
$table.triggerHandler( 'tablesorter-initialized', table );
|
||||||
if ( typeof c.initialized === 'function' ) {
|
if ( typeof c.initialized === 'function' ) {
|
||||||
@ -554,7 +554,7 @@
|
|||||||
c.headerList = [];
|
c.headerList = [];
|
||||||
c.headerContent = [];
|
c.headerContent = [];
|
||||||
c.sortVars = [];
|
c.sortVars = [];
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
timer = new Date();
|
timer = new Date();
|
||||||
}
|
}
|
||||||
// children tr in tfoot - see issue #196 & #547
|
// children tr in tfoot - see issue #196 & #547
|
||||||
@ -649,7 +649,7 @@
|
|||||||
});
|
});
|
||||||
// enable/disable sorting
|
// enable/disable sorting
|
||||||
ts.updateHeader( c );
|
ts.updateHeader( c );
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'Built headers:' + ts.benchmark( timer ) );
|
console.log( 'Built headers:' + ts.benchmark( timer ) );
|
||||||
console.log( c.$headers );
|
console.log( c.$headers );
|
||||||
}
|
}
|
||||||
@ -672,14 +672,15 @@
|
|||||||
noParser, parser, extractor, time, tbody, len,
|
noParser, parser, extractor, time, tbody, len,
|
||||||
table = c.table,
|
table = c.table,
|
||||||
tbodyIndex = 0,
|
tbodyIndex = 0,
|
||||||
debug = {};
|
debug = ts.debug(c, 'core'),
|
||||||
|
debugOutput = {};
|
||||||
// update table bodies in case we start with an empty table
|
// update table bodies in case we start with an empty table
|
||||||
c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
|
c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
|
||||||
tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies;
|
tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies;
|
||||||
len = tbody.length;
|
len = tbody.length;
|
||||||
if ( len === 0 ) {
|
if ( len === 0 ) {
|
||||||
return c.debug ? console.warn( 'Warning: *Empty table!* Not building a parser cache' ) : '';
|
return debug ? console.warn( 'Warning: *Empty table!* Not building a parser cache' ) : '';
|
||||||
} else if ( c.debug ) {
|
} else if ( debug ) {
|
||||||
time = new Date();
|
time = new Date();
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Detecting parsers for each column' );
|
console[ console.group ? 'group' : 'log' ]( 'Detecting parsers for each column' );
|
||||||
}
|
}
|
||||||
@ -721,8 +722,8 @@
|
|||||||
if ( !parser ) {
|
if ( !parser ) {
|
||||||
parser = ts.detectParserForColumn( c, rows, -1, colIndex );
|
parser = ts.detectParserForColumn( c, rows, -1, colIndex );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
debug[ '(' + colIndex + ') ' + header.text() ] = {
|
debugOutput[ '(' + colIndex + ') ' + header.text() ] = {
|
||||||
parser : parser.id,
|
parser : parser.id,
|
||||||
extractor : extractor ? extractor.id : 'none',
|
extractor : extractor ? extractor.id : 'none',
|
||||||
string : c.strings[ colIndex ],
|
string : c.strings[ colIndex ],
|
||||||
@ -748,9 +749,9 @@
|
|||||||
}
|
}
|
||||||
tbodyIndex += ( list.parsers.length ) ? len : 1;
|
tbodyIndex += ( list.parsers.length ) ? len : 1;
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
if ( !ts.isEmptyObject( debug ) ) {
|
if ( !ts.isEmptyObject( debugOutput ) ) {
|
||||||
console[ console.table ? 'table' : 'log' ]( debug );
|
console[ console.table ? 'table' : 'log' ]( debugOutput );
|
||||||
} else {
|
} else {
|
||||||
console.warn( ' No parsers detected!' );
|
console.warn( ' No parsers detected!' );
|
||||||
}
|
}
|
||||||
@ -776,7 +777,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
getParserById : function( name ) {
|
getParserById : function( name ) {
|
||||||
/*jshint eqeqeq:false */
|
/*jshint eqeqeq:false */ // eslint-disable-next-line eqeqeq
|
||||||
if ( name == 'false' ) { return false; }
|
if ( name == 'false' ) { return false; }
|
||||||
var indx,
|
var indx,
|
||||||
len = ts.parsers.length;
|
len = ts.parsers.length;
|
||||||
@ -793,6 +794,7 @@
|
|||||||
indx = ts.parsers.length,
|
indx = ts.parsers.length,
|
||||||
node = false,
|
node = false,
|
||||||
nodeValue = '',
|
nodeValue = '',
|
||||||
|
debug = ts.debug(c, 'core'),
|
||||||
keepLooking = true;
|
keepLooking = true;
|
||||||
while ( nodeValue === '' && keepLooking ) {
|
while ( nodeValue === '' && keepLooking ) {
|
||||||
rowIndex++;
|
rowIndex++;
|
||||||
@ -803,7 +805,7 @@
|
|||||||
node = rows[ rowIndex ].cells[ cellIndex ];
|
node = rows[ rowIndex ].cells[ cellIndex ];
|
||||||
nodeValue = ts.getElementText( c, node, cellIndex );
|
nodeValue = ts.getElementText( c, node, cellIndex );
|
||||||
$node = $( node );
|
$node = $( node );
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Checking if value was empty on row ' + rowIndex + ', column: ' +
|
console.log( 'Checking if value was empty on row ' + rowIndex + ', column: ' +
|
||||||
cellIndex + ': "' + nodeValue + '"' );
|
cellIndex + ': "' + nodeValue + '"' );
|
||||||
}
|
}
|
||||||
@ -885,7 +887,8 @@
|
|||||||
cols, $cells, cell, cacheTime, totalRows, rowData, prevRowData,
|
cols, $cells, cell, cacheTime, totalRows, rowData, prevRowData,
|
||||||
colMax, span, cacheIndex, hasParser, max, len, index,
|
colMax, span, cacheIndex, hasParser, max, len, index,
|
||||||
table = c.table,
|
table = c.table,
|
||||||
parsers = c.parsers;
|
parsers = c.parsers,
|
||||||
|
debug = ts.debug(c, 'core');
|
||||||
// update tbody variable
|
// update tbody variable
|
||||||
c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
|
c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
|
||||||
$tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies,
|
$tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies,
|
||||||
@ -893,9 +896,9 @@
|
|||||||
c.totalRows = 0;
|
c.totalRows = 0;
|
||||||
// if no parsers found, return - it's an empty table.
|
// if no parsers found, return - it's an empty table.
|
||||||
if ( !parsers ) {
|
if ( !parsers ) {
|
||||||
return c.debug ? console.warn( 'Warning: *Empty table!* Not building a cache' ) : '';
|
return debug ? console.warn( 'Warning: *Empty table!* Not building a cache' ) : '';
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
cacheTime = new Date();
|
cacheTime = new Date();
|
||||||
}
|
}
|
||||||
// processing icon
|
// processing icon
|
||||||
@ -964,7 +967,7 @@
|
|||||||
cell = $row[ 0 ].cells[ colIndex ];
|
cell = $row[ 0 ].cells[ colIndex ];
|
||||||
if ( cell && cacheIndex < c.columns ) {
|
if ( cell && cacheIndex < c.columns ) {
|
||||||
hasParser = typeof parsers[ cacheIndex ] !== 'undefined';
|
hasParser = typeof parsers[ cacheIndex ] !== 'undefined';
|
||||||
if ( !hasParser && c.debug ) {
|
if ( !hasParser && debug ) {
|
||||||
console.warn( 'No parser found for row: ' + rowIndex + ', column: ' + colIndex +
|
console.warn( 'No parser found for row: ' + rowIndex + ', column: ' + colIndex +
|
||||||
'; cell containing: "' + $(cell).text() + '"; does it have a header?' );
|
'; cell containing: "' + $(cell).text() + '"; does it have a header?' );
|
||||||
}
|
}
|
||||||
@ -1012,7 +1015,7 @@
|
|||||||
if ( c.showProcessing ) {
|
if ( c.showProcessing ) {
|
||||||
ts.isProcessing( table ); // remove processing icon
|
ts.isProcessing( table ); // remove processing icon
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
len = Math.min( 5, c.cache[ 0 ].normalized.length );
|
len = Math.min( 5, c.cache[ 0 ].normalized.length );
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Building cache for ' + c.totalRows +
|
console[ console.group ? 'group' : 'log' ]( 'Building cache for ' + c.totalRows +
|
||||||
' rows (showing ' + len + ' rows in log) and ' + c.columns + ' columns' +
|
' rows (showing ' + len + ' rows in log) and ' + c.columns + ' columns' +
|
||||||
@ -1043,7 +1046,7 @@
|
|||||||
data = { raw : [], parsed: [], $cell: [] },
|
data = { raw : [], parsed: [], $cell: [] },
|
||||||
c = table.config;
|
c = table.config;
|
||||||
if ( ts.isEmptyObject( c ) ) {
|
if ( ts.isEmptyObject( c ) ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.warn( 'No cache found - aborting getColumnText function!' );
|
console.warn( 'No cache found - aborting getColumnText function!' );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1387,7 +1390,7 @@
|
|||||||
ts.resortComplete( c, callback );
|
ts.resortComplete( c, callback );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.error( 'updateCell aborted, tbody missing or not within the indicated table' );
|
console.error( 'updateCell aborted, tbody missing or not within the indicated table' );
|
||||||
}
|
}
|
||||||
c.table.isUpdating = false;
|
c.table.isUpdating = false;
|
||||||
@ -1410,7 +1413,7 @@
|
|||||||
// row contained in the table?
|
// row contained in the table?
|
||||||
( ts.getClosest( $row, 'table' )[ 0 ] !== c.table )
|
( ts.getClosest( $row, 'table' )[ 0 ] !== c.table )
|
||||||
) {
|
) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.error( 'addRows method requires (1) a jQuery selector reference to rows that have already ' +
|
console.error( 'addRows method requires (1) a jQuery selector reference to rows that have already ' +
|
||||||
'been added to the table, or (2) row HTML string to be added to a table with only one tbody' );
|
'been added to the table, or (2) row HTML string to be added to a table with only one tbody' );
|
||||||
}
|
}
|
||||||
@ -1482,7 +1485,6 @@
|
|||||||
appendCache : function( c, init ) {
|
appendCache : function( c, init ) {
|
||||||
var parsed, totalRows, $tbody, $curTbody, rowIndex, tbodyIndex, appendTime,
|
var parsed, totalRows, $tbody, $curTbody, rowIndex, tbodyIndex, appendTime,
|
||||||
table = c.table,
|
table = c.table,
|
||||||
wo = c.widgetOptions,
|
|
||||||
$tbodies = c.$tbodies,
|
$tbodies = c.$tbodies,
|
||||||
rows = [],
|
rows = [],
|
||||||
cache = c.cache;
|
cache = c.cache;
|
||||||
@ -1492,7 +1494,7 @@
|
|||||||
return c.appender ? c.appender( table, rows ) :
|
return c.appender ? c.appender( table, rows ) :
|
||||||
table.isUpdating ? c.$table.triggerHandler( 'updateComplete', table ) : ''; // Fixes #532
|
table.isUpdating ? c.$table.triggerHandler( 'updateComplete', table ) : ''; // Fixes #532
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
appendTime = new Date();
|
appendTime = new Date();
|
||||||
}
|
}
|
||||||
for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) {
|
for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) {
|
||||||
@ -1505,7 +1507,7 @@
|
|||||||
for ( rowIndex = 0; rowIndex < totalRows; rowIndex++ ) {
|
for ( rowIndex = 0; rowIndex < totalRows; rowIndex++ ) {
|
||||||
rows[rows.length] = parsed[ rowIndex ][ c.columns ].$row;
|
rows[rows.length] = parsed[ rowIndex ][ c.columns ].$row;
|
||||||
// removeRows used by the pager plugin; don't render if using ajax - fixes #411
|
// removeRows used by the pager plugin; don't render if using ajax - fixes #411
|
||||||
if ( !c.appender || ( c.pager && ( !c.pager.removeRows || !wo.pager_removeRows ) && !c.pager.ajax ) ) {
|
if ( !c.appender || ( c.pager && !c.pager.removeRows && !c.pager.ajax ) ) {
|
||||||
$curTbody.append( parsed[ rowIndex ][ c.columns ].$row );
|
$curTbody.append( parsed[ rowIndex ][ c.columns ].$row );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1516,7 +1518,7 @@
|
|||||||
if ( c.appender ) {
|
if ( c.appender ) {
|
||||||
c.appender( table, rows );
|
c.appender( table, rows );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'Rebuilt table' + ts.benchmark( appendTime ) );
|
console.log( 'Rebuilt table' + ts.benchmark( appendTime ) );
|
||||||
}
|
}
|
||||||
// apply table widgets; but not before ajax completes
|
// apply table widgets; but not before ajax completes
|
||||||
@ -1698,7 +1700,7 @@
|
|||||||
// empty table - fixes #206/#346
|
// empty table - fixes #206/#346
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( c.debug ) { sortTime = new Date(); }
|
if ( ts.debug(c, 'core') ) { sortTime = new Date(); }
|
||||||
// cache textSorter to optimize speed
|
// cache textSorter to optimize speed
|
||||||
if ( typeof textSorter === 'object' ) {
|
if ( typeof textSorter === 'object' ) {
|
||||||
colMax = c.columns;
|
colMax = c.columns;
|
||||||
@ -1760,7 +1762,7 @@
|
|||||||
return a[ c.columns ].order - b[ c.columns ].order;
|
return a[ c.columns ].order - b[ c.columns ].order;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'Applying sort ' + sortList.toString() + ts.benchmark( sortTime ) );
|
console.log( 'Applying sort ' + sortList.toString() + ts.benchmark( sortTime ) );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2013,6 +2015,7 @@
|
|||||||
var applied, time, name,
|
var applied, time, name,
|
||||||
c = table.config,
|
c = table.config,
|
||||||
wo = c.widgetOptions,
|
wo = c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'core'),
|
||||||
widget = ts.getWidgetById( id );
|
widget = ts.getWidgetById( id );
|
||||||
if ( widget ) {
|
if ( widget ) {
|
||||||
name = widget.id;
|
name = widget.id;
|
||||||
@ -2021,7 +2024,7 @@
|
|||||||
if ( $.inArray( name, c.widgets ) < 0 ) {
|
if ( $.inArray( name, c.widgets ) < 0 ) {
|
||||||
c.widgets[ c.widgets.length ] = name;
|
c.widgets[ c.widgets.length ] = name;
|
||||||
}
|
}
|
||||||
if ( c.debug ) { time = new Date(); }
|
if ( debug ) { time = new Date(); }
|
||||||
|
|
||||||
if ( init || !( c.widgetInit[ name ] ) ) {
|
if ( init || !( c.widgetInit[ name ] ) ) {
|
||||||
// set init flag first to prevent calling init more than once (e.g. pager)
|
// set init flag first to prevent calling init more than once (e.g. pager)
|
||||||
@ -2032,7 +2035,7 @@
|
|||||||
}
|
}
|
||||||
if ( typeof widget.init === 'function' ) {
|
if ( typeof widget.init === 'function' ) {
|
||||||
applied = true;
|
applied = true;
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Initializing ' + name + ' widget' );
|
console[ console.group ? 'group' : 'log' ]( 'Initializing ' + name + ' widget' );
|
||||||
}
|
}
|
||||||
widget.init( table, widget, c, wo );
|
widget.init( table, widget, c, wo );
|
||||||
@ -2040,12 +2043,12 @@
|
|||||||
}
|
}
|
||||||
if ( !init && typeof widget.format === 'function' ) {
|
if ( !init && typeof widget.format === 'function' ) {
|
||||||
applied = true;
|
applied = true;
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Updating ' + name + ' widget' );
|
console[ console.group ? 'group' : 'log' ]( 'Updating ' + name + ' widget' );
|
||||||
}
|
}
|
||||||
widget.format( table, c, wo, false );
|
widget.format( table, c, wo, false );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
if ( applied ) {
|
if ( applied ) {
|
||||||
console.log( 'Completed ' + ( init ? 'initializing ' : 'applying ' ) + name + ' widget' + ts.benchmark( time ) );
|
console.log( 'Completed ' + ( init ? 'initializing ' : 'applying ' ) + name + ' widget' + ts.benchmark( time ) );
|
||||||
if ( console.groupEnd ) { console.groupEnd(); }
|
if ( console.groupEnd ) { console.groupEnd(); }
|
||||||
@ -2058,12 +2061,13 @@
|
|||||||
table = $( table )[ 0 ]; // in case this is called externally
|
table = $( table )[ 0 ]; // in case this is called externally
|
||||||
var indx, len, names, widget, time,
|
var indx, len, names, widget, time,
|
||||||
c = table.config,
|
c = table.config,
|
||||||
|
debug = ts.debug(c, 'core'),
|
||||||
widgets = [];
|
widgets = [];
|
||||||
// prevent numerous consecutive widget applications
|
// prevent numerous consecutive widget applications
|
||||||
if ( init !== false && table.hasInitialized && ( table.isApplyingWidgets || table.isUpdating ) ) {
|
if ( init !== false && table.hasInitialized && ( table.isApplyingWidgets || table.isUpdating ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( c.debug ) { time = new Date(); }
|
if ( debug ) { time = new Date(); }
|
||||||
ts.addWidgetFromClass( table );
|
ts.addWidgetFromClass( table );
|
||||||
// prevent "tablesorter-ready" from firing multiple times in a row
|
// prevent "tablesorter-ready" from firing multiple times in a row
|
||||||
clearTimeout( c.timerReady );
|
clearTimeout( c.timerReady );
|
||||||
@ -2082,7 +2086,7 @@
|
|||||||
// set priority to 10 if not defined
|
// set priority to 10 if not defined
|
||||||
if ( !widget.priority ) { widget.priority = 10; }
|
if ( !widget.priority ) { widget.priority = 10; }
|
||||||
widgets[ indx ] = widget;
|
widgets[ indx ] = widget;
|
||||||
} else if ( c.debug ) {
|
} else if ( debug ) {
|
||||||
console.warn( '"' + names[ indx ] + '" was enabled, but the widget code has not been loaded!' );
|
console.warn( '"' + names[ indx ] + '" was enabled, but the widget code has not been loaded!' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2092,7 +2096,7 @@
|
|||||||
});
|
});
|
||||||
// add/update selected widgets
|
// add/update selected widgets
|
||||||
len = widgets.length;
|
len = widgets.length;
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Start ' + ( init ? 'initializing' : 'applying' ) + ' widgets' );
|
console[ console.group ? 'group' : 'log' ]( 'Start ' + ( init ? 'initializing' : 'applying' ) + ' widgets' );
|
||||||
}
|
}
|
||||||
for ( indx = 0; indx < len; indx++ ) {
|
for ( indx = 0; indx < len; indx++ ) {
|
||||||
@ -2101,7 +2105,7 @@
|
|||||||
ts.applyWidgetId( table, widget.id, init );
|
ts.applyWidgetId( table, widget.id, init );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( c.debug && console.groupEnd ) { console.groupEnd(); }
|
if ( debug && console.groupEnd ) { console.groupEnd(); }
|
||||||
}
|
}
|
||||||
c.timerReady = setTimeout( function() {
|
c.timerReady = setTimeout( function() {
|
||||||
table.isApplyingWidgets = false;
|
table.isApplyingWidgets = false;
|
||||||
@ -2111,7 +2115,7 @@
|
|||||||
if ( !init && typeof callback === 'function' ) {
|
if ( !init && typeof callback === 'function' ) {
|
||||||
callback( table );
|
callback( table );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
widget = c.widgets.length;
|
widget = c.widgets.length;
|
||||||
console.log( 'Completed ' +
|
console.log( 'Completed ' +
|
||||||
( init === true ? 'initializing ' : 'applying ' ) + widget +
|
( init === true ? 'initializing ' : 'applying ' ) + widget +
|
||||||
@ -2148,7 +2152,7 @@
|
|||||||
c.widgets.splice( indx, 1 );
|
c.widgets.splice( indx, 1 );
|
||||||
}
|
}
|
||||||
if ( widget && widget.remove ) {
|
if ( widget && widget.remove ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( ( refreshing ? 'Refreshing' : 'Removing' ) + ' "' + name[ index ] + '" widget' );
|
console.log( ( refreshing ? 'Refreshing' : 'Removing' ) + ' "' + name[ index ] + '" widget' );
|
||||||
}
|
}
|
||||||
widget.remove( table, c, c.widgetOptions, refreshing );
|
widget.remove( table, c, c.widgetOptions, refreshing );
|
||||||
@ -2202,6 +2206,12 @@
|
|||||||
log : function() {
|
log : function() {
|
||||||
console.log( arguments );
|
console.log( arguments );
|
||||||
},
|
},
|
||||||
|
debug : function(c, name) {
|
||||||
|
return c && (
|
||||||
|
c.debug === true ||
|
||||||
|
typeof c.debug === 'string' && c.debug.indexOf(name) > -1
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
// $.isEmptyObject from jQuery v1.4
|
// $.isEmptyObject from jQuery v1.4
|
||||||
isEmptyObject : function( obj ) {
|
isEmptyObject : function( obj ) {
|
||||||
@ -2507,7 +2517,7 @@
|
|||||||
ignore = 'headers sortForce sortList sortAppend widgets'.split( ' ' ),
|
ignore = 'headers sortForce sortList sortAppend widgets'.split( ' ' ),
|
||||||
orig = c.originalSettings;
|
orig = c.originalSettings;
|
||||||
if ( orig ) {
|
if ( orig ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
timer = new Date();
|
timer = new Date();
|
||||||
}
|
}
|
||||||
for ( setting in orig ) {
|
for ( setting in orig ) {
|
||||||
@ -2523,7 +2533,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'validate options time:' + ts.benchmark( timer ) );
|
console.log( 'validate options time:' + ts.benchmark( timer ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2554,7 +2564,6 @@
|
|||||||
var events,
|
var events,
|
||||||
$t = $( table ),
|
$t = $( table ),
|
||||||
c = table.config,
|
c = table.config,
|
||||||
debug = c.debug,
|
|
||||||
$h = $t.find( 'thead:first' ),
|
$h = $t.find( 'thead:first' ),
|
||||||
$r = $h.find( 'tr.' + ts.css.headerRow ).removeClass( ts.css.headerRow + ' ' + c.cssHeaderRow ),
|
$r = $h.find( 'tr.' + ts.css.headerRow ).removeClass( ts.css.headerRow + ' ' + c.cssHeaderRow ),
|
||||||
$f = $t.find( 'tfoot:first > tr' ).children( 'th, td' );
|
$f = $t.find( 'tfoot:first > tr' ).children( 'th, td' );
|
||||||
@ -2592,7 +2601,7 @@
|
|||||||
if ( typeof callback === 'function' ) {
|
if ( typeof callback === 'function' ) {
|
||||||
callback( table );
|
callback( table );
|
||||||
}
|
}
|
||||||
if ( debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'tablesorter has been removed' );
|
console.log( 'tablesorter has been removed' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2709,7 +2718,7 @@
|
|||||||
is : function( str ) {
|
is : function( str ) {
|
||||||
return ts.regex.isoDate.test( str );
|
return ts.regex.isoDate.test( str );
|
||||||
},
|
},
|
||||||
format : function( str, table ) {
|
format : function( str ) {
|
||||||
var date = str ? new Date( str.replace( ts.regex.dash, '/' ) ) : str;
|
var date = str ? new Date( str.replace( ts.regex.dash, '/' ) ) : str;
|
||||||
return date instanceof Date && isFinite( date ) ? date.getTime() : str;
|
return date instanceof Date && isFinite( date ) ? date.getTime() : str;
|
||||||
},
|
},
|
||||||
@ -2752,7 +2761,7 @@
|
|||||||
// Jan 01, 2013 12:34:56 PM or 01 Jan 2013
|
// Jan 01, 2013 12:34:56 PM or 01 Jan 2013
|
||||||
return ts.regex.usLongDateTest1.test( str ) || ts.regex.usLongDateTest2.test( str );
|
return ts.regex.usLongDateTest1.test( str ) || ts.regex.usLongDateTest2.test( str );
|
||||||
},
|
},
|
||||||
format : function( str, table ) {
|
format : function( str ) {
|
||||||
var date = str ? new Date( str.replace( ts.regex.dateReplace, '$1 $2' ) ) : str;
|
var date = str ? new Date( str.replace( ts.regex.dateReplace, '$1 $2' ) ) : str;
|
||||||
return date instanceof Date && isFinite( date ) ? date.getTime() : str;
|
return date instanceof Date && isFinite( date ) ? date.getTime() : str;
|
||||||
},
|
},
|
||||||
@ -2813,7 +2822,7 @@
|
|||||||
is : function( str ) {
|
is : function( str ) {
|
||||||
return ts.regex.timeTest.test( str );
|
return ts.regex.timeTest.test( str );
|
||||||
},
|
},
|
||||||
format : function( str, table ) {
|
format : function( str ) {
|
||||||
// isolate time... ignore month, day and year
|
// isolate time... ignore month, day and year
|
||||||
var temp,
|
var temp,
|
||||||
timePart = ( str || '' ).match( ts.regex.timeMatch ),
|
timePart = ( str || '' ).match( ts.regex.timeMatch ),
|
||||||
@ -2890,7 +2899,7 @@
|
|||||||
|
|
||||||
})( jQuery );
|
})( jQuery );
|
||||||
|
|
||||||
/*! Widget: storage - updated 4/18/2017 (v2.28.8) */
|
/*! Widget: storage - updated 2018-03-18 (v2.30.0) */
|
||||||
/*global JSON:false */
|
/*global JSON:false */
|
||||||
;(function ($, window, document) {
|
;(function ($, window, document) {
|
||||||
'use strict';
|
'use strict';
|
||||||
@ -2936,6 +2945,7 @@
|
|||||||
values = {},
|
values = {},
|
||||||
c = table.config,
|
c = table.config,
|
||||||
wo = c && c.widgetOptions,
|
wo = c && c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'storage'),
|
||||||
storageType = (
|
storageType = (
|
||||||
( options && options.storageType ) || ( wo && wo.storage_storageType )
|
( options && options.storageType ) || ( wo && wo.storage_storageType )
|
||||||
).toString().charAt(0).toLowerCase(),
|
).toString().charAt(0).toLowerCase(),
|
||||||
@ -2964,14 +2974,12 @@
|
|||||||
hasStorage = true;
|
hasStorage = true;
|
||||||
window[storageType].removeItem('_tmptest');
|
window[storageType].removeItem('_tmptest');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (c && c.debug) {
|
|
||||||
console.warn( storageType + ' is not supported in this browser' );
|
console.warn( storageType + ' is not supported in this browser' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (debug) {
|
||||||
if (c.debug) {
|
console.log('Storage >> Using', hasStorage ? storageType : 'cookies');
|
||||||
console.log('Storage widget using', hasStorage ? storageType : 'cookies');
|
|
||||||
}
|
}
|
||||||
// *** get value ***
|
// *** get value ***
|
||||||
if ($.parseJSON) {
|
if ($.parseJSON) {
|
||||||
@ -3007,7 +3015,7 @@
|
|||||||
|
|
||||||
})(jQuery, window, document);
|
})(jQuery, window, document);
|
||||||
|
|
||||||
/*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
|
/*! Widget: uitheme - updated 2018-03-18 (v2.30.0) */
|
||||||
;(function ($) {
|
;(function ($) {
|
||||||
'use strict';
|
'use strict';
|
||||||
var ts = $.tablesorter || {};
|
var ts = $.tablesorter || {};
|
||||||
@ -3072,8 +3080,9 @@
|
|||||||
theme = c.theme || 'jui',
|
theme = c.theme || 'jui',
|
||||||
themes = themesAll[theme] || {},
|
themes = themesAll[theme] || {},
|
||||||
remove = $.trim( [ themes.sortNone, themes.sortDesc, themes.sortAsc, themes.active ].join( ' ' ) ),
|
remove = $.trim( [ themes.sortNone, themes.sortDesc, themes.sortAsc, themes.active ].join( ' ' ) ),
|
||||||
iconRmv = $.trim( [ themes.iconSortNone, themes.iconSortDesc, themes.iconSortAsc ].join( ' ' ) );
|
iconRmv = $.trim( [ themes.iconSortNone, themes.iconSortDesc, themes.iconSortAsc ].join( ' ' ) ),
|
||||||
if (c.debug) { time = new Date(); }
|
debug = ts.debug(c, 'uitheme');
|
||||||
|
if (debug) { time = new Date(); }
|
||||||
// initialization code - run once
|
// initialization code - run once
|
||||||
if (!$table.hasClass('tablesorter-' + theme) || c.theme !== c.appliedTheme || !wo.uitheme_applied) {
|
if (!$table.hasClass('tablesorter-' + theme) || c.theme !== c.appliedTheme || !wo.uitheme_applied) {
|
||||||
wo.uitheme_applied = true;
|
wo.uitheme_applied = true;
|
||||||
@ -3176,8 +3185,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('Applying ' + theme + ' theme' + ts.benchmark(time));
|
console.log('uitheme >> Applied ' + theme + ' theme' + ts.benchmark(time));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove: function(table, c, wo, refreshing) {
|
remove: function(table, c, wo, refreshing) {
|
||||||
@ -3282,7 +3291,7 @@
|
|||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
/*! Widget: filter - updated 2018-01-30 (v2.29.5) *//*
|
/*! Widget: filter - updated 2018-03-18 (v2.30.0) *//*
|
||||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -3564,6 +3573,7 @@
|
|||||||
if ( tsfRegex.exact.test( data.iFilter ) ) {
|
if ( tsfRegex.exact.test( data.iFilter ) ) {
|
||||||
var txt = data.iFilter.replace( tsfRegex.exact, '' ),
|
var txt = data.iFilter.replace( tsfRegex.exact, '' ),
|
||||||
filter = tsf.parseFilter( c, txt, data ) || '';
|
filter = tsf.parseFilter( c, txt, data ) || '';
|
||||||
|
// eslint-disable-next-line eqeqeq
|
||||||
return data.anyMatch ? $.inArray( filter, data.rowArray ) >= 0 : filter == data.iExact;
|
return data.anyMatch ? $.inArray( filter, data.rowArray ) >= 0 : filter == data.iExact;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@ -3831,7 +3841,7 @@
|
|||||||
|
|
||||||
// show processing icon
|
// show processing icon
|
||||||
if ( c.showProcessing ) {
|
if ( c.showProcessing ) {
|
||||||
txt = 'filterStart filterEnd '.split( ' ' ).join( c.namespace + 'filter ' );
|
txt = 'filterStart filterEnd '.split( ' ' ).join( c.namespace + 'filter-sp ' );
|
||||||
c.$table
|
c.$table
|
||||||
.unbind( txt.replace( ts.regex.spaces, ' ' ) )
|
.unbind( txt.replace( ts.regex.spaces, ' ' ) )
|
||||||
.bind( txt, function( event, columns ) {
|
.bind( txt, function( event, columns ) {
|
||||||
@ -3910,6 +3920,9 @@
|
|||||||
c.lastSearch = c.$table.data( 'lastSearch' );
|
c.lastSearch = c.$table.data( 'lastSearch' );
|
||||||
c.$table.triggerHandler( 'filterInit', c );
|
c.$table.triggerHandler( 'filterInit', c );
|
||||||
tsf.findRows( c.table, c.lastSearch || [] );
|
tsf.findRows( c.table, c.lastSearch || [] );
|
||||||
|
if (ts.debug(c, 'filter')) {
|
||||||
|
console.log('Filter >> Widget initialized');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
if ( $.isEmptyObject( wo.filter_formatter ) ) {
|
if ( $.isEmptyObject( wo.filter_formatter ) ) {
|
||||||
completed();
|
completed();
|
||||||
@ -4610,6 +4623,7 @@
|
|||||||
storedFilters = $.extend( [], filters ),
|
storedFilters = $.extend( [], filters ),
|
||||||
c = table.config,
|
c = table.config,
|
||||||
wo = c.widgetOptions,
|
wo = c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'filter'),
|
||||||
// data object passed to filters; anyMatch is a flag for the filters
|
// data object passed to filters; anyMatch is a flag for the filters
|
||||||
data = {
|
data = {
|
||||||
anyMatch: false,
|
anyMatch: false,
|
||||||
@ -4626,7 +4640,6 @@
|
|||||||
defaultColFilter : [],
|
defaultColFilter : [],
|
||||||
defaultAnyFilter : ts.getColumnData( table, wo.filter_defaultFilter, c.columns, true ) || ''
|
defaultAnyFilter : ts.getColumnData( table, wo.filter_defaultFilter, c.columns, true ) || ''
|
||||||
};
|
};
|
||||||
|
|
||||||
// parse columns after formatter, in case the class is added at that point
|
// parse columns after formatter, in case the class is added at that point
|
||||||
data.parsed = [];
|
data.parsed = [];
|
||||||
for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
|
for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
|
||||||
@ -4648,8 +4661,8 @@
|
|||||||
( ts.getColumnData( table, wo.filter_excludeFilter, columnIndex, true ) || '' ).split( /\s+/ );
|
( ts.getColumnData( table, wo.filter_excludeFilter, columnIndex, true ) || '' ).split( /\s+/ );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Filter: Starting filter widget search', filters );
|
console.log( 'Filter >> Starting filter widget search', filters );
|
||||||
time = new Date();
|
time = new Date();
|
||||||
}
|
}
|
||||||
// filtered rows count
|
// filtered rows count
|
||||||
@ -4747,8 +4760,8 @@
|
|||||||
notFiltered = $rows.not( '.' + wo.filter_filteredRow ).length;
|
notFiltered = $rows.not( '.' + wo.filter_filteredRow ).length;
|
||||||
// can't search when all rows are hidden - this happens when looking for exact matches
|
// can't search when all rows are hidden - this happens when looking for exact matches
|
||||||
if ( searchFiltered && notFiltered === 0 ) { searchFiltered = false; }
|
if ( searchFiltered && notFiltered === 0 ) { searchFiltered = false; }
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Filter: Searching through ' +
|
console.log( 'Filter >> Searching through ' +
|
||||||
( searchFiltered && notFiltered < len ? notFiltered : 'all' ) + ' rows' );
|
( searchFiltered && notFiltered < len ? notFiltered : 'all' ) + ' rows' );
|
||||||
}
|
}
|
||||||
if ( data.anyMatchFlag ) {
|
if ( data.anyMatchFlag ) {
|
||||||
@ -4851,8 +4864,8 @@
|
|||||||
if ( wo.filter_saveFilters && ts.storage ) {
|
if ( wo.filter_saveFilters && ts.storage ) {
|
||||||
ts.storage( table, 'tablesorter-filters', tsf.processFilters( storedFilters, true ) );
|
ts.storage( table, 'tablesorter-filters', tsf.processFilters( storedFilters, true ) );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Completed filter widget search' + ts.benchmark(time) );
|
console.log( 'Filter >> Completed search' + ts.benchmark(time) );
|
||||||
}
|
}
|
||||||
if ( wo.filter_initialized ) {
|
if ( wo.filter_initialized ) {
|
||||||
c.$table.triggerHandler( 'filterBeforeEnd', c );
|
c.$table.triggerHandler( 'filterBeforeEnd', c );
|
||||||
@ -5067,13 +5080,13 @@
|
|||||||
options += '<option';
|
options += '<option';
|
||||||
for ( val in option ) {
|
for ( val in option ) {
|
||||||
if ( option.hasOwnProperty( val ) && val !== 'text' ) {
|
if ( option.hasOwnProperty( val ) && val !== 'text' ) {
|
||||||
options += ' ' + val + '="' + option[ val ] + '"';
|
options += ' ' + val + '="' + option[ val ].replace( tsfRegex.quote, '"' ) + '"';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( !option.value ) {
|
if ( !option.value ) {
|
||||||
options += ' value="' + option.text + '"';
|
options += ' value="' + option.text.replace( tsfRegex.quote, '"' ) + '"';
|
||||||
}
|
}
|
||||||
options += '>' + option.text + '</option>';
|
options += '>' + option.text.replace( tsfRegex.quote, '"' ) + '</option>';
|
||||||
// above code is needed in jQuery < v1.8
|
// above code is needed in jQuery < v1.8
|
||||||
|
|
||||||
// make sure we don't turn an object into a string (objects without a "text" property)
|
// make sure we don't turn an object into a string (objects without a "text" property)
|
||||||
@ -5975,7 +5988,7 @@
|
|||||||
|
|
||||||
})( jQuery, window );
|
})( jQuery, window );
|
||||||
|
|
||||||
/*! Widget: saveSort - updated 10/31/2015 (v2.24.0) *//*
|
/*! Widget: saveSort - updated 2018-03-18 (v2.30.0) *//*
|
||||||
* Requires tablesorter v2.16+
|
* Requires tablesorter v2.16+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -5983,6 +5996,15 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
var ts = $.tablesorter || {};
|
var ts = $.tablesorter || {};
|
||||||
|
|
||||||
|
function getStoredSortList(c) {
|
||||||
|
var stored = ts.storage( c.table, 'tablesorter-savesort' );
|
||||||
|
return (stored && stored.hasOwnProperty('sortList') && $.isArray(stored.sortList)) ? stored.sortList : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function sortListChanged(c, sortList) {
|
||||||
|
return (sortList || getStoredSortList(c)).join(',') !== c.sortList.join(',');
|
||||||
|
}
|
||||||
|
|
||||||
// this widget saves the last sort only if the
|
// this widget saves the last sort only if the
|
||||||
// saveSort widget option is true AND the
|
// saveSort widget option is true AND the
|
||||||
// $.tablesorter.storage function is included
|
// $.tablesorter.storage function is included
|
||||||
@ -5998,18 +6020,19 @@
|
|||||||
thisWidget.format(table, c, wo, true);
|
thisWidget.format(table, c, wo, true);
|
||||||
},
|
},
|
||||||
format: function(table, c, wo, init) {
|
format: function(table, c, wo, init) {
|
||||||
var stored, time,
|
var time,
|
||||||
$table = c.$table,
|
$table = c.$table,
|
||||||
saveSort = wo.saveSort !== false, // make saveSort active/inactive; default to true
|
saveSort = wo.saveSort !== false, // make saveSort active/inactive; default to true
|
||||||
sortList = { 'sortList' : c.sortList };
|
sortList = { 'sortList' : c.sortList },
|
||||||
if (c.debug) {
|
debug = ts.debug(c, 'saveSort');
|
||||||
|
if (debug) {
|
||||||
time = new Date();
|
time = new Date();
|
||||||
}
|
}
|
||||||
if ($table.hasClass('hasSaveSort')) {
|
if ($table.hasClass('hasSaveSort')) {
|
||||||
if (saveSort && table.hasInitialized && ts.storage) {
|
if (saveSort && table.hasInitialized && ts.storage && sortListChanged(c)) {
|
||||||
ts.storage( table, 'tablesorter-savesort', sortList );
|
ts.storage( table, 'tablesorter-savesort', sortList );
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('saveSort widget: Saving last sort: ' + c.sortList + ts.benchmark(time));
|
console.log('saveSort >> Saving last sort: ' + c.sortList + ts.benchmark(time));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -6018,10 +6041,9 @@
|
|||||||
sortList = '';
|
sortList = '';
|
||||||
// get data
|
// get data
|
||||||
if (ts.storage) {
|
if (ts.storage) {
|
||||||
stored = ts.storage( table, 'tablesorter-savesort' );
|
sortList = getStoredSortList(c);
|
||||||
sortList = (stored && stored.hasOwnProperty('sortList') && $.isArray(stored.sortList)) ? stored.sortList : '';
|
if (debug) {
|
||||||
if (c.debug) {
|
console.log('saveSort >> Last sort loaded: "' + sortList + '"' + ts.benchmark(time));
|
||||||
console.log('saveSort: Last sort loaded: "' + sortList + '"' + ts.benchmark(time));
|
|
||||||
}
|
}
|
||||||
$table.bind('saveSortReset', function(event) {
|
$table.bind('saveSortReset', function(event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
@ -6034,9 +6056,11 @@
|
|||||||
c.sortList = sortList;
|
c.sortList = sortList;
|
||||||
} else if (table.hasInitialized && sortList && sortList.length > 0) {
|
} else if (table.hasInitialized && sortList && sortList.length > 0) {
|
||||||
// update sort change
|
// update sort change
|
||||||
|
if (sortListChanged(c, sortList)) {
|
||||||
ts.sortOn(c, sortList);
|
ts.sortOn(c, sortList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
remove: function(table, c) {
|
remove: function(table, c) {
|
||||||
c.$table.removeClass('hasSaveSort');
|
c.$table.removeClass('hasSaveSort');
|
||||||
|
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
107
dist/js/jquery.tablesorter.js
vendored
107
dist/js/jquery.tablesorter.js
vendored
@ -8,7 +8,7 @@
|
|||||||
}
|
}
|
||||||
}(function(jQuery) {
|
}(function(jQuery) {
|
||||||
|
|
||||||
/*! TableSorter (FORK) v2.29.6 *//*
|
/*! TableSorter (FORK) v2.30.0 *//*
|
||||||
* 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.6',
|
version : '2.30.0',
|
||||||
|
|
||||||
parsers : [],
|
parsers : [],
|
||||||
widgets : [],
|
widgets : [],
|
||||||
@ -226,7 +226,7 @@
|
|||||||
setup : function( table, c ) {
|
setup : function( table, c ) {
|
||||||
// if no thead or tbody, or tablesorter is already present, quit
|
// if no thead or tbody, or tablesorter is already present, quit
|
||||||
if ( !table || !table.tHead || table.tBodies.length === 0 || table.hasInitialized === true ) {
|
if ( !table || !table.tHead || table.tBodies.length === 0 || table.hasInitialized === true ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
if ( table.hasInitialized ) {
|
if ( table.hasInitialized ) {
|
||||||
console.warn( 'Stopping initialization. Tablesorter has already been initialized' );
|
console.warn( 'Stopping initialization. Tablesorter has already been initialized' );
|
||||||
} else {
|
} else {
|
||||||
@ -247,7 +247,7 @@
|
|||||||
table.config = c;
|
table.config = c;
|
||||||
// save the settings where they read
|
// save the settings where they read
|
||||||
$.data( table, 'tablesorter', c );
|
$.data( table, 'tablesorter', c );
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Initializing tablesorter v' + ts.version );
|
console[ console.group ? 'group' : 'log' ]( 'Initializing tablesorter v' + ts.version );
|
||||||
$.data( table, 'startoveralltimer', new Date() );
|
$.data( table, 'startoveralltimer', new Date() );
|
||||||
}
|
}
|
||||||
@ -353,9 +353,9 @@
|
|||||||
// initialized
|
// initialized
|
||||||
table.hasInitialized = true;
|
table.hasInitialized = true;
|
||||||
table.isProcessing = false;
|
table.isProcessing = false;
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'Overall initialization time:' + ts.benchmark( $.data( table, 'startoveralltimer' ) ) );
|
console.log( 'Overall initialization time:' + ts.benchmark( $.data( table, 'startoveralltimer' ) ) );
|
||||||
if ( c.debug && console.groupEnd ) { console.groupEnd(); }
|
if ( ts.debug(c, 'core') && console.groupEnd ) { console.groupEnd(); }
|
||||||
}
|
}
|
||||||
$table.triggerHandler( 'tablesorter-initialized', table );
|
$table.triggerHandler( 'tablesorter-initialized', table );
|
||||||
if ( typeof c.initialized === 'function' ) {
|
if ( typeof c.initialized === 'function' ) {
|
||||||
@ -552,7 +552,7 @@
|
|||||||
c.headerList = [];
|
c.headerList = [];
|
||||||
c.headerContent = [];
|
c.headerContent = [];
|
||||||
c.sortVars = [];
|
c.sortVars = [];
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
timer = new Date();
|
timer = new Date();
|
||||||
}
|
}
|
||||||
// children tr in tfoot - see issue #196 & #547
|
// children tr in tfoot - see issue #196 & #547
|
||||||
@ -647,7 +647,7 @@
|
|||||||
});
|
});
|
||||||
// enable/disable sorting
|
// enable/disable sorting
|
||||||
ts.updateHeader( c );
|
ts.updateHeader( c );
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'Built headers:' + ts.benchmark( timer ) );
|
console.log( 'Built headers:' + ts.benchmark( timer ) );
|
||||||
console.log( c.$headers );
|
console.log( c.$headers );
|
||||||
}
|
}
|
||||||
@ -670,14 +670,15 @@
|
|||||||
noParser, parser, extractor, time, tbody, len,
|
noParser, parser, extractor, time, tbody, len,
|
||||||
table = c.table,
|
table = c.table,
|
||||||
tbodyIndex = 0,
|
tbodyIndex = 0,
|
||||||
debug = {};
|
debug = ts.debug(c, 'core'),
|
||||||
|
debugOutput = {};
|
||||||
// update table bodies in case we start with an empty table
|
// update table bodies in case we start with an empty table
|
||||||
c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
|
c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
|
||||||
tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies;
|
tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies;
|
||||||
len = tbody.length;
|
len = tbody.length;
|
||||||
if ( len === 0 ) {
|
if ( len === 0 ) {
|
||||||
return c.debug ? console.warn( 'Warning: *Empty table!* Not building a parser cache' ) : '';
|
return debug ? console.warn( 'Warning: *Empty table!* Not building a parser cache' ) : '';
|
||||||
} else if ( c.debug ) {
|
} else if ( debug ) {
|
||||||
time = new Date();
|
time = new Date();
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Detecting parsers for each column' );
|
console[ console.group ? 'group' : 'log' ]( 'Detecting parsers for each column' );
|
||||||
}
|
}
|
||||||
@ -719,8 +720,8 @@
|
|||||||
if ( !parser ) {
|
if ( !parser ) {
|
||||||
parser = ts.detectParserForColumn( c, rows, -1, colIndex );
|
parser = ts.detectParserForColumn( c, rows, -1, colIndex );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
debug[ '(' + colIndex + ') ' + header.text() ] = {
|
debugOutput[ '(' + colIndex + ') ' + header.text() ] = {
|
||||||
parser : parser.id,
|
parser : parser.id,
|
||||||
extractor : extractor ? extractor.id : 'none',
|
extractor : extractor ? extractor.id : 'none',
|
||||||
string : c.strings[ colIndex ],
|
string : c.strings[ colIndex ],
|
||||||
@ -746,9 +747,9 @@
|
|||||||
}
|
}
|
||||||
tbodyIndex += ( list.parsers.length ) ? len : 1;
|
tbodyIndex += ( list.parsers.length ) ? len : 1;
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
if ( !ts.isEmptyObject( debug ) ) {
|
if ( !ts.isEmptyObject( debugOutput ) ) {
|
||||||
console[ console.table ? 'table' : 'log' ]( debug );
|
console[ console.table ? 'table' : 'log' ]( debugOutput );
|
||||||
} else {
|
} else {
|
||||||
console.warn( ' No parsers detected!' );
|
console.warn( ' No parsers detected!' );
|
||||||
}
|
}
|
||||||
@ -774,7 +775,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
getParserById : function( name ) {
|
getParserById : function( name ) {
|
||||||
/*jshint eqeqeq:false */
|
/*jshint eqeqeq:false */ // eslint-disable-next-line eqeqeq
|
||||||
if ( name == 'false' ) { return false; }
|
if ( name == 'false' ) { return false; }
|
||||||
var indx,
|
var indx,
|
||||||
len = ts.parsers.length;
|
len = ts.parsers.length;
|
||||||
@ -791,6 +792,7 @@
|
|||||||
indx = ts.parsers.length,
|
indx = ts.parsers.length,
|
||||||
node = false,
|
node = false,
|
||||||
nodeValue = '',
|
nodeValue = '',
|
||||||
|
debug = ts.debug(c, 'core'),
|
||||||
keepLooking = true;
|
keepLooking = true;
|
||||||
while ( nodeValue === '' && keepLooking ) {
|
while ( nodeValue === '' && keepLooking ) {
|
||||||
rowIndex++;
|
rowIndex++;
|
||||||
@ -801,7 +803,7 @@
|
|||||||
node = rows[ rowIndex ].cells[ cellIndex ];
|
node = rows[ rowIndex ].cells[ cellIndex ];
|
||||||
nodeValue = ts.getElementText( c, node, cellIndex );
|
nodeValue = ts.getElementText( c, node, cellIndex );
|
||||||
$node = $( node );
|
$node = $( node );
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Checking if value was empty on row ' + rowIndex + ', column: ' +
|
console.log( 'Checking if value was empty on row ' + rowIndex + ', column: ' +
|
||||||
cellIndex + ': "' + nodeValue + '"' );
|
cellIndex + ': "' + nodeValue + '"' );
|
||||||
}
|
}
|
||||||
@ -883,7 +885,8 @@
|
|||||||
cols, $cells, cell, cacheTime, totalRows, rowData, prevRowData,
|
cols, $cells, cell, cacheTime, totalRows, rowData, prevRowData,
|
||||||
colMax, span, cacheIndex, hasParser, max, len, index,
|
colMax, span, cacheIndex, hasParser, max, len, index,
|
||||||
table = c.table,
|
table = c.table,
|
||||||
parsers = c.parsers;
|
parsers = c.parsers,
|
||||||
|
debug = ts.debug(c, 'core');
|
||||||
// update tbody variable
|
// update tbody variable
|
||||||
c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
|
c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
|
||||||
$tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies,
|
$tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies,
|
||||||
@ -891,9 +894,9 @@
|
|||||||
c.totalRows = 0;
|
c.totalRows = 0;
|
||||||
// if no parsers found, return - it's an empty table.
|
// if no parsers found, return - it's an empty table.
|
||||||
if ( !parsers ) {
|
if ( !parsers ) {
|
||||||
return c.debug ? console.warn( 'Warning: *Empty table!* Not building a cache' ) : '';
|
return debug ? console.warn( 'Warning: *Empty table!* Not building a cache' ) : '';
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
cacheTime = new Date();
|
cacheTime = new Date();
|
||||||
}
|
}
|
||||||
// processing icon
|
// processing icon
|
||||||
@ -962,7 +965,7 @@
|
|||||||
cell = $row[ 0 ].cells[ colIndex ];
|
cell = $row[ 0 ].cells[ colIndex ];
|
||||||
if ( cell && cacheIndex < c.columns ) {
|
if ( cell && cacheIndex < c.columns ) {
|
||||||
hasParser = typeof parsers[ cacheIndex ] !== 'undefined';
|
hasParser = typeof parsers[ cacheIndex ] !== 'undefined';
|
||||||
if ( !hasParser && c.debug ) {
|
if ( !hasParser && debug ) {
|
||||||
console.warn( 'No parser found for row: ' + rowIndex + ', column: ' + colIndex +
|
console.warn( 'No parser found for row: ' + rowIndex + ', column: ' + colIndex +
|
||||||
'; cell containing: "' + $(cell).text() + '"; does it have a header?' );
|
'; cell containing: "' + $(cell).text() + '"; does it have a header?' );
|
||||||
}
|
}
|
||||||
@ -1010,7 +1013,7 @@
|
|||||||
if ( c.showProcessing ) {
|
if ( c.showProcessing ) {
|
||||||
ts.isProcessing( table ); // remove processing icon
|
ts.isProcessing( table ); // remove processing icon
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
len = Math.min( 5, c.cache[ 0 ].normalized.length );
|
len = Math.min( 5, c.cache[ 0 ].normalized.length );
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Building cache for ' + c.totalRows +
|
console[ console.group ? 'group' : 'log' ]( 'Building cache for ' + c.totalRows +
|
||||||
' rows (showing ' + len + ' rows in log) and ' + c.columns + ' columns' +
|
' rows (showing ' + len + ' rows in log) and ' + c.columns + ' columns' +
|
||||||
@ -1041,7 +1044,7 @@
|
|||||||
data = { raw : [], parsed: [], $cell: [] },
|
data = { raw : [], parsed: [], $cell: [] },
|
||||||
c = table.config;
|
c = table.config;
|
||||||
if ( ts.isEmptyObject( c ) ) {
|
if ( ts.isEmptyObject( c ) ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.warn( 'No cache found - aborting getColumnText function!' );
|
console.warn( 'No cache found - aborting getColumnText function!' );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1385,7 +1388,7 @@
|
|||||||
ts.resortComplete( c, callback );
|
ts.resortComplete( c, callback );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.error( 'updateCell aborted, tbody missing or not within the indicated table' );
|
console.error( 'updateCell aborted, tbody missing or not within the indicated table' );
|
||||||
}
|
}
|
||||||
c.table.isUpdating = false;
|
c.table.isUpdating = false;
|
||||||
@ -1408,7 +1411,7 @@
|
|||||||
// row contained in the table?
|
// row contained in the table?
|
||||||
( ts.getClosest( $row, 'table' )[ 0 ] !== c.table )
|
( ts.getClosest( $row, 'table' )[ 0 ] !== c.table )
|
||||||
) {
|
) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.error( 'addRows method requires (1) a jQuery selector reference to rows that have already ' +
|
console.error( 'addRows method requires (1) a jQuery selector reference to rows that have already ' +
|
||||||
'been added to the table, or (2) row HTML string to be added to a table with only one tbody' );
|
'been added to the table, or (2) row HTML string to be added to a table with only one tbody' );
|
||||||
}
|
}
|
||||||
@ -1480,7 +1483,6 @@
|
|||||||
appendCache : function( c, init ) {
|
appendCache : function( c, init ) {
|
||||||
var parsed, totalRows, $tbody, $curTbody, rowIndex, tbodyIndex, appendTime,
|
var parsed, totalRows, $tbody, $curTbody, rowIndex, tbodyIndex, appendTime,
|
||||||
table = c.table,
|
table = c.table,
|
||||||
wo = c.widgetOptions,
|
|
||||||
$tbodies = c.$tbodies,
|
$tbodies = c.$tbodies,
|
||||||
rows = [],
|
rows = [],
|
||||||
cache = c.cache;
|
cache = c.cache;
|
||||||
@ -1490,7 +1492,7 @@
|
|||||||
return c.appender ? c.appender( table, rows ) :
|
return c.appender ? c.appender( table, rows ) :
|
||||||
table.isUpdating ? c.$table.triggerHandler( 'updateComplete', table ) : ''; // Fixes #532
|
table.isUpdating ? c.$table.triggerHandler( 'updateComplete', table ) : ''; // Fixes #532
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
appendTime = new Date();
|
appendTime = new Date();
|
||||||
}
|
}
|
||||||
for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) {
|
for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) {
|
||||||
@ -1503,7 +1505,7 @@
|
|||||||
for ( rowIndex = 0; rowIndex < totalRows; rowIndex++ ) {
|
for ( rowIndex = 0; rowIndex < totalRows; rowIndex++ ) {
|
||||||
rows[rows.length] = parsed[ rowIndex ][ c.columns ].$row;
|
rows[rows.length] = parsed[ rowIndex ][ c.columns ].$row;
|
||||||
// removeRows used by the pager plugin; don't render if using ajax - fixes #411
|
// removeRows used by the pager plugin; don't render if using ajax - fixes #411
|
||||||
if ( !c.appender || ( c.pager && ( !c.pager.removeRows || !wo.pager_removeRows ) && !c.pager.ajax ) ) {
|
if ( !c.appender || ( c.pager && !c.pager.removeRows && !c.pager.ajax ) ) {
|
||||||
$curTbody.append( parsed[ rowIndex ][ c.columns ].$row );
|
$curTbody.append( parsed[ rowIndex ][ c.columns ].$row );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1514,7 +1516,7 @@
|
|||||||
if ( c.appender ) {
|
if ( c.appender ) {
|
||||||
c.appender( table, rows );
|
c.appender( table, rows );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'Rebuilt table' + ts.benchmark( appendTime ) );
|
console.log( 'Rebuilt table' + ts.benchmark( appendTime ) );
|
||||||
}
|
}
|
||||||
// apply table widgets; but not before ajax completes
|
// apply table widgets; but not before ajax completes
|
||||||
@ -1696,7 +1698,7 @@
|
|||||||
// empty table - fixes #206/#346
|
// empty table - fixes #206/#346
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( c.debug ) { sortTime = new Date(); }
|
if ( ts.debug(c, 'core') ) { sortTime = new Date(); }
|
||||||
// cache textSorter to optimize speed
|
// cache textSorter to optimize speed
|
||||||
if ( typeof textSorter === 'object' ) {
|
if ( typeof textSorter === 'object' ) {
|
||||||
colMax = c.columns;
|
colMax = c.columns;
|
||||||
@ -1758,7 +1760,7 @@
|
|||||||
return a[ c.columns ].order - b[ c.columns ].order;
|
return a[ c.columns ].order - b[ c.columns ].order;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'Applying sort ' + sortList.toString() + ts.benchmark( sortTime ) );
|
console.log( 'Applying sort ' + sortList.toString() + ts.benchmark( sortTime ) );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2011,6 +2013,7 @@
|
|||||||
var applied, time, name,
|
var applied, time, name,
|
||||||
c = table.config,
|
c = table.config,
|
||||||
wo = c.widgetOptions,
|
wo = c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'core'),
|
||||||
widget = ts.getWidgetById( id );
|
widget = ts.getWidgetById( id );
|
||||||
if ( widget ) {
|
if ( widget ) {
|
||||||
name = widget.id;
|
name = widget.id;
|
||||||
@ -2019,7 +2022,7 @@
|
|||||||
if ( $.inArray( name, c.widgets ) < 0 ) {
|
if ( $.inArray( name, c.widgets ) < 0 ) {
|
||||||
c.widgets[ c.widgets.length ] = name;
|
c.widgets[ c.widgets.length ] = name;
|
||||||
}
|
}
|
||||||
if ( c.debug ) { time = new Date(); }
|
if ( debug ) { time = new Date(); }
|
||||||
|
|
||||||
if ( init || !( c.widgetInit[ name ] ) ) {
|
if ( init || !( c.widgetInit[ name ] ) ) {
|
||||||
// set init flag first to prevent calling init more than once (e.g. pager)
|
// set init flag first to prevent calling init more than once (e.g. pager)
|
||||||
@ -2030,7 +2033,7 @@
|
|||||||
}
|
}
|
||||||
if ( typeof widget.init === 'function' ) {
|
if ( typeof widget.init === 'function' ) {
|
||||||
applied = true;
|
applied = true;
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Initializing ' + name + ' widget' );
|
console[ console.group ? 'group' : 'log' ]( 'Initializing ' + name + ' widget' );
|
||||||
}
|
}
|
||||||
widget.init( table, widget, c, wo );
|
widget.init( table, widget, c, wo );
|
||||||
@ -2038,12 +2041,12 @@
|
|||||||
}
|
}
|
||||||
if ( !init && typeof widget.format === 'function' ) {
|
if ( !init && typeof widget.format === 'function' ) {
|
||||||
applied = true;
|
applied = true;
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Updating ' + name + ' widget' );
|
console[ console.group ? 'group' : 'log' ]( 'Updating ' + name + ' widget' );
|
||||||
}
|
}
|
||||||
widget.format( table, c, wo, false );
|
widget.format( table, c, wo, false );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
if ( applied ) {
|
if ( applied ) {
|
||||||
console.log( 'Completed ' + ( init ? 'initializing ' : 'applying ' ) + name + ' widget' + ts.benchmark( time ) );
|
console.log( 'Completed ' + ( init ? 'initializing ' : 'applying ' ) + name + ' widget' + ts.benchmark( time ) );
|
||||||
if ( console.groupEnd ) { console.groupEnd(); }
|
if ( console.groupEnd ) { console.groupEnd(); }
|
||||||
@ -2056,12 +2059,13 @@
|
|||||||
table = $( table )[ 0 ]; // in case this is called externally
|
table = $( table )[ 0 ]; // in case this is called externally
|
||||||
var indx, len, names, widget, time,
|
var indx, len, names, widget, time,
|
||||||
c = table.config,
|
c = table.config,
|
||||||
|
debug = ts.debug(c, 'core'),
|
||||||
widgets = [];
|
widgets = [];
|
||||||
// prevent numerous consecutive widget applications
|
// prevent numerous consecutive widget applications
|
||||||
if ( init !== false && table.hasInitialized && ( table.isApplyingWidgets || table.isUpdating ) ) {
|
if ( init !== false && table.hasInitialized && ( table.isApplyingWidgets || table.isUpdating ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( c.debug ) { time = new Date(); }
|
if ( debug ) { time = new Date(); }
|
||||||
ts.addWidgetFromClass( table );
|
ts.addWidgetFromClass( table );
|
||||||
// prevent "tablesorter-ready" from firing multiple times in a row
|
// prevent "tablesorter-ready" from firing multiple times in a row
|
||||||
clearTimeout( c.timerReady );
|
clearTimeout( c.timerReady );
|
||||||
@ -2080,7 +2084,7 @@
|
|||||||
// set priority to 10 if not defined
|
// set priority to 10 if not defined
|
||||||
if ( !widget.priority ) { widget.priority = 10; }
|
if ( !widget.priority ) { widget.priority = 10; }
|
||||||
widgets[ indx ] = widget;
|
widgets[ indx ] = widget;
|
||||||
} else if ( c.debug ) {
|
} else if ( debug ) {
|
||||||
console.warn( '"' + names[ indx ] + '" was enabled, but the widget code has not been loaded!' );
|
console.warn( '"' + names[ indx ] + '" was enabled, but the widget code has not been loaded!' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2090,7 +2094,7 @@
|
|||||||
});
|
});
|
||||||
// add/update selected widgets
|
// add/update selected widgets
|
||||||
len = widgets.length;
|
len = widgets.length;
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Start ' + ( init ? 'initializing' : 'applying' ) + ' widgets' );
|
console[ console.group ? 'group' : 'log' ]( 'Start ' + ( init ? 'initializing' : 'applying' ) + ' widgets' );
|
||||||
}
|
}
|
||||||
for ( indx = 0; indx < len; indx++ ) {
|
for ( indx = 0; indx < len; indx++ ) {
|
||||||
@ -2099,7 +2103,7 @@
|
|||||||
ts.applyWidgetId( table, widget.id, init );
|
ts.applyWidgetId( table, widget.id, init );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( c.debug && console.groupEnd ) { console.groupEnd(); }
|
if ( debug && console.groupEnd ) { console.groupEnd(); }
|
||||||
}
|
}
|
||||||
c.timerReady = setTimeout( function() {
|
c.timerReady = setTimeout( function() {
|
||||||
table.isApplyingWidgets = false;
|
table.isApplyingWidgets = false;
|
||||||
@ -2109,7 +2113,7 @@
|
|||||||
if ( !init && typeof callback === 'function' ) {
|
if ( !init && typeof callback === 'function' ) {
|
||||||
callback( table );
|
callback( table );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
widget = c.widgets.length;
|
widget = c.widgets.length;
|
||||||
console.log( 'Completed ' +
|
console.log( 'Completed ' +
|
||||||
( init === true ? 'initializing ' : 'applying ' ) + widget +
|
( init === true ? 'initializing ' : 'applying ' ) + widget +
|
||||||
@ -2146,7 +2150,7 @@
|
|||||||
c.widgets.splice( indx, 1 );
|
c.widgets.splice( indx, 1 );
|
||||||
}
|
}
|
||||||
if ( widget && widget.remove ) {
|
if ( widget && widget.remove ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( ( refreshing ? 'Refreshing' : 'Removing' ) + ' "' + name[ index ] + '" widget' );
|
console.log( ( refreshing ? 'Refreshing' : 'Removing' ) + ' "' + name[ index ] + '" widget' );
|
||||||
}
|
}
|
||||||
widget.remove( table, c, c.widgetOptions, refreshing );
|
widget.remove( table, c, c.widgetOptions, refreshing );
|
||||||
@ -2200,6 +2204,12 @@
|
|||||||
log : function() {
|
log : function() {
|
||||||
console.log( arguments );
|
console.log( arguments );
|
||||||
},
|
},
|
||||||
|
debug : function(c, name) {
|
||||||
|
return c && (
|
||||||
|
c.debug === true ||
|
||||||
|
typeof c.debug === 'string' && c.debug.indexOf(name) > -1
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
// $.isEmptyObject from jQuery v1.4
|
// $.isEmptyObject from jQuery v1.4
|
||||||
isEmptyObject : function( obj ) {
|
isEmptyObject : function( obj ) {
|
||||||
@ -2505,7 +2515,7 @@
|
|||||||
ignore = 'headers sortForce sortList sortAppend widgets'.split( ' ' ),
|
ignore = 'headers sortForce sortList sortAppend widgets'.split( ' ' ),
|
||||||
orig = c.originalSettings;
|
orig = c.originalSettings;
|
||||||
if ( orig ) {
|
if ( orig ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
timer = new Date();
|
timer = new Date();
|
||||||
}
|
}
|
||||||
for ( setting in orig ) {
|
for ( setting in orig ) {
|
||||||
@ -2521,7 +2531,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'validate options time:' + ts.benchmark( timer ) );
|
console.log( 'validate options time:' + ts.benchmark( timer ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2552,7 +2562,6 @@
|
|||||||
var events,
|
var events,
|
||||||
$t = $( table ),
|
$t = $( table ),
|
||||||
c = table.config,
|
c = table.config,
|
||||||
debug = c.debug,
|
|
||||||
$h = $t.find( 'thead:first' ),
|
$h = $t.find( 'thead:first' ),
|
||||||
$r = $h.find( 'tr.' + ts.css.headerRow ).removeClass( ts.css.headerRow + ' ' + c.cssHeaderRow ),
|
$r = $h.find( 'tr.' + ts.css.headerRow ).removeClass( ts.css.headerRow + ' ' + c.cssHeaderRow ),
|
||||||
$f = $t.find( 'tfoot:first > tr' ).children( 'th, td' );
|
$f = $t.find( 'tfoot:first > tr' ).children( 'th, td' );
|
||||||
@ -2590,7 +2599,7 @@
|
|||||||
if ( typeof callback === 'function' ) {
|
if ( typeof callback === 'function' ) {
|
||||||
callback( table );
|
callback( table );
|
||||||
}
|
}
|
||||||
if ( debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'tablesorter has been removed' );
|
console.log( 'tablesorter has been removed' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2707,7 +2716,7 @@
|
|||||||
is : function( str ) {
|
is : function( str ) {
|
||||||
return ts.regex.isoDate.test( str );
|
return ts.regex.isoDate.test( str );
|
||||||
},
|
},
|
||||||
format : function( str, table ) {
|
format : function( str ) {
|
||||||
var date = str ? new Date( str.replace( ts.regex.dash, '/' ) ) : str;
|
var date = str ? new Date( str.replace( ts.regex.dash, '/' ) ) : str;
|
||||||
return date instanceof Date && isFinite( date ) ? date.getTime() : str;
|
return date instanceof Date && isFinite( date ) ? date.getTime() : str;
|
||||||
},
|
},
|
||||||
@ -2750,7 +2759,7 @@
|
|||||||
// Jan 01, 2013 12:34:56 PM or 01 Jan 2013
|
// Jan 01, 2013 12:34:56 PM or 01 Jan 2013
|
||||||
return ts.regex.usLongDateTest1.test( str ) || ts.regex.usLongDateTest2.test( str );
|
return ts.regex.usLongDateTest1.test( str ) || ts.regex.usLongDateTest2.test( str );
|
||||||
},
|
},
|
||||||
format : function( str, table ) {
|
format : function( str ) {
|
||||||
var date = str ? new Date( str.replace( ts.regex.dateReplace, '$1 $2' ) ) : str;
|
var date = str ? new Date( str.replace( ts.regex.dateReplace, '$1 $2' ) ) : str;
|
||||||
return date instanceof Date && isFinite( date ) ? date.getTime() : str;
|
return date instanceof Date && isFinite( date ) ? date.getTime() : str;
|
||||||
},
|
},
|
||||||
@ -2811,7 +2820,7 @@
|
|||||||
is : function( str ) {
|
is : function( str ) {
|
||||||
return ts.regex.timeTest.test( str );
|
return ts.regex.timeTest.test( str );
|
||||||
},
|
},
|
||||||
format : function( str, table ) {
|
format : function( str ) {
|
||||||
// isolate time... ignore month, day and year
|
// isolate time... ignore month, day and year
|
||||||
var temp,
|
var temp,
|
||||||
timePart = ( str || '' ).match( ts.regex.timeMatch ),
|
timePart = ( str || '' ).match( ts.regex.timeMatch ),
|
||||||
|
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
83
dist/js/jquery.tablesorter.widgets.js
vendored
83
dist/js/jquery.tablesorter.widgets.js
vendored
@ -1,4 +1,4 @@
|
|||||||
/*! tablesorter (FORK) - updated 2018-02-25 (v2.29.6)*/
|
/*! tablesorter (FORK) - updated 2018-03-18 (v2.30.0)*/
|
||||||
/* 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) {
|
||||||
|
|
||||||
/*! Widget: storage - updated 4/18/2017 (v2.28.8) */
|
/*! Widget: storage - updated 2018-03-18 (v2.30.0) */
|
||||||
/*global JSON:false */
|
/*global JSON:false */
|
||||||
;(function ($, window, document) {
|
;(function ($, window, document) {
|
||||||
'use strict';
|
'use strict';
|
||||||
@ -56,6 +56,7 @@
|
|||||||
values = {},
|
values = {},
|
||||||
c = table.config,
|
c = table.config,
|
||||||
wo = c && c.widgetOptions,
|
wo = c && c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'storage'),
|
||||||
storageType = (
|
storageType = (
|
||||||
( options && options.storageType ) || ( wo && wo.storage_storageType )
|
( options && options.storageType ) || ( wo && wo.storage_storageType )
|
||||||
).toString().charAt(0).toLowerCase(),
|
).toString().charAt(0).toLowerCase(),
|
||||||
@ -84,14 +85,12 @@
|
|||||||
hasStorage = true;
|
hasStorage = true;
|
||||||
window[storageType].removeItem('_tmptest');
|
window[storageType].removeItem('_tmptest');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (c && c.debug) {
|
|
||||||
console.warn( storageType + ' is not supported in this browser' );
|
console.warn( storageType + ' is not supported in this browser' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (debug) {
|
||||||
if (c.debug) {
|
console.log('Storage >> Using', hasStorage ? storageType : 'cookies');
|
||||||
console.log('Storage widget using', hasStorage ? storageType : 'cookies');
|
|
||||||
}
|
}
|
||||||
// *** get value ***
|
// *** get value ***
|
||||||
if ($.parseJSON) {
|
if ($.parseJSON) {
|
||||||
@ -127,7 +126,7 @@
|
|||||||
|
|
||||||
})(jQuery, window, document);
|
})(jQuery, window, document);
|
||||||
|
|
||||||
/*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
|
/*! Widget: uitheme - updated 2018-03-18 (v2.30.0) */
|
||||||
;(function ($) {
|
;(function ($) {
|
||||||
'use strict';
|
'use strict';
|
||||||
var ts = $.tablesorter || {};
|
var ts = $.tablesorter || {};
|
||||||
@ -192,8 +191,9 @@
|
|||||||
theme = c.theme || 'jui',
|
theme = c.theme || 'jui',
|
||||||
themes = themesAll[theme] || {},
|
themes = themesAll[theme] || {},
|
||||||
remove = $.trim( [ themes.sortNone, themes.sortDesc, themes.sortAsc, themes.active ].join( ' ' ) ),
|
remove = $.trim( [ themes.sortNone, themes.sortDesc, themes.sortAsc, themes.active ].join( ' ' ) ),
|
||||||
iconRmv = $.trim( [ themes.iconSortNone, themes.iconSortDesc, themes.iconSortAsc ].join( ' ' ) );
|
iconRmv = $.trim( [ themes.iconSortNone, themes.iconSortDesc, themes.iconSortAsc ].join( ' ' ) ),
|
||||||
if (c.debug) { time = new Date(); }
|
debug = ts.debug(c, 'uitheme');
|
||||||
|
if (debug) { time = new Date(); }
|
||||||
// initialization code - run once
|
// initialization code - run once
|
||||||
if (!$table.hasClass('tablesorter-' + theme) || c.theme !== c.appliedTheme || !wo.uitheme_applied) {
|
if (!$table.hasClass('tablesorter-' + theme) || c.theme !== c.appliedTheme || !wo.uitheme_applied) {
|
||||||
wo.uitheme_applied = true;
|
wo.uitheme_applied = true;
|
||||||
@ -296,8 +296,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('Applying ' + theme + ' theme' + ts.benchmark(time));
|
console.log('uitheme >> Applied ' + theme + ' theme' + ts.benchmark(time));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove: function(table, c, wo, refreshing) {
|
remove: function(table, c, wo, refreshing) {
|
||||||
@ -402,7 +402,7 @@
|
|||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
/*! Widget: filter - updated 2018-01-30 (v2.29.5) *//*
|
/*! Widget: filter - updated 2018-03-18 (v2.30.0) *//*
|
||||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -684,6 +684,7 @@
|
|||||||
if ( tsfRegex.exact.test( data.iFilter ) ) {
|
if ( tsfRegex.exact.test( data.iFilter ) ) {
|
||||||
var txt = data.iFilter.replace( tsfRegex.exact, '' ),
|
var txt = data.iFilter.replace( tsfRegex.exact, '' ),
|
||||||
filter = tsf.parseFilter( c, txt, data ) || '';
|
filter = tsf.parseFilter( c, txt, data ) || '';
|
||||||
|
// eslint-disable-next-line eqeqeq
|
||||||
return data.anyMatch ? $.inArray( filter, data.rowArray ) >= 0 : filter == data.iExact;
|
return data.anyMatch ? $.inArray( filter, data.rowArray ) >= 0 : filter == data.iExact;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@ -951,7 +952,7 @@
|
|||||||
|
|
||||||
// show processing icon
|
// show processing icon
|
||||||
if ( c.showProcessing ) {
|
if ( c.showProcessing ) {
|
||||||
txt = 'filterStart filterEnd '.split( ' ' ).join( c.namespace + 'filter ' );
|
txt = 'filterStart filterEnd '.split( ' ' ).join( c.namespace + 'filter-sp ' );
|
||||||
c.$table
|
c.$table
|
||||||
.unbind( txt.replace( ts.regex.spaces, ' ' ) )
|
.unbind( txt.replace( ts.regex.spaces, ' ' ) )
|
||||||
.bind( txt, function( event, columns ) {
|
.bind( txt, function( event, columns ) {
|
||||||
@ -1030,6 +1031,9 @@
|
|||||||
c.lastSearch = c.$table.data( 'lastSearch' );
|
c.lastSearch = c.$table.data( 'lastSearch' );
|
||||||
c.$table.triggerHandler( 'filterInit', c );
|
c.$table.triggerHandler( 'filterInit', c );
|
||||||
tsf.findRows( c.table, c.lastSearch || [] );
|
tsf.findRows( c.table, c.lastSearch || [] );
|
||||||
|
if (ts.debug(c, 'filter')) {
|
||||||
|
console.log('Filter >> Widget initialized');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
if ( $.isEmptyObject( wo.filter_formatter ) ) {
|
if ( $.isEmptyObject( wo.filter_formatter ) ) {
|
||||||
completed();
|
completed();
|
||||||
@ -1730,6 +1734,7 @@
|
|||||||
storedFilters = $.extend( [], filters ),
|
storedFilters = $.extend( [], filters ),
|
||||||
c = table.config,
|
c = table.config,
|
||||||
wo = c.widgetOptions,
|
wo = c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'filter'),
|
||||||
// data object passed to filters; anyMatch is a flag for the filters
|
// data object passed to filters; anyMatch is a flag for the filters
|
||||||
data = {
|
data = {
|
||||||
anyMatch: false,
|
anyMatch: false,
|
||||||
@ -1746,7 +1751,6 @@
|
|||||||
defaultColFilter : [],
|
defaultColFilter : [],
|
||||||
defaultAnyFilter : ts.getColumnData( table, wo.filter_defaultFilter, c.columns, true ) || ''
|
defaultAnyFilter : ts.getColumnData( table, wo.filter_defaultFilter, c.columns, true ) || ''
|
||||||
};
|
};
|
||||||
|
|
||||||
// parse columns after formatter, in case the class is added at that point
|
// parse columns after formatter, in case the class is added at that point
|
||||||
data.parsed = [];
|
data.parsed = [];
|
||||||
for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
|
for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
|
||||||
@ -1768,8 +1772,8 @@
|
|||||||
( ts.getColumnData( table, wo.filter_excludeFilter, columnIndex, true ) || '' ).split( /\s+/ );
|
( ts.getColumnData( table, wo.filter_excludeFilter, columnIndex, true ) || '' ).split( /\s+/ );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Filter: Starting filter widget search', filters );
|
console.log( 'Filter >> Starting filter widget search', filters );
|
||||||
time = new Date();
|
time = new Date();
|
||||||
}
|
}
|
||||||
// filtered rows count
|
// filtered rows count
|
||||||
@ -1867,8 +1871,8 @@
|
|||||||
notFiltered = $rows.not( '.' + wo.filter_filteredRow ).length;
|
notFiltered = $rows.not( '.' + wo.filter_filteredRow ).length;
|
||||||
// can't search when all rows are hidden - this happens when looking for exact matches
|
// can't search when all rows are hidden - this happens when looking for exact matches
|
||||||
if ( searchFiltered && notFiltered === 0 ) { searchFiltered = false; }
|
if ( searchFiltered && notFiltered === 0 ) { searchFiltered = false; }
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Filter: Searching through ' +
|
console.log( 'Filter >> Searching through ' +
|
||||||
( searchFiltered && notFiltered < len ? notFiltered : 'all' ) + ' rows' );
|
( searchFiltered && notFiltered < len ? notFiltered : 'all' ) + ' rows' );
|
||||||
}
|
}
|
||||||
if ( data.anyMatchFlag ) {
|
if ( data.anyMatchFlag ) {
|
||||||
@ -1971,8 +1975,8 @@
|
|||||||
if ( wo.filter_saveFilters && ts.storage ) {
|
if ( wo.filter_saveFilters && ts.storage ) {
|
||||||
ts.storage( table, 'tablesorter-filters', tsf.processFilters( storedFilters, true ) );
|
ts.storage( table, 'tablesorter-filters', tsf.processFilters( storedFilters, true ) );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Completed filter widget search' + ts.benchmark(time) );
|
console.log( 'Filter >> Completed search' + ts.benchmark(time) );
|
||||||
}
|
}
|
||||||
if ( wo.filter_initialized ) {
|
if ( wo.filter_initialized ) {
|
||||||
c.$table.triggerHandler( 'filterBeforeEnd', c );
|
c.$table.triggerHandler( 'filterBeforeEnd', c );
|
||||||
@ -2187,13 +2191,13 @@
|
|||||||
options += '<option';
|
options += '<option';
|
||||||
for ( val in option ) {
|
for ( val in option ) {
|
||||||
if ( option.hasOwnProperty( val ) && val !== 'text' ) {
|
if ( option.hasOwnProperty( val ) && val !== 'text' ) {
|
||||||
options += ' ' + val + '="' + option[ val ] + '"';
|
options += ' ' + val + '="' + option[ val ].replace( tsfRegex.quote, '"' ) + '"';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( !option.value ) {
|
if ( !option.value ) {
|
||||||
options += ' value="' + option.text + '"';
|
options += ' value="' + option.text.replace( tsfRegex.quote, '"' ) + '"';
|
||||||
}
|
}
|
||||||
options += '>' + option.text + '</option>';
|
options += '>' + option.text.replace( tsfRegex.quote, '"' ) + '</option>';
|
||||||
// above code is needed in jQuery < v1.8
|
// above code is needed in jQuery < v1.8
|
||||||
|
|
||||||
// make sure we don't turn an object into a string (objects without a "text" property)
|
// make sure we don't turn an object into a string (objects without a "text" property)
|
||||||
@ -3095,7 +3099,7 @@
|
|||||||
|
|
||||||
})( jQuery, window );
|
})( jQuery, window );
|
||||||
|
|
||||||
/*! Widget: saveSort - updated 10/31/2015 (v2.24.0) *//*
|
/*! Widget: saveSort - updated 2018-03-18 (v2.30.0) *//*
|
||||||
* Requires tablesorter v2.16+
|
* Requires tablesorter v2.16+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -3103,6 +3107,15 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
var ts = $.tablesorter || {};
|
var ts = $.tablesorter || {};
|
||||||
|
|
||||||
|
function getStoredSortList(c) {
|
||||||
|
var stored = ts.storage( c.table, 'tablesorter-savesort' );
|
||||||
|
return (stored && stored.hasOwnProperty('sortList') && $.isArray(stored.sortList)) ? stored.sortList : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function sortListChanged(c, sortList) {
|
||||||
|
return (sortList || getStoredSortList(c)).join(',') !== c.sortList.join(',');
|
||||||
|
}
|
||||||
|
|
||||||
// this widget saves the last sort only if the
|
// this widget saves the last sort only if the
|
||||||
// saveSort widget option is true AND the
|
// saveSort widget option is true AND the
|
||||||
// $.tablesorter.storage function is included
|
// $.tablesorter.storage function is included
|
||||||
@ -3118,18 +3131,19 @@
|
|||||||
thisWidget.format(table, c, wo, true);
|
thisWidget.format(table, c, wo, true);
|
||||||
},
|
},
|
||||||
format: function(table, c, wo, init) {
|
format: function(table, c, wo, init) {
|
||||||
var stored, time,
|
var time,
|
||||||
$table = c.$table,
|
$table = c.$table,
|
||||||
saveSort = wo.saveSort !== false, // make saveSort active/inactive; default to true
|
saveSort = wo.saveSort !== false, // make saveSort active/inactive; default to true
|
||||||
sortList = { 'sortList' : c.sortList };
|
sortList = { 'sortList' : c.sortList },
|
||||||
if (c.debug) {
|
debug = ts.debug(c, 'saveSort');
|
||||||
|
if (debug) {
|
||||||
time = new Date();
|
time = new Date();
|
||||||
}
|
}
|
||||||
if ($table.hasClass('hasSaveSort')) {
|
if ($table.hasClass('hasSaveSort')) {
|
||||||
if (saveSort && table.hasInitialized && ts.storage) {
|
if (saveSort && table.hasInitialized && ts.storage && sortListChanged(c)) {
|
||||||
ts.storage( table, 'tablesorter-savesort', sortList );
|
ts.storage( table, 'tablesorter-savesort', sortList );
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('saveSort widget: Saving last sort: ' + c.sortList + ts.benchmark(time));
|
console.log('saveSort >> Saving last sort: ' + c.sortList + ts.benchmark(time));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -3138,10 +3152,9 @@
|
|||||||
sortList = '';
|
sortList = '';
|
||||||
// get data
|
// get data
|
||||||
if (ts.storage) {
|
if (ts.storage) {
|
||||||
stored = ts.storage( table, 'tablesorter-savesort' );
|
sortList = getStoredSortList(c);
|
||||||
sortList = (stored && stored.hasOwnProperty('sortList') && $.isArray(stored.sortList)) ? stored.sortList : '';
|
if (debug) {
|
||||||
if (c.debug) {
|
console.log('saveSort >> Last sort loaded: "' + sortList + '"' + ts.benchmark(time));
|
||||||
console.log('saveSort: Last sort loaded: "' + sortList + '"' + ts.benchmark(time));
|
|
||||||
}
|
}
|
||||||
$table.bind('saveSortReset', function(event) {
|
$table.bind('saveSortReset', function(event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
@ -3154,9 +3167,11 @@
|
|||||||
c.sortList = sortList;
|
c.sortList = sortList;
|
||||||
} else if (table.hasInitialized && sortList && sortList.length > 0) {
|
} else if (table.hasInitialized && sortList && sortList.length > 0) {
|
||||||
// update sort change
|
// update sort change
|
||||||
|
if (sortListChanged(c, sortList)) {
|
||||||
ts.sortOn(c, sortList);
|
ts.sortOn(c, sortList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
remove: function(table, c) {
|
remove: function(table, c) {
|
||||||
c.$table.removeClass('hasSaveSort');
|
c.$table.removeClass('hasSaveSort');
|
||||||
|
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-network.min.js
vendored
2
dist/js/parsers/parser-network.min.js
vendored
@ -1,5 +1,5 @@
|
|||||||
/*! Parser: network - updated 2018-01-10 (v2.29.3) */
|
/*! Parser: network - updated 2018-01-10 (v2.29.3) */
|
||||||
!function(d){"use strict";var e,t,a=d.tablesorter;/*! IPv6 Address parser (WIP) */
|
!function(d){"use strict";var e,t,a=d.tablesorter;/*! IPv6 Address parser (WIP) */
|
||||||
d.extend(a.regex,{},{ipv4Validate:/((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})/,ipv4Extract:/([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/,ipv6Validate:/^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/i}),a.defaults.ipv6HexFormat=!1,a.addParser({id:"ipv6Address",is:function(d){return a.regex.ipv6Validate.test(d)},format:function(d,e){var t,r,i,f,s,n=!!e&&("boolean"==typeof e?e:e&&e.config.ipv6HexFormat||!1),p="",o="";if(d=d.replace(/\s*/g,""),a.regex.ipv4Validate.test(d)){for(f=d.match(a.regex.ipv4Extract),r="",t=1;t<f.length;t++)r+=("00"+parseInt(f[t],10).toString(16)).slice(-2)+(2===t?":":"");d=d.replace(a.regex.ipv4Extract,r)}if(-1==d.indexOf("::"))p=d;else{for(i=d.split("::"),s=0,t=0;t<i.length;t++)s+=i[t].split(":").length;for(p+=i[0]+":",t=0;t<8-s;t++)p+="0000:";p+=i[1]}for(f=p.split(":"),t=0;t<8;t++)f[t]=n?("0000"+f[t]).slice(-4):("00000"+(parseInt(f[t],16)||0)).slice(-5),o+=7!=t?f[t]+":":f[t];return o},type:"text"}),t=function(d){return/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(d)},e=function(d){var e,t=d?d.split("."):"",a=[],r=t.length;for(e=0;e<r;e++)a.push(("000"+t[e]).slice(-3));return d?a.join("."):d},/*! Parser: ipv4Address (a.k.a. ipAddress) */
|
d.extend(a.regex,{},{ipv4Validate:/((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})/,ipv4Extract:/([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})/,ipv6Validate:/^\s*((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/i}),a.defaults.ipv6HexFormat=!1,a.addParser({id:"ipv6Address",is:function(d){return a.regex.ipv6Validate.test(d)},format:function(d,e){var t,r,i,f,s,n=!!e&&("boolean"==typeof e?e:e&&e.config.ipv6HexFormat||!1),p="",o="";if(d=d.replace(/\s*/g,""),a.regex.ipv4Validate.test(d)){for(f=d.match(a.regex.ipv4Extract),r="",t=1;t<f.length;t++)r+=("00"+parseInt(f[t],10).toString(16)).slice(-2)+(2===t?":":"");d=d.replace(a.regex.ipv4Extract,r)}if(-1===d.indexOf("::"))p=d;else{for(i=d.split("::"),s=0,t=0;t<i.length;t++)s+=i[t].split(":").length;for(p+=i[0]+":",t=0;t<8-s;t++)p+="0000:";p+=i[1]}for(f=p.split(":"),t=0;t<8;t++)f[t]=n?("0000"+f[t]).slice(-4):("00000"+(parseInt(f[t],16)||0)).slice(-5),o+=7!==t?f[t]+":":f[t];return o},type:"text"}),t=function(d){return/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(d)},e=function(d){var e,t=d?d.split("."):"",a=[],r=t.length;for(e=0;e<r;e++)a.push(("000"+t[e]).slice(-3));return d?a.join("."):d},/*! Parser: ipv4Address (a.k.a. ipAddress) */
|
||||||
a.addParser({id:"ipAddress",is:t,format:e,type:"text"}),a.addParser({id:"ipv4Address",is:t,format:e,type:"text"}),/*! Parser: MAC address */
|
a.addParser({id:"ipAddress",is:t,format:e,type:"text"}),a.addParser({id:"ipv4Address",is:t,format:e,type:"text"}),/*! Parser: MAC address */
|
||||||
a.addParser({id:"MAC",is:function(){return!1},format:function(d){var e,t,a=[],r=(d||"").replace(/[:.-]/g,"").match(/\w{2}/g);if(r){for(t=r.length,e=0;e<t;e++)a.push(("000"+parseInt(r[e],16)).slice(-3));return a.join(".")}return d},type:"text"})}(jQuery);
|
a.addParser({id:"MAC",is:function(){return!1},format:function(d){var e,t,a=[],r=(d||"").replace(/[:.-]/g,"").match(/\w{2}/g);if(r){for(t=r.length,e=0;e<t;e++)a.push(("000"+parseInt(r[e],16)).slice(-3));return a.join(".")}return d},type:"text"})}(jQuery);
|
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) */
|
/*! 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=/\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);
|
!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){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);
|
4
dist/js/widgets/widget-build-table.min.js
vendored
4
dist/js/widgets/widget-build-table.min.js
vendored
File diff suppressed because one or more lines are too long
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
4
dist/js/widgets/widget-filter.min.js
vendored
4
dist/js/widgets/widget-filter.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/widgets/widget-grouping.min.js
vendored
2
dist/js/widgets/widget-grouping.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/js/widgets/widget-lazyload.min.js
vendored
4
dist/js/widgets/widget-lazyload.min.js
vendored
@ -1,5 +1,5 @@
|
|||||||
/*! Widget: lazyload (BETA) - 4/1/2016 (v2.25.7) */
|
/*! Widget: lazyload (BETA) - 4/1/2016 (v2.25.7) */
|
||||||
!function(t,e){"use strict";var o=t.tablesorter;o.lazyload={init:function(l,a){"scrollstop"!==a.lazyload_event||o.addScrollStopDone||(o.addScrollStop(),o.addScrollStopDone=!0,t.event.special.scrollstop.latency=a.lazyload_latency||250),o.lazyload.update(l,a);var i=l.namespace+"lazyload ",n=[a.lazyload_update,"pagerUpdate",a.columnSelector_updated||"columnUpdate",""].join(i);l.$table.on(n,function(){o.lazyload.update(l,l.widgetOptions)}).on("filterEnd"+i,function(){t(e).scroll()})},update:function(o,l){var a=(/(\.|#)/.test(l.lazyload_imageClass)?"":".")+l.lazyload_imageClass;o.$table.find(a).lazyload({threshold:l.lazyload_threshold,failure_limit:l.lazyload_failure_limit,event:l.lazyload_event,effect:l.lazyload_effect,container:l.lazyload_container,data_attribute:l.lazyload_data_attribute,skip_invisible:l.lazyload_skip_invisible,appear:l.lazyload_appear,load:l.lazyload_load,placeholder:l.lazyload_placeholder}),setTimeout(function(){t(e).scroll()},1)},remove:function(t,e){t.$table.off(t.namespace+"lazyload")}},o.addWidget({id:"lazyload",options:{lazyload_imageClass:"lazy",lazyload_update:"lazyloadUpdate",lazyload_latency:250,lazyload_threshold:0,lazyload_failure_limit:0,lazyload_event:"scrollstop",lazyload_effect:"show",lazyload_container:e,lazyload_data_attribute:"original",lazyload_skip_invisible:!0,lazyload_appear:null,lazyload_load:null,lazyload_placeholder:"data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="},init:function(t,e,l,a){o.lazyload.init(l,a)},remove:function(t,e,l){o.lazyload.remove(e,l)}}),o.addScrollStop=function(){var e=t.event.dispatch||t.event.handle,o=t.event.special,l="D"+ +new Date,a="D"+(+new Date+1);o.scrollstart={setup:function(a){var i,n=t.extend({latency:o.scrollstop.latency},a),r=function(t){var o=this,l=arguments;i?clearTimeout(i):(t.type="scrollstart",e.apply(o,l)),i=setTimeout(function(){i=null},n.latency)};t(this).bind("scroll",r).data(l,r)},teardown:function(){t(this).unbind("scroll",t(this).data(l))}},o.scrollstop={latency:250,setup:function(l){var i,n=t.extend({latency:o.scrollstop.latency},l),r=function(t){var o=this,l=arguments;i&&clearTimeout(i),i=setTimeout(function(){i=null,t.type="scrollstop",e.apply(o,l)},n.latency)};t(this).bind("scroll",r).data(a,r)},teardown:function(){t(this).unbind("scroll",t(this).data(a))}}}}(jQuery,window),/*!
|
!function(t,e){"use strict";var o=t.tablesorter;o.lazyload={init:function(l,a){"scrollstop"!==a.lazyload_event||o.addScrollStopDone||(o.addScrollStop(),o.addScrollStopDone=!0,t.event.special.scrollstop.latency=a.lazyload_latency||250),o.lazyload.update(l,a);var i=l.namespace+"lazyload ",n=[a.lazyload_update,"pagerUpdate",a.columnSelector_updated||"columnUpdate",""].join(i);l.$table.on(n,function(){o.lazyload.update(l,l.widgetOptions)}).on("filterEnd"+i,function(){t(e).scroll()})},update:function(o,l){var a=(/(\.|#)/.test(l.lazyload_imageClass)?"":".")+l.lazyload_imageClass;o.$table.find(a).lazyload({threshold:l.lazyload_threshold,failure_limit:l.lazyload_failure_limit,event:l.lazyload_event,effect:l.lazyload_effect,container:l.lazyload_container,data_attribute:l.lazyload_data_attribute,skip_invisible:l.lazyload_skip_invisible,appear:l.lazyload_appear,load:l.lazyload_load,placeholder:l.lazyload_placeholder}),setTimeout(function(){t(e).scroll()},1)},remove:function(t){t.$table.off(t.namespace+"lazyload")}},o.addWidget({id:"lazyload",options:{lazyload_imageClass:"lazy",lazyload_update:"lazyloadUpdate",lazyload_latency:250,lazyload_threshold:0,lazyload_failure_limit:0,lazyload_event:"scrollstop",lazyload_effect:"show",lazyload_container:e,lazyload_data_attribute:"original",lazyload_skip_invisible:!0,lazyload_appear:null,lazyload_load:null,lazyload_placeholder:"data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="},init:function(t,e,l,a){o.lazyload.init(l,a)},remove:function(t,e,l){o.lazyload.remove(e,l)}}),o.addScrollStop=function(){var e=t.event.dispatch||t.event.handle,o=t.event.special,l="D"+ +new Date,a="D"+(+new Date+1);o.scrollstart={setup:function(a){var i,n=t.extend({latency:o.scrollstop.latency},a),r=function(t){var o=this,l=arguments;i?clearTimeout(i):(t.type="scrollstart",e.apply(o,l)),i=setTimeout(function(){i=null},n.latency)};t(this).bind("scroll",r).data(l,r)},teardown:function(){t(this).unbind("scroll",t(this).data(l))}},o.scrollstop={latency:250,setup:function(l){var i,n=t.extend({latency:o.scrollstop.latency},l),r=function(t){var o=this,l=arguments;i&&clearTimeout(i),i=setTimeout(function(){i=null,t.type="scrollstop",e.apply(o,l)},n.latency)};t(this).bind("scroll",r).data(a,r)},teardown:function(){t(this).unbind("scroll",t(this).data(a))}}}}(jQuery,window),/*!
|
||||||
* Lazy Load - jQuery plugin for lazy loading images
|
* Lazy Load - jQuery plugin for lazy loading images
|
||||||
*
|
*
|
||||||
* Copyright (c) 2007-2015 Mika Tuupola
|
* Copyright (c) 2007-2015 Mika Tuupola
|
||||||
@ -27,4 +27,4 @@ function(t,e,o,l){var a=t(e);t.fn.lazyload=function(l){function i(){var e=0;r.ea
|
|||||||
* Version: 1.9.7
|
* Version: 1.9.7
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
return l&&(void 0!==l.failurelimit&&(l.failure_limit=l.failurelimit,delete l.failurelimit),void 0!==l.effectspeed&&(l.effect_speed=l.effectspeed,delete l.effectspeed),t.extend(d,l)),n=void 0===d.container||d.container===e?a:t(d.container),0===d.event.indexOf("scroll")&&n.bind(d.event,function(){return i()}),this.each(function(){var e=this,o=t(e);e.loaded=!1,void 0!==o.attr("src")&&!1!==o.attr("src")||o.is("img")&&o.attr("src",d.placeholder),o.one("appear",function(){if(!this.loaded){if(d.appear){var l=r.length;d.appear.call(e,l,d)}t("<img />").bind("load",function(){var l=o.attr("data-"+d.data_attribute);o.hide(),o.is("img")?o.attr("src",l):o.css("background-image","url('"+l+"')"),o[d.effect](d.effect_speed),e.loaded=!0;var a=t.grep(r,function(t){return!t.loaded});if(r=t(a),d.load){var i=r.length;d.load.call(e,i,d)}}).attr("src",o.attr("data-"+d.data_attribute))}}),0!==d.event.indexOf("scroll")&&o.bind(d.event,function(){e.loaded||o.trigger("appear")})}),a.bind("resize",function(){i()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&a.bind("pageshow",function(e){e.originalEvent&&e.originalEvent.persisted&&r.each(function(){t(this).trigger("appear")})}),t(o).ready(function(){i()}),this},t.belowthefold=function(o,l){return(void 0===l.container||l.container===e?(e.innerHeight?e.innerHeight:a.height())+a.scrollTop():t(l.container).offset().top+t(l.container).height())<=t(o).offset().top-l.threshold},t.rightoffold=function(o,l){return(void 0===l.container||l.container===e?a.width()+a.scrollLeft():t(l.container).offset().left+t(l.container).width())<=t(o).offset().left-l.threshold},t.abovethetop=function(o,l){return(void 0===l.container||l.container===e?a.scrollTop():t(l.container).offset().top)>=t(o).offset().top+l.threshold+t(o).height()},t.leftofbegin=function(o,l){return(void 0===l.container||l.container===e?a.scrollLeft():t(l.container).offset().left)>=t(o).offset().left+l.threshold+t(o).width()},t.inviewport=function(e,o){return!(t.rightoffold(e,o)||t.leftofbegin(e,o)||t.belowthefold(e,o)||t.abovethetop(e,o))},t.extend(t.expr[":"],{"below-the-fold":function(e){return t.belowthefold(e,{threshold:0})},"above-the-top":function(e){return!t.belowthefold(e,{threshold:0})},"right-of-screen":function(e){return t.rightoffold(e,{threshold:0})},"left-of-screen":function(e){return!t.rightoffold(e,{threshold:0})},"in-viewport":function(e){return t.inviewport(e,{threshold:0})},"above-the-fold":function(e){return!t.belowthefold(e,{threshold:0})},"right-of-fold":function(e){return t.rightoffold(e,{threshold:0})},"left-of-fold":function(e){return!t.rightoffold(e,{threshold:0})}})}(jQuery,window,document);
|
return l&&(void 0!==l.failurelimit&&(l.failure_limit=l.failurelimit,delete l.failurelimit),void 0!==l.effectspeed&&(l.effect_speed=l.effectspeed,delete l.effectspeed),t.extend(d,l)),n=void 0===d.container||d.container===e?a:t(d.container),0===d.event.indexOf("scroll")&&n.bind(d.event,function(){return i()}),this.each(function(){var e=this,o=t(e);e.loaded=!1,void 0!==o.attr("src")&&!1!==o.attr("src")||o.is("img")&&o.attr("src",d.placeholder),o.one("appear",function(){if(!this.loaded){if(d.appear){var l=r.length;d.appear.call(e,l,d)}t("<img />").bind("load",function(){var l=o.attr("data-"+d.data_attribute);o.hide(),o.is("img")?o.attr("src",l):o.css("background-image",'url("'+l+'")'),o[d.effect](d.effect_speed),e.loaded=!0;var a=t.grep(r,function(t){return!t.loaded});if(r=t(a),d.load){var i=r.length;d.load.call(e,i,d)}}).attr("src",o.attr("data-"+d.data_attribute))}}),0!==d.event.indexOf("scroll")&&o.bind(d.event,function(){e.loaded||o.trigger("appear")})}),a.bind("resize",function(){i()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&a.bind("pageshow",function(e){e.originalEvent&&e.originalEvent.persisted&&r.each(function(){t(this).trigger("appear")})}),t(o).ready(function(){i()}),this},t.belowthefold=function(o,l){return(void 0===l.container||l.container===e?(e.innerHeight?e.innerHeight:a.height())+a.scrollTop():t(l.container).offset().top+t(l.container).height())<=t(o).offset().top-l.threshold},t.rightoffold=function(o,l){return(void 0===l.container||l.container===e?a.width()+a.scrollLeft():t(l.container).offset().left+t(l.container).width())<=t(o).offset().left-l.threshold},t.abovethetop=function(o,l){return(void 0===l.container||l.container===e?a.scrollTop():t(l.container).offset().top)>=t(o).offset().top+l.threshold+t(o).height()},t.leftofbegin=function(o,l){return(void 0===l.container||l.container===e?a.scrollLeft():t(l.container).offset().left)>=t(o).offset().left+l.threshold+t(o).width()},t.inviewport=function(e,o){return!(t.rightoffold(e,o)||t.leftofbegin(e,o)||t.belowthefold(e,o)||t.abovethetop(e,o))},t.extend(t.expr[":"],{"below-the-fold":function(e){return t.belowthefold(e,{threshold:0})},"above-the-top":function(e){return!t.belowthefold(e,{threshold:0})},"right-of-screen":function(e){return t.rightoffold(e,{threshold:0})},"left-of-screen":function(e){return!t.rightoffold(e,{threshold:0})},"in-viewport":function(e){return t.inviewport(e,{threshold:0})},"above-the-fold":function(e){return!t.belowthefold(e,{threshold:0})},"right-of-fold":function(e){return t.rightoffold(e,{threshold:0})},"left-of-fold":function(e){return!t.rightoffold(e,{threshold:0})}})}(jQuery,window,document);
|
2
dist/js/widgets/widget-math.min.js
vendored
2
dist/js/widgets/widget-math.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/widgets/widget-output.min.js
vendored
2
dist/js/widgets/widget-output.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/js/widgets/widget-pager.min.js
vendored
4
dist/js/widgets/widget-pager.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/js/widgets/widget-saveSort.min.js
vendored
4
dist/js/widgets/widget-saveSort.min.js
vendored
@ -1,2 +1,2 @@
|
|||||||
/*! Widget: saveSort - updated 10/31/2015 (v2.24.0) */
|
/*! Widget: saveSort - updated 2018-03-18 (v2.30.0) */
|
||||||
!function(t){"use strict";var s=t.tablesorter||{};s.addWidget({id:"saveSort",priority:20,options:{saveSort:!0},init:function(t,s,o,e){s.format(t,o,e,!0)},format:function(o,e,r,a){var i,n,l=e.$table,g=!1!==r.saveSort,v={sortList:e.sortList};e.debug&&(n=new Date),l.hasClass("hasSaveSort")?g&&o.hasInitialized&&s.storage&&(s.storage(o,"tablesorter-savesort",v),e.debug&&console.log("saveSort widget: Saving last sort: "+e.sortList+s.benchmark(n))):(l.addClass("hasSaveSort"),v="",s.storage&&(v=(i=s.storage(o,"tablesorter-savesort"))&&i.hasOwnProperty("sortList")&&t.isArray(i.sortList)?i.sortList:"",e.debug&&console.log('saveSort: Last sort loaded: "'+v+'"'+s.benchmark(n)),l.bind("saveSortReset",function(t){t.stopPropagation(),s.storage(o,"tablesorter-savesort","")})),a&&v&&v.length>0?e.sortList=v:o.hasInitialized&&v&&v.length>0&&s.sortOn(e,v))},remove:function(t,o){o.$table.removeClass("hasSaveSort"),s.storage&&s.storage(t,"tablesorter-savesort","")}})}(jQuery);
|
!function(t){"use strict";function s(s){var o=r.storage(s.table,"tablesorter-savesort");return o&&o.hasOwnProperty("sortList")&&t.isArray(o.sortList)?o.sortList:""}function o(t,o){return(o||s(t)).join(",")!==t.sortList.join(",")}var r=t.tablesorter||{};r.addWidget({id:"saveSort",priority:20,options:{saveSort:!0},init:function(t,s,o,r){s.format(t,o,r,!0)},format:function(t,a,e,i){var n,l=a.$table,v=!1!==e.saveSort,g={sortList:a.sortList},S=r.debug(a,"saveSort");S&&(n=new Date),l.hasClass("hasSaveSort")?v&&t.hasInitialized&&r.storage&&o(a)&&(r.storage(t,"tablesorter-savesort",g),S&&console.log("saveSort >> Saving last sort: "+a.sortList+r.benchmark(n))):(l.addClass("hasSaveSort"),g="",r.storage&&(g=s(a),S&&console.log('saveSort >> Last sort loaded: "'+g+'"'+r.benchmark(n)),l.bind("saveSortReset",function(s){s.stopPropagation(),r.storage(t,"tablesorter-savesort","")})),i&&g&&g.length>0?a.sortList=g:t.hasInitialized&&g&&g.length>0&&o(a,g)&&r.sortOn(a,g))},remove:function(t,s){s.$table.removeClass("hasSaveSort"),r.storage&&r.storage(t,"tablesorter-savesort","")}})}(jQuery);
|
4
dist/js/widgets/widget-scroller.min.js
vendored
4
dist/js/widgets/widget-scroller.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/widgets/widget-sort2Hash.min.js
vendored
2
dist/js/widgets/widget-sort2Hash.min.js
vendored
@ -1,2 +1,2 @@
|
|||||||
/*! Widget: sort2Hash (BETA) - updated 9/27/2017 (v2.29.0) */
|
/*! Widget: sort2Hash (BETA) - updated 9/27/2017 (v2.29.0) */
|
||||||
!function(e){"use strict";var t=e.tablesorter||{},a=t.sort2Hash={init:function(r,o){var s,n,i,h,l=r.table,d=r.pager,c=t.hasWidget(l,"saveSort"),H=a.decodeHash(r,o,"sort");(H&&!c||H&&c&&o.sort2Hash_overrideSaveSort)&&a.convertString2Sort(r,o,H),t.hasWidget(r.table,"pager")&&(n=parseInt(a.decodeHash(r,o,"page"),10),i=d.page=n<0?0:n>d.totalPages?d.totalPages-1:n,h=d.size=parseInt(a.decodeHash(r,o,"size"),10)),t.hasWidget(l,"filter")&&(s=a.decodeHash(r,o,"filter"))&&(s=s.split(o.sort2Hash_separator),r.$table.one("tablesorter-ready",function(){setTimeout(function(){r.$table.one("filterEnd",function(){e(this).triggerHandler("pageAndSize",[i,h])}),(n=t.filter.equalFilters?t.filter.equalFilters(r,r.lastSearch,s):(r.lastSearch||[]).join("")!==(s||[]).join(""))||e.tablesorter.setFilters(l,s,!0)},100)})),s||r.$table.one("tablesorter-ready",function(){r.$table.triggerHandler("pageAndSize",[i,h])}),r.$table.on("sortEnd.sort2hash filterEnd.sort2hash pagerComplete.sort2Hash",function(){this.hasInitialized&&a.setHash(this.config,this.config.widgetOptions)})},getTableId:function(t,a){return a.sort2Hash_tableId||t.table.id||"table"+e("table").index(t.$table)},regexEscape:function(e){return e.replace(/([\.\^\$\*\+\-\?\(\)\[\]\{\}\\\|])/g,"\\$1")},convertString2Sort:function(e,t,r){for(var o,s,n,i,h,l,d=r.split(t.sort2Hash_separator),c=0,H=d.length,g=[];c<H;){if(s=d[c++],i=parseInt(s,10),isNaN(i)||i>e.columns)for(o=new RegExp("("+a.regexEscape(s)+")","i"),h=0;h<e.columns;h++)l=e.$headerIndexed[h],o.test(l.attr(t.sort2Hash_headerTextAttr))&&(s=h,h=e.columns);n=d[c++],void 0!==s&&void 0!==n&&(isNaN(n)&&(n=n.indexOf(t.sort2Hash_directionText[1])>-1?1:0),g.push([s,n]))}g.length&&(e.sortList=g)},convertSort2String:function(t,a){var r,o,s,n,i=[],h=t.sortList||[],l=h.length;for(r=0;r<l;r++)s=h[r][0],o=e.trim(t.$headerIndexed[s].attr(a.sort2Hash_headerTextAttr)),i.push(""!==o?encodeURIComponent(o):s),n=a.sort2Hash_directionText[h[r][1]],i.push(n);return i.join(a.sort2Hash_separator)},convertFilter2String:function(t,a){var r,o,s,n,i=[],h=t.sortList||[],l=h.length;for(r=0;r<l;r++)s=h[r][0],s=void 0!==(o=e.trim(t.$headerIndexed[s].attr(a.sort2Hash_headerTextAttr)))?encodeURIComponent(o):s,i.push(s),n=a.sort2Hash_directionText[h[r][1]],i.push(n);return i.join(a.sort2Hash_separator)},getParam:function(e,t,r){t||(t=window.location.hash);var o=new RegExp("[\\?&]"+a.regexEscape(e)+"=([^&#]*)"),s=o.exec(t);return r?o:null===s?"":decodeURIComponent(s[1])},removeParam:function(e,t){t||(t=window.location.hash);var r,o=a.getParam(e,t,!0),s=[],n=t.split("&"),i=n.length;for(r=0;r<i;r++)o.test("&"+n[r])||s.push(n[r]);return s.length?s.join("&"):""},encodeHash:function(e,t,r,o,s){var n=!1,i=a.getTableId(e,t);return"function"==typeof t.sort2Hash_encodeHash&&(n=t.sort2Hash_encodeHash(e,i,r,o,s||o)),!1===n&&(n="&"+r+"["+i+"]="+o),n},decodeHash:function(e,t,r){var o=!1,s=a.getTableId(e,t);return"function"==typeof t.sort2Hash_decodeHash&&(o=t.sort2Hash_decodeHash(e,s,r)),!1===o&&(o=a.getParam(r+"["+s+"]")),o||""},cleanHash:function(e,t,r,o){var s=!1,n=a.getTableId(e,t);return"function"==typeof t.sort2Hash_cleanHash&&(s=t.sort2Hash_cleanHash(e,n,r,o)),!1===s&&(s=a.removeParam(r+"["+n+"]",o)),s||""},setHash:function(r,o){var s="",n=window.location.hash,i=t.hasWidget(r.table,"pager"),h=t.hasWidget(r.table,"filter"),l=a.convertSort2String(r,o),d=h&&""!==r.lastSearch.join("")?r.lastSearch:[],c=encodeURIComponent(d.join(r.widgetOptions.sort2Hash_separator)),H={sort:l?a.encodeHash(r,o,"sort",l,r.sortList):"",page:i?a.encodeHash(r,o,"page",r.pager.page+1):"",size:i?a.encodeHash(r,o,"size",r.pager.size):"",filter:c?a.encodeHash(r,o,"filter",c,d):""};e.each(H,function(e,t){n=a.cleanHash(r,o,e,n),s+=t});var g=o.sort2Hash_hash,p=((window.location.hash||"").replace(g,"").length?n:g)+s;if(o.sort2Hash_replaceHistory){var u=window.location.href.split(g)[0];p[0]!=g&&(p=g+p),window.location.replace(u+p)}else window.location.hash=p}};t.addWidget({id:"sort2Hash",priority:60,options:{sort2Hash_hash:"#",sort2Hash_separator:"-",sort2Hash_headerTextAttr:"data-header",sort2Hash_directionText:[0,1],sort2Hash_overrideSaveSort:!1,sort2Hash_replaceHistory:!1,sort2Hash_tableId:null,sort2Hash_encodeHash:null,sort2Hash_decodeHash:null,sort2Hash_cleanHash:null},init:function(e,t,r,o){a.init(r,o)},remove:function(e,t){t.$table.off(".sort2hash")}})}(jQuery);
|
!function(e){"use strict";var t=e.tablesorter||{},a=t.sort2Hash={init:function(r,o){var s,n,i,h,l=r.table,d=r.pager,c=t.hasWidget(l,"saveSort"),H=a.decodeHash(r,o,"sort");(H&&!c||H&&c&&o.sort2Hash_overrideSaveSort)&&a.convertString2Sort(r,o,H),t.hasWidget(r.table,"pager")&&(n=parseInt(a.decodeHash(r,o,"page"),10),i=d.page=n<0?0:n>d.totalPages?d.totalPages-1:n,h=d.size=parseInt(a.decodeHash(r,o,"size"),10)),t.hasWidget(l,"filter")&&(s=a.decodeHash(r,o,"filter"))&&(s=s.split(o.sort2Hash_separator),r.$table.one("tablesorter-ready",function(){setTimeout(function(){r.$table.one("filterEnd",function(){e(this).triggerHandler("pageAndSize",[i,h])}),(n=t.filter.equalFilters?t.filter.equalFilters(r,r.lastSearch,s):(r.lastSearch||[]).join("")!==(s||[]).join(""))||e.tablesorter.setFilters(l,s,!0)},100)})),s||r.$table.one("tablesorter-ready",function(){r.$table.triggerHandler("pageAndSize",[i,h])}),r.$table.on("sortEnd.sort2hash filterEnd.sort2hash pagerComplete.sort2Hash",function(){this.hasInitialized&&a.setHash(this.config,this.config.widgetOptions)})},getTableId:function(t,a){return a.sort2Hash_tableId||t.table.id||"table"+e("table").index(t.$table)},regexEscape:function(e){return e.replace(/([\.\^\$\*\+\-\?\(\)\[\]\{\}\\\|])/g,"\\$1")},convertString2Sort:function(e,t,r){for(var o,s,n,i,h,l,d=r.split(t.sort2Hash_separator),c=0,H=d.length,g=[];c<H;){if(s=d[c++],i=parseInt(s,10),isNaN(i)||i>e.columns)for(o=new RegExp("("+a.regexEscape(s)+")","i"),h=0;h<e.columns;h++)l=e.$headerIndexed[h],o.test(l.attr(t.sort2Hash_headerTextAttr))&&(s=h,h=e.columns);n=d[c++],void 0!==s&&void 0!==n&&(isNaN(n)&&(n=n.indexOf(t.sort2Hash_directionText[1])>-1?1:0),g.push([s,n]))}g.length&&(e.sortList=g)},convertSort2String:function(t,a){var r,o,s,n,i=[],h=t.sortList||[],l=h.length;for(r=0;r<l;r++)s=h[r][0],o=e.trim(t.$headerIndexed[s].attr(a.sort2Hash_headerTextAttr)),i.push(""!==o?encodeURIComponent(o):s),n=a.sort2Hash_directionText[h[r][1]],i.push(n);return i.join(a.sort2Hash_separator)},convertFilter2String:function(t,a){var r,o,s,n,i=[],h=t.sortList||[],l=h.length;for(r=0;r<l;r++)s=h[r][0],s=void 0!==(o=e.trim(t.$headerIndexed[s].attr(a.sort2Hash_headerTextAttr)))?encodeURIComponent(o):s,i.push(s),n=a.sort2Hash_directionText[h[r][1]],i.push(n);return i.join(a.sort2Hash_separator)},getParam:function(e,t,r){t||(t=window.location.hash);var o=new RegExp("[\\?&]"+a.regexEscape(e)+"=([^&#]*)"),s=o.exec(t);return r?o:null===s?"":decodeURIComponent(s[1])},removeParam:function(e,t){t||(t=window.location.hash);var r,o=a.getParam(e,t,!0),s=[],n=t.split("&"),i=n.length;for(r=0;r<i;r++)o.test("&"+n[r])||s.push(n[r]);return s.length?s.join("&"):""},encodeHash:function(e,t,r,o,s){var n=!1,i=a.getTableId(e,t);return"function"==typeof t.sort2Hash_encodeHash&&(n=t.sort2Hash_encodeHash(e,i,r,o,s||o)),!1===n&&(n="&"+r+"["+i+"]="+o),n},decodeHash:function(e,t,r){var o=!1,s=a.getTableId(e,t);return"function"==typeof t.sort2Hash_decodeHash&&(o=t.sort2Hash_decodeHash(e,s,r)),!1===o&&(o=a.getParam(r+"["+s+"]")),o||""},cleanHash:function(e,t,r,o){var s=!1,n=a.getTableId(e,t);return"function"==typeof t.sort2Hash_cleanHash&&(s=t.sort2Hash_cleanHash(e,n,r,o)),!1===s&&(s=a.removeParam(r+"["+n+"]",o)),s||""},setHash:function(r,o){var s="",n=window.location.hash,i=t.hasWidget(r.table,"pager"),h=t.hasWidget(r.table,"filter"),l=a.convertSort2String(r,o),d=h&&""!==r.lastSearch.join("")?r.lastSearch:[],c=encodeURIComponent(d.join(r.widgetOptions.sort2Hash_separator)),H={sort:l?a.encodeHash(r,o,"sort",l,r.sortList):"",page:i?a.encodeHash(r,o,"page",r.pager.page+1):"",size:i?a.encodeHash(r,o,"size",r.pager.size):"",filter:c?a.encodeHash(r,o,"filter",c,d):""};e.each(H,function(e,t){n=a.cleanHash(r,o,e,n),s+=t});var g=o.sort2Hash_hash,p=((window.location.hash||"").replace(g,"").length?n:g)+s;if(o.sort2Hash_replaceHistory){var u=window.location.href.split(g)[0];p[0]!==g&&(p=g+p),window.location.replace(u+p)}else window.location.hash=p}};t.addWidget({id:"sort2Hash",priority:60,options:{sort2Hash_hash:"#",sort2Hash_separator:"-",sort2Hash_headerTextAttr:"data-header",sort2Hash_directionText:[0,1],sort2Hash_overrideSaveSort:!1,sort2Hash_replaceHistory:!1,sort2Hash_tableId:null,sort2Hash_encodeHash:null,sort2Hash_decodeHash:null,sort2Hash_cleanHash:null},init:function(e,t,r,o){a.init(r,o)},remove:function(e,t){t.$table.off(".sort2hash")}})}(jQuery);
|
2
dist/js/widgets/widget-sortTbodies.min.js
vendored
2
dist/js/widgets/widget-sortTbodies.min.js
vendored
@ -3,4 +3,4 @@
|
|||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
* Contributors: Chris Rogers
|
* Contributors: Chris Rogers
|
||||||
*/
|
*/
|
||||||
!function(t){"use strict";var o=t.tablesorter;o.sortTbodies={init:function(r,e){var s,n,i,d,a,b=r.namespace+"sortTbody",l=r.$table.children("tbody"),c=l.length;for(e.sortTbody_original_serverSideSorting=r.serverSideSorting,e.sortTbody_original_cssInfoBlock=r.cssInfoBlock,r.cssInfoBlock=e.sortTbody_noSort,o.sortTbodies.setTbodies(r,e),s=0;s<c;s++)l.eq(s).attr("data-ts-original-order",s);for(r.$table.unbind("sortBegin updateComplete ".split(" ").join(b+" ")).bind("sortBegin"+b,function(){o.sortTbodies.sorter(r)}).bind("updateComplete"+b,function(){o.sortTbodies.setTbodies(r,e),o.updateCache(r,null,r.$tbodies)}).bind("sortEnd",function(){var o=e.sortTbody_primaryRow;e.sortTbody_lockHead&&o&&r.$table.find(o).each(function(){t(this).parents("tbody").prepend(this)})}),(t.isEmptyObject(r.parsers)||r.$tbodies.length!==l.length)&&(o.sortTbodies.setTbodies(r,e),o.updateCache(r,null,r.$tbodies)),c=(a=l.children("tr")).length,s=0;s<r.columns;s++){if(d=0,"numeric"===r.parsers[s].type)for(n=0;n<c;n++)i=o.getParsedText(r,a.eq(n).children()[s],s),d=Math.max(Math.abs(i)||0,d);r.$headerIndexed[s].attr("data-ts-col-max-value",d)}},setTbodies:function(t,o){t.$tbodies=t.$table.children("tbody").not("."+o.sortTbody_noSort)},sorter:function(r){var e=r.$table,s=r.widgetOptions;if(!0!==s.sortTbody_busy){s.sortTbody_busy=!0;var n=e.children("tbody").not("."+s.sortTbody_noSort),i=s.sortTbody_primaryRow||"tr:eq(0)",d=r.sortList||[],a=d.length;a&&(r.serverSideSorting=!s.sortTbody_sortRows,n.sort(function(e,s){var n,b,l,c,y,T,p,f,u,g,h,_,m=r.table,S=r.parsers,v=r.textSorter||"",$=t(e),x=t(s),q=$.find(i).children("td, th"),B=x.find(i).children("td, th");for(n=0;n<a;n++){if(p=d[n][0],f=d[n][1],l=0===f,b=o.getElementText(r,q.eq(p),p),u=S[p].format(b,m,q[p],p),b=o.getElementText(r,B.eq(p),p),g=S[p].format(b,m,B[p],p),r.sortStable&&u===g&&1===a)return $.attr("data-ts-original-order")-x.attr("data-ts-original-order");if(c=/n/i.test(S&&S[p]?S[p].type||"":""),c&&r.strings[p]?(y=r.$headerIndexed[p].attr("data-ts-col-max-value")||1.79e308,c="boolean"==typeof o.string[r.strings[p]]?(l?1:-1)*(o.string[r.strings[p]]?-1:1):r.strings[p]?o.string[r.strings[p]]||0:0,T=r.numberSorter?r.numberSorter(u,g,l,y,m):o["sortNumeric"+(l?"Asc":"Desc")](u,g,c,y,p,r)):(h=l?u:g,_=l?g:u,T="function"==typeof v?v(h,_,l,p,m):"object"==typeof v&&v.hasOwnProperty(p)?v[p](h,_,l,p,m):o["sortNatural"+(l?"Asc":"Desc")](u,g,p,r)),T)return T}return $.attr("data-ts-original-order")-x.attr("data-ts-original-order")}),o.sortTbodies.restoreTbodies(r,s,n),s.sortTbody_busy=!1)}},restoreTbodies:function(t,o,r){var e,s,n,i,d,a,b,l=t.$table,c=!0,y=0;if(l.hide(),r.appendTo(l),s=l.children("tbody"),i=s.length,e=s.filter("."+o.sortTbody_noSort).appendTo(l),d=e.length)for(;c&&y<d;){for(c=!1,a=0;a<d;a++)(b=(b=parseInt(e.eq(a).attr("data-ts-original-order"),10))>=i?i:b<0?0:b)!==e.eq(a).index()&&(c=!0,n=e.eq(a).detach(),b>=i?n.appendTo(l):0===b?n.prependTo(l):n.insertBefore(l.children("tbody:eq("+b+")")));y++}l.show()}},o.addWidget({id:"sortTbody",priority:40,options:{sortTbody_lockHead:!1,sortTbody_primaryRow:null,sortTbody_sortRows:!1,sortTbody_noSort:"tablesorter-no-sort-tbody"},init:function(t,r,e,s){o.sortTbodies.init(e,s)},remove:function(t,o,r,e){o.$table.unbind("sortBegin updateComplete ".split(" ").join(o.namespace+"sortTbody ")),o.serverSideSorting=r.sortTbody_original_serverSideSorting,o.cssInfoBlock=r.sortTbody_original_cssInfoBlock}})}(jQuery);
|
!function(t){"use strict";var o=t.tablesorter;o.sortTbodies={init:function(r,e){var s,n,i,d,a,b=r.namespace+"sortTbody",l=r.$table.children("tbody"),c=l.length;for(e.sortTbody_original_serverSideSorting=r.serverSideSorting,e.sortTbody_original_cssInfoBlock=r.cssInfoBlock,r.cssInfoBlock=e.sortTbody_noSort,o.sortTbodies.setTbodies(r,e),s=0;s<c;s++)l.eq(s).attr("data-ts-original-order",s);for(r.$table.unbind("sortBegin updateComplete ".split(" ").join(b+" ")).bind("sortBegin"+b,function(){o.sortTbodies.sorter(r)}).bind("updateComplete"+b,function(){o.sortTbodies.setTbodies(r,e),o.updateCache(r,null,r.$tbodies)}).bind("sortEnd",function(){var o=e.sortTbody_primaryRow;e.sortTbody_lockHead&&o&&r.$table.find(o).each(function(){t(this).parents("tbody").prepend(this)})}),(t.isEmptyObject(r.parsers)||r.$tbodies.length!==l.length)&&(o.sortTbodies.setTbodies(r,e),o.updateCache(r,null,r.$tbodies)),c=(a=l.children("tr")).length,s=0;s<r.columns;s++){if(d=0,"numeric"===r.parsers[s].type)for(n=0;n<c;n++)i=o.getParsedText(r,a.eq(n).children()[s],s),d=Math.max(Math.abs(i)||0,d);r.$headerIndexed[s].attr("data-ts-col-max-value",d)}},setTbodies:function(t,o){t.$tbodies=t.$table.children("tbody").not("."+o.sortTbody_noSort)},sorter:function(r){var e=r.$table,s=r.widgetOptions;if(!0!==s.sortTbody_busy){s.sortTbody_busy=!0;var n=e.children("tbody").not("."+s.sortTbody_noSort),i=s.sortTbody_primaryRow||"tr:eq(0)",d=r.sortList||[],a=d.length;a&&(r.serverSideSorting=!s.sortTbody_sortRows,n.sort(function(e,s){var n,b,l,c,y,T,p,f,u,g,h,_,m=r.table,S=r.parsers,v=r.textSorter||"",$=t(e),x=t(s),q=$.find(i).children("td, th"),B=x.find(i).children("td, th");for(n=0;n<a;n++){if(p=d[n][0],f=d[n][1],l=0===f,b=o.getElementText(r,q.eq(p),p),u=S[p].format(b,m,q[p],p),b=o.getElementText(r,B.eq(p),p),g=S[p].format(b,m,B[p],p),r.sortStable&&u===g&&1===a)return $.attr("data-ts-original-order")-x.attr("data-ts-original-order");if(c=/n/i.test(S&&S[p]?S[p].type||"":""),c&&r.strings[p]?(y=r.$headerIndexed[p].attr("data-ts-col-max-value")||1.79e308,c="boolean"==typeof o.string[r.strings[p]]?(l?1:-1)*(o.string[r.strings[p]]?-1:1):r.strings[p]?o.string[r.strings[p]]||0:0,T=r.numberSorter?r.numberSorter(u,g,l,y,m):o["sortNumeric"+(l?"Asc":"Desc")](u,g,c,y,p,r)):(h=l?u:g,_=l?g:u,T="function"==typeof v?v(h,_,l,p,m):"object"==typeof v&&v.hasOwnProperty(p)?v[p](h,_,l,p,m):o["sortNatural"+(l?"Asc":"Desc")](u,g,p,r)),T)return T}return $.attr("data-ts-original-order")-x.attr("data-ts-original-order")}),o.sortTbodies.restoreTbodies(r,s,n),s.sortTbody_busy=!1)}},restoreTbodies:function(t,o,r){var e,s,n,i,d,a,b,l=t.$table,c=!0,y=0;if(l.hide(),r.appendTo(l),s=l.children("tbody"),i=s.length,e=s.filter("."+o.sortTbody_noSort).appendTo(l),d=e.length)for(;c&&y<d;){for(c=!1,a=0;a<d;a++)(b=(b=parseInt(e.eq(a).attr("data-ts-original-order"),10))>=i?i:b<0?0:b)!==e.eq(a).index()&&(c=!0,n=e.eq(a).detach(),b>=i?n.appendTo(l):0===b?n.prependTo(l):n.insertBefore(l.children("tbody:eq("+b+")")));y++}l.show()}},o.addWidget({id:"sortTbody",priority:40,options:{sortTbody_lockHead:!1,sortTbody_primaryRow:null,sortTbody_sortRows:!1,sortTbody_noSort:"tablesorter-no-sort-tbody"},init:function(t,r,e,s){o.sortTbodies.init(e,s)},remove:function(t,o,r){o.$table.unbind("sortBegin updateComplete ".split(" ").join(o.namespace+"sortTbody ")),o.serverSideSorting=r.sortTbody_original_serverSideSorting,o.cssInfoBlock=r.sortTbody_original_cssInfoBlock}})}(jQuery);
|
4
dist/js/widgets/widget-storage.min.js
vendored
4
dist/js/widgets/widget-storage.min.js
vendored
@ -1,2 +1,2 @@
|
|||||||
/*! Widget: storage - updated 4/18/2017 (v2.28.8) */
|
/*! Widget: storage - updated 2018-03-18 (v2.30.0) */
|
||||||
!function(e,t,r){"use strict";var o=e.tablesorter||{};e.extend(!0,o.defaults,{fixedUrl:"",widgetOptions:{storage_fixedUrl:"",storage_group:"",storage_page:"",storage_storageType:"",storage_tableId:"",storage_useSessionStorage:""}}),o.storage=function(o,s,a,i){var g,n,p,l=!1,d={},u=(o=e(o)[0]).config,S=u&&u.widgetOptions,c=(i&&i.storageType||S&&S.storage_storageType).toString().charAt(0).toLowerCase(),_=c?"":i&&i.useSessionStorage||S&&S.storage_useSessionStorage,f=e(o),m=i&&i.id||f.attr(i&&i.group||S&&S.storage_group||"data-table-group")||S&&S.storage_tableId||o.id||e(".tablesorter").index(f),w=i&&i.url||f.attr(i&&i.page||S&&S.storage_page||"data-table-page")||S&&S.storage_fixedUrl||u&&u.fixedUrl||t.location.pathname;if("c"!==c&&(c="s"===c||_?"sessionStorage":"localStorage")in t)try{t[c].setItem("_tmptest","temp"),l=!0,t[c].removeItem("_tmptest")}catch(e){u&&u.debug&&console.warn(c+" is not supported in this browser")}if(u.debug&&console.log("Storage widget using",l?c:"cookies"),e.parseJSON&&(l?d=e.parseJSON(t[c][s]||"null")||{}:(n=r.cookie.split(/[;\s|=]/),d=0!==(g=e.inArray(s,n)+1)?e.parseJSON(n[g]||"null")||{}:{})),void 0===a||!t.JSON||!JSON.hasOwnProperty("stringify"))return d&&d[w]?d[w][m]:"";d[w]||(d[w]={}),d[w][m]=a,l?t[c][s]=JSON.stringify(d):((p=new Date).setTime(p.getTime()+31536e6),r.cookie=s+"="+JSON.stringify(d).replace(/\"/g,'"')+"; expires="+p.toGMTString()+"; path=/")}}(jQuery,window,document);
|
!function(e,t,r){"use strict";var o=e.tablesorter||{};e.extend(!0,o.defaults,{fixedUrl:"",widgetOptions:{storage_fixedUrl:"",storage_group:"",storage_page:"",storage_storageType:"",storage_tableId:"",storage_useSessionStorage:""}}),o.storage=function(s,a,i,g){var n,p,l,d=!1,u={},S=(s=e(s)[0]).config,c=S&&S.widgetOptions,_=o.debug(S,"storage"),f=(g&&g.storageType||c&&c.storage_storageType).toString().charAt(0).toLowerCase(),m=f?"":g&&g.useSessionStorage||c&&c.storage_useSessionStorage,y=e(s),O=g&&g.id||y.attr(g&&g.group||c&&c.storage_group||"data-table-group")||c&&c.storage_tableId||s.id||e(".tablesorter").index(y),w=g&&g.url||y.attr(g&&g.page||c&&c.storage_page||"data-table-page")||c&&c.storage_fixedUrl||S&&S.fixedUrl||t.location.pathname;if("c"!==f&&(f="s"===f||m?"sessionStorage":"localStorage")in t)try{t[f].setItem("_tmptest","temp"),d=!0,t[f].removeItem("_tmptest")}catch(e){console.warn(f+" is not supported in this browser")}if(_&&console.log("Storage >> Using",d?f:"cookies"),e.parseJSON&&(d?u=e.parseJSON(t[f][a]||"null")||{}:(p=r.cookie.split(/[;\s|=]/),u=0!==(n=e.inArray(a,p)+1)?e.parseJSON(p[n]||"null")||{}:{})),void 0===i||!t.JSON||!JSON.hasOwnProperty("stringify"))return u&&u[w]?u[w][O]:"";u[w]||(u[w]={}),u[w][O]=i,d?t[f][a]=JSON.stringify(u):((l=new Date).setTime(l.getTime()+31536e6),r.cookie=a+"="+JSON.stringify(u).replace(/\"/g,'"')+"; expires="+l.toGMTString()+"; path=/")}}(jQuery,window,document);
|
4
dist/js/widgets/widget-uitheme.min.js
vendored
4
dist/js/widgets/widget-uitheme.min.js
vendored
@ -1,2 +1,2 @@
|
|||||||
/*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
|
/*! Widget: uitheme - updated 2018-03-18 (v2.30.0) */
|
||||||
!function(e){"use strict";var o=e.tablesorter||{};o.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"glyphicon glyphicon-chevron-up",iconSortDesc:"glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},e.extend(o.css,{wrapper:"tablesorter-wrapper"}),o.addWidget({id:"uitheme",priority:10,format:function(t,s,r){var i,a,n,c,l,d,h,m,u,p,v,f,b,C=o.themes,w=s.$table.add(e(s.namespace+"_extra_table")),g=s.$headers.add(e(s.namespace+"_extra_headers")),S=s.theme||"jui",j=C[S]||{},D=e.trim([j.sortNone,j.sortDesc,j.sortAsc,j.active].join(" ")),A=e.trim([j.iconSortNone,j.iconSortDesc,j.iconSortAsc].join(" "));for(s.debug&&(l=new Date),w.hasClass("tablesorter-"+S)&&s.theme===s.appliedTheme&&r.uitheme_applied||(r.uitheme_applied=!0,p=C[s.appliedTheme]||{},v=(b=!e.isEmptyObject(p))?[p.sortNone,p.sortDesc,p.sortAsc,p.active].join(" "):"",f=b?[p.iconSortNone,p.iconSortDesc,p.iconSortAsc].join(" "):"",b&&(r.zebra[0]=e.trim(" "+r.zebra[0].replace(" "+p.even,"")),r.zebra[1]=e.trim(" "+r.zebra[1].replace(" "+p.odd,"")),s.$tbodies.children().removeClass([p.even,p.odd].join(" "))),j.even&&(r.zebra[0]+=" "+j.even),j.odd&&(r.zebra[1]+=" "+j.odd),w.children("caption").removeClass(p.caption||"").addClass(j.caption),m=w.removeClass((s.appliedTheme?"tablesorter-"+(s.appliedTheme||""):"")+" "+(p.table||"")).addClass("tablesorter-"+S+" "+(j.table||"")).children("tfoot"),s.appliedTheme=s.theme,m.length&&m.children("tr").removeClass(p.footerRow||"").addClass(j.footerRow).children("th, td").removeClass(p.footerCells||"").addClass(j.footerCells),g.removeClass((b?[p.header,p.hover,v].join(" "):"")||"").addClass(j.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(o){e(this)["mouseenter"===o.type?"addClass":"removeClass"](j.hover||"")}),g.each(function(){var t=e(this);t.find("."+o.css.wrapper).length||t.wrapInner('<div class="'+o.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>')}),s.cssIcon&&g.find("."+o.css.icon).removeClass(b?[p.icons,f].join(" "):"").addClass(j.icons||""),o.hasWidget(s.table,"filter")&&(a=function(){w.children("thead").children("."+o.css.filterRow).removeClass(b?p.filterRow||"":"").addClass(j.filterRow||"")},r.filter_initialized?a():w.one("filterInit",function(){a()}))),i=0;i<s.columns;i++)d=s.$headers.add(e(s.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+i+'"]'),h=o.css.icon?d.find("."+o.css.icon):e(),(u=g.not(".sorter-false").filter('[data-column="'+i+'"]:last')).length&&(d.removeClass(D),h.removeClass(A),u[0].sortDisabled?h.removeClass(j.icons||""):(n=j.sortNone,c=j.iconSortNone,u.hasClass(o.css.sortAsc)?(n=[j.sortAsc,j.active].join(" "),c=j.iconSortAsc):u.hasClass(o.css.sortDesc)&&(n=[j.sortDesc,j.active].join(" "),c=j.iconSortDesc),d.addClass(n),h.addClass(c||"")));s.debug&&console.log("Applying "+S+" theme"+o.benchmark(l))},remove:function(e,t,s,r){if(s.uitheme_applied){var i=t.$table,a=t.appliedTheme||"jui",n=o.themes[a]||o.themes.jui,c=i.children("thead").children(),l=n.sortNone+" "+n.sortDesc+" "+n.sortAsc,d=n.iconSortNone+" "+n.iconSortDesc+" "+n.iconSortAsc;i.removeClass("tablesorter-"+a+" "+n.table),s.uitheme_applied=!1,r||(i.find(o.css.header).removeClass(n.header),c.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(n.hover+" "+l+" "+n.active).filter("."+o.css.filterRow).removeClass(n.filterRow),c.find("."+o.css.icon).removeClass(n.icons+" "+d))}}})}(jQuery);
|
!function(e){"use strict";var o=e.tablesorter||{};o.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"glyphicon glyphicon-chevron-up",iconSortDesc:"glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},e.extend(o.css,{wrapper:"tablesorter-wrapper"}),o.addWidget({id:"uitheme",priority:10,format:function(t,s,r){var i,a,n,c,l,d,h,m,u,p,v,f,b,C=o.themes,w=s.$table.add(e(s.namespace+"_extra_table")),S=s.$headers.add(e(s.namespace+"_extra_headers")),g=s.theme||"jui",j=C[g]||{},D=e.trim([j.sortNone,j.sortDesc,j.sortAsc,j.active].join(" ")),A=e.trim([j.iconSortNone,j.iconSortDesc,j.iconSortAsc].join(" ")),N=o.debug(s,"uitheme");for(N&&(l=new Date),w.hasClass("tablesorter-"+g)&&s.theme===s.appliedTheme&&r.uitheme_applied||(r.uitheme_applied=!0,p=C[s.appliedTheme]||{},v=(b=!e.isEmptyObject(p))?[p.sortNone,p.sortDesc,p.sortAsc,p.active].join(" "):"",f=b?[p.iconSortNone,p.iconSortDesc,p.iconSortAsc].join(" "):"",b&&(r.zebra[0]=e.trim(" "+r.zebra[0].replace(" "+p.even,"")),r.zebra[1]=e.trim(" "+r.zebra[1].replace(" "+p.odd,"")),s.$tbodies.children().removeClass([p.even,p.odd].join(" "))),j.even&&(r.zebra[0]+=" "+j.even),j.odd&&(r.zebra[1]+=" "+j.odd),w.children("caption").removeClass(p.caption||"").addClass(j.caption),m=w.removeClass((s.appliedTheme?"tablesorter-"+(s.appliedTheme||""):"")+" "+(p.table||"")).addClass("tablesorter-"+g+" "+(j.table||"")).children("tfoot"),s.appliedTheme=s.theme,m.length&&m.children("tr").removeClass(p.footerRow||"").addClass(j.footerRow).children("th, td").removeClass(p.footerCells||"").addClass(j.footerCells),S.removeClass((b?[p.header,p.hover,v].join(" "):"")||"").addClass(j.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(o){e(this)["mouseenter"===o.type?"addClass":"removeClass"](j.hover||"")}),S.each(function(){var t=e(this);t.find("."+o.css.wrapper).length||t.wrapInner('<div class="'+o.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>')}),s.cssIcon&&S.find("."+o.css.icon).removeClass(b?[p.icons,f].join(" "):"").addClass(j.icons||""),o.hasWidget(s.table,"filter")&&(a=function(){w.children("thead").children("."+o.css.filterRow).removeClass(b?p.filterRow||"":"").addClass(j.filterRow||"")},r.filter_initialized?a():w.one("filterInit",function(){a()}))),i=0;i<s.columns;i++)d=s.$headers.add(e(s.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+i+'"]'),h=o.css.icon?d.find("."+o.css.icon):e(),(u=S.not(".sorter-false").filter('[data-column="'+i+'"]:last')).length&&(d.removeClass(D),h.removeClass(A),u[0].sortDisabled?h.removeClass(j.icons||""):(n=j.sortNone,c=j.iconSortNone,u.hasClass(o.css.sortAsc)?(n=[j.sortAsc,j.active].join(" "),c=j.iconSortAsc):u.hasClass(o.css.sortDesc)&&(n=[j.sortDesc,j.active].join(" "),c=j.iconSortDesc),d.addClass(n),h.addClass(c||"")));N&&console.log("uitheme >> Applied "+g+" theme"+o.benchmark(l))},remove:function(e,t,s,r){if(s.uitheme_applied){var i=t.$table,a=t.appliedTheme||"jui",n=o.themes[a]||o.themes.jui,c=i.children("thead").children(),l=n.sortNone+" "+n.sortDesc+" "+n.sortAsc,d=n.iconSortNone+" "+n.iconSortDesc+" "+n.iconSortAsc;i.removeClass("tablesorter-"+a+" "+n.table),s.uitheme_applied=!1,r||(i.find(o.css.header).removeClass(n.header),c.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(n.hover+" "+l+" "+n.active).filter("."+o.css.filterRow).removeClass(n.filterRow),c.find("."+o.css.icon).removeClass(n.icons+" "+d))}}})}(jQuery);
|
2
dist/js/widgets/widget-vertical-group.min.js
vendored
2
dist/js/widgets/widget-vertical-group.min.js
vendored
@ -1,2 +1,2 @@
|
|||||||
/*! Widget: vertical-group (BETA) - updated 12/13/2017 (v2.29.1) */
|
/*! Widget: vertical-group (BETA) - updated 12/13/2017 (v2.29.1) */
|
||||||
!function(r){"use strict";function e(r){r.removeClass(i.verticalGroupHide+" "+i.verticalGroupShow)}function a(r,e,a){e.parent().removeClass(r.zebra[(a+1)%2]).addClass(r.zebra[a%2])}function o(o,l,s,c){var u=-1,v=o.tBodies[0].rows,d=(o.tHead.rows,t.hasWidget(o,"zebra")),p=[],n=[];if(!s.vertical_group_lock){if(s.vertical_group_lock=!0,""===(p=r.map(l.$headerIndexed,function(r){return r.hasClass(i.verticalGroupHeader)?1:""})).join(""))return e(r(v).find("."+i.verticalGroupHide+",."+i.verticalGroupShow)),void(s.vertical_group_lock=!1);for(var h=0;h<v.length;h++)for(var G=!1,f=0;f<l.columns;f++)if(p[f]&&v[h].cells[f]){var g=r(v[h].cells[f]),C=t.isValueInArray(f,l.sortList),w=g.html();C<0?e(g):G||w!==n[f]?0===C&&(G=!0,g.hasClass(i.verticalGroupShow)||g.addClass(i.verticalGroupShow),g.removeClass(i.verticalGroupHide),d&&a(s,g,C?u:++u)):(g.hasClass(i.verticalGroupHide)||g.addClass(i.verticalGroupHide),d&&a(s,g,u),g.removeClass(i.verticalGroupShow)),n[f]=w}else u++;s.vertical_group_lock=!1}}var t=r.tablesorter,i=t.css;r.extend(t.css,{verticalGroupHeader:"tablesorter-vertical-group",verticalGroupHide:"tablesorter-vertical-group-hide",verticalGroupShow:"tablesorter-vertical-group-show"}),t.addWidget({id:"vertical-group",priority:99,init:o,format:o})}(jQuery);
|
!function(r){"use strict";function e(r){r.removeClass(t.verticalGroupHide+" "+t.verticalGroupShow)}function a(r,e,a){e.parent().removeClass(r.zebra[(a+1)%2]).addClass(r.zebra[a%2])}function o(o,l,s){var c=-1,u=o.tBodies[0].rows,v=i.hasWidget(o,"zebra"),d=[],p=[];if(!s.vertical_group_lock){if(s.vertical_group_lock=!0,""===(d=r.map(l.$headerIndexed,function(r){return r.hasClass(t.verticalGroupHeader)?1:""})).join(""))return e(r(u).find("."+t.verticalGroupHide+",."+t.verticalGroupShow)),void(s.vertical_group_lock=!1);for(var n=0;n<u.length;n++)for(var h=!1,G=0;G<l.columns;G++)if(d[G]&&u[n].cells[G]){var f=r(u[n].cells[G]),g=i.isValueInArray(G,l.sortList),C=f.html();g<0?e(f):h||C!==p[G]?0===g&&(h=!0,f.hasClass(t.verticalGroupShow)||f.addClass(t.verticalGroupShow),f.removeClass(t.verticalGroupHide),v&&a(s,f,g?c:++c)):(f.hasClass(t.verticalGroupHide)||f.addClass(t.verticalGroupHide),v&&a(s,f,c),f.removeClass(t.verticalGroupShow)),p[G]=C}else c++;s.vertical_group_lock=!1}}var i=r.tablesorter,t=i.css;r.extend(i.css,{verticalGroupHeader:"tablesorter-vertical-group",verticalGroupHide:"tablesorter-vertical-group-hide",verticalGroupShow:"tablesorter-vertical-group-show"}),i.addWidget({id:"vertical-group",priority:99,init:o,format:o})}(jQuery);
|
2
dist/js/widgets/widget-view.min.js
vendored
2
dist/js/widgets/widget-view.min.js
vendored
@ -1 +1 @@
|
|||||||
!function(e){"use strict";var t,i,a,o=e.tablesorter,n=!1,l=o.view={copyCaption:function(t,i){l.removeCaption(t,i),t.$table.find("caption").length>0&&e(i.view_caption).text(t.$table.find("caption").text())},removeCaption:function(t,i){e(i.view_caption).empty()},buildToolBar:function(t,i){l.removeToolBar(t,i),l.copyCaption(t,i);var a=e(i.view_toolbar);e.each(i.view_layouts,function(t,o){var n=i.view_switcher_class;t==i.view_layout&&(n+=" active");var l=e("<a>",{href:"#","class":n,"data-view-type":t,title:o.title});l.append(e("<i>",{"class":o.icon})),a.append(l)}),a.find("."+i.view_switcher_class).on("click",function(o){if(o.preventDefault(),e(this).hasClass("active"))return!1;a.find("."+i.view_switcher_class).removeClass("active"),e(this).addClass("active"),i.view_layout=e(this).attr("data-view-type"),!0===i.view_layouts[i.view_layout].raw?(l.remove(t,i),l.buildToolBar(t,i)):(!1===n&&l.hideTable(t,i),l.buildView(t,i))})},removeToolBar:function(t,i){e(i.view_toolbar).empty(),l.removeCaption(t,i)},buildView:function(t,i){l.removeView(t,i);var a=i.view_layouts[i.view_layout],n=e(a.container,{"class":i.view_layout});o.getColumnText(t.$table,0,function(t){var i=a.tmpl;e.each(e(t.$row).find("td"),function(t,a){var o={},n="{col"+t+"}";e.each(a.attributes,function(e,t){o[t.nodeName]=t.nodeValue});var l=e(a).html(),r=e("<span />").append(e("<span/>",o).append(l));i=i.replace(new RegExp(n,"g"),r.html()),n="{col"+t+":raw}",i=i.replace(new RegExp(n,"g"),e(a).text())});var o=e(i);e.each(t.$row[0].attributes,function(e,t){"class"==t.nodeName?o.attr(t.nodeName,o.attr(t.nodeName)+" "+t.nodeValue):o.attr(t.nodeName,t.nodeValue)}),n.append(o)}),e(i.view_container).append(n),t.$table.triggerHandler("viewComplete")},removeView:function(t,i){e(i.view_container).empty()},hideTable:function(e,o){t=e.$table.css("position"),i=e.$table.css("bottom"),a=e.$table.css("left"),e.$table.css({position:"absolute",top:"-10000px",left:"-10000px"}),n=!0},init:function(e,t){!1!==t.view_layout&&void 0!==t.view_layouts[t.view_layout]&&(!1===n&&l.hideTable(e,t),e.$table.on("tablesorter-ready",function(){l.buildToolBar(e,t),l.buildView(e,t)}))},remove:function(e,o){l.removeToolBar(e,o),l.removeView(e,o),e.$table.css({position:t,top:i,left:a}),n=!1}};o.addWidget({id:"view",options:{view_toolbar:"#ts-view-toolbar",view_container:"#ts-view",view_caption:"#ts-view-caption",view_switcher_class:"ts-view-switcher",view_layout:!1,view_layouts:{}},init:function(e,t,i,a){l.init(i,a)},remove:function(e,t,i){l.remove(t,i)}})}(jQuery);
|
!function(e){"use strict";var t,i,a,o=e.tablesorter,n=!1,l=o.view={copyCaption:function(t,i){l.removeCaption(t,i),t.$table.find("caption").length>0&&e(i.view_caption).text(t.$table.find("caption").text())},removeCaption:function(t,i){e(i.view_caption).empty()},buildToolBar:function(t,i){l.removeToolBar(t,i),l.copyCaption(t,i);var a=e(i.view_toolbar);e.each(i.view_layouts,function(t,o){var n=i.view_switcher_class;t===i.view_layout&&(n+=" active");var l=e("<a>",{href:"#","class":n,"data-view-type":t,title:o.title});l.append(e("<i>",{"class":o.icon})),a.append(l)}),a.find("."+i.view_switcher_class).on("click",function(o){if(o.preventDefault(),e(this).hasClass("active"))return!1;a.find("."+i.view_switcher_class).removeClass("active"),e(this).addClass("active"),i.view_layout=e(this).attr("data-view-type"),!0===i.view_layouts[i.view_layout].raw?(l.remove(t,i),l.buildToolBar(t,i)):(!1===n&&l.hideTable(t,i),l.buildView(t,i))})},removeToolBar:function(t,i){e(i.view_toolbar).empty(),l.removeCaption(t,i)},buildView:function(t,i){l.removeView(t,i);var a=i.view_layouts[i.view_layout],n=e(a.container,{"class":i.view_layout});o.getColumnText(t.$table,0,function(t){var i=a.tmpl;e.each(e(t.$row).find("td"),function(t,a){var o={},n="{col"+t+"}";e.each(a.attributes,function(e,t){o[t.nodeName]=t.nodeValue});var l=e(a).html(),r=e("<span />").append(e("<span/>",o).append(l));i=i.replace(new RegExp(n,"g"),r.html()),n="{col"+t+":raw}",i=i.replace(new RegExp(n,"g"),e(a).text())});var o=e(i);e.each(t.$row[0].attributes,function(e,t){"class"===t.nodeName?o.attr(t.nodeName,o.attr(t.nodeName)+" "+t.nodeValue):o.attr(t.nodeName,t.nodeValue)}),n.append(o)}),e(i.view_container).append(n),t.$table.triggerHandler("viewComplete")},removeView:function(t,i){e(i.view_container).empty()},hideTable:function(e){t=e.$table.css("position"),i=e.$table.css("bottom"),a=e.$table.css("left"),e.$table.css({position:"absolute",top:"-10000px",left:"-10000px"}),n=!0},init:function(e,t){!1!==t.view_layout&&void 0!==t.view_layouts[t.view_layout]&&(!1===n&&l.hideTable(e,t),e.$table.on("tablesorter-ready",function(){l.buildToolBar(e,t),l.buildView(e,t)}))},remove:function(e,o){l.removeToolBar(e,o),l.removeView(e,o),e.$table.css({position:t,top:i,left:a}),n=!1}};o.addWidget({id:"view",options:{view_toolbar:"#ts-view-toolbar",view_container:"#ts-view",view_caption:"#ts-view-caption",view_switcher_class:"ts-view-switcher",view_layout:!1,view_layouts:{}},init:function(e,t,i,a){l.init(i,a)},remove:function(e,t,i){l.remove(t,i)}})}(jQuery);
|
8
docs/css/bootstrap-v4.min.css
vendored
8
docs/css/bootstrap-v4.min.css
vendored
File diff suppressed because one or more lines are too long
@ -92,7 +92,7 @@ span.alert { padding: 1px 3px; }
|
|||||||
#main .ui-accordion-header a, #main .ui-accordion-content { font-size: 14px; }
|
#main .ui-accordion-header a, #main .ui-accordion-content { font-size: 14px; }
|
||||||
#banner small { font-size: 16px; vertical-align: super; }
|
#banner small { font-size: 16px; vertical-align: super; }
|
||||||
.accordion { position: relative; }
|
.accordion { position: relative; }
|
||||||
.accordion .accordion-link { position: absolute; right: 1%; margin-top: 16px; z-index: 1; width: 12px; height: 12px;}
|
.accordion .accordion-link { position: absolute; right: 1%; margin-top: 0.9em; z-index: 1; width: 12px; height: 12px;}
|
||||||
.accordion .accordion .accordion-link { margin-top: 12px; } /* nested accordion */
|
.accordion .accordion .accordion-link { margin-top: 12px; } /* nested accordion */
|
||||||
.tablesorter .accordion .accordion-link { margin-top: 11px; }
|
.tablesorter .accordion .accordion-link { margin-top: 11px; }
|
||||||
.remark, .error { font-weight: bold; color: red; font-size: 18px; }
|
.remark, .error { font-weight: bold; color: red; font-size: 18px; }
|
||||||
|
@ -16,14 +16,18 @@
|
|||||||
<!-- Tablesorter: required -->
|
<!-- Tablesorter: required -->
|
||||||
<link rel="stylesheet" href="../css/theme.blue.css">
|
<link rel="stylesheet" href="../css/theme.blue.css">
|
||||||
<script src="../js/jquery.tablesorter.js"></script>
|
<script src="../js/jquery.tablesorter.js"></script>
|
||||||
|
<script src="../js/widgets/widget-filter.js"></script>
|
||||||
|
|
||||||
<script id="js">$(function() {
|
<script id="js">$(function() {
|
||||||
|
|
||||||
// call the tablesorter plugin
|
// call the tablesorter plugin
|
||||||
$("table").tablesorter({
|
$("table").tablesorter({
|
||||||
theme : 'blue',
|
theme : 'blue',
|
||||||
// enable debug mode
|
// enable debug mode;
|
||||||
debug: true
|
// debug: true => all debugging
|
||||||
|
// debug: "filter" => filter widget debugging only
|
||||||
|
debug: "core filter", // => core and filter widget debugging
|
||||||
|
widgets: ["filter"]
|
||||||
});
|
});
|
||||||
|
|
||||||
});</script>
|
});</script>
|
||||||
@ -39,7 +43,7 @@
|
|||||||
|
|
||||||
<div id="main">
|
<div id="main">
|
||||||
<p class="tip">
|
<p class="tip">
|
||||||
<em>NOTE!</em> If firebug is installed the debuging information will be displayed in the firebug console.
|
<em>NOTE!</em> Debugging information will be displayed in the development console (Press <kbd>F12</kbd> and select the console tab).
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h1>Demo</h1>
|
<h1>Demo</h1>
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
<script id="js">$(function() {
|
<script id="js">$(function() {
|
||||||
|
|
||||||
// NOTE: $.tablesorter.theme.bootstrap is ALREADY INCLUDED in the jquery.tablesorter.widgets.js
|
// NOTE: $.tablesorter.themes.bootstrap is ALREADY INCLUDED in the jquery.tablesorter.widgets.js
|
||||||
// file for Bootstrap v3.x; it is included here because of class name differences in Bootstrap v2
|
// file for Bootstrap v3.x; it is included here because of class name differences in Bootstrap v2
|
||||||
// for version 2.x (the iconSortAsc & iconSortDesc use different classes)
|
// for version 2.x (the iconSortAsc & iconSortDesc use different classes)
|
||||||
$.tablesorter.themes.bootstrap = {
|
$.tablesorter.themes.bootstrap = {
|
||||||
@ -297,7 +297,7 @@
|
|||||||
|
|
||||||
<div class="next-up">
|
<div class="next-up">
|
||||||
<hr />
|
<hr />
|
||||||
Next up: <a href="example-widget-resizable.html">Resizable Columns widget ››</a>
|
Next up: <a href="example-widget-vertical-group.html">Vertical group widget ››</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
<script id="js">$(function() {
|
<script id="js">$(function() {
|
||||||
|
|
||||||
// NOTE: $.tablesorter.theme.bootstrap is ALREADY INCLUDED in the jquery.tablesorter.widgets.js
|
// NOTE: $.tablesorter.themes.bootstrap is ALREADY INCLUDED in the jquery.tablesorter.widgets.js
|
||||||
// file; it is included here to show how you can modify the default classes
|
// file; it is included here to show how you can modify the default classes
|
||||||
$.tablesorter.themes.bootstrap = {
|
$.tablesorter.themes.bootstrap = {
|
||||||
// these classes are added to the table. To see other table classes available,
|
// these classes are added to the table. To see other table classes available,
|
||||||
|
@ -686,8 +686,7 @@ $(function(){
|
|||||||
pager_output: 'Showing {startRow} to {endRow} of {filteredRows} results',
|
pager_output: 'Showing {startRow} to {endRow} of {filteredRows} results',
|
||||||
pager_size: 5,
|
pager_size: 5,
|
||||||
chart_incRows: 'f',
|
chart_incRows: 'f',
|
||||||
chart_useSelector: true,
|
chart_useSelector: true
|
||||||
chart_hideTable: false
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -53,8 +53,8 @@
|
|||||||
|
|
||||||
/* using-x-theme added by the demo code */
|
/* using-x-theme added by the demo code */
|
||||||
.using-jui-theme .tablesorter-scroller-fixed:after {
|
.using-jui-theme .tablesorter-scroller-fixed:after {
|
||||||
/* set to -2px for jquery ui themes; use "left" here for RTL pages */
|
/* use "left" here for RTL pages */
|
||||||
right: -2px;
|
right: 0;
|
||||||
}
|
}
|
||||||
.using-green-theme .tablesorter-scroller-fixed:after,
|
.using-green-theme .tablesorter-scroller-fixed:after,
|
||||||
.using-black-ice-theme .tablesorter-scroller-fixed:after,
|
.using-black-ice-theme .tablesorter-scroller-fixed:after,
|
||||||
|
@ -457,17 +457,17 @@
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="example-widget-align-character.html">Align Character Widget</a> (<span class="version">v2.15.8</span>; <span class="version updated">v2.19.0</span>).</li>
|
<li><a href="example-widget-align-character.html">Align Character Widget</a> (<span class="version">v2.15.8</span>; <span class="version updated">v2.19.0</span>).</li>
|
||||||
<li><a href="example-widget-build-table.html">Build table Widget</a> (<span class="version">v2.11</span>; <span class="version updated">v2.28.6</span>).</li>
|
<li><a href="example-widget-build-table.html">Build table Widget</a> (<span class="version">v2.11</span>; <span class="version updated">v2.30.0</span>).</li>
|
||||||
|
|
||||||
<li><span class="label label-info">Beta</span> <a href="example-widget-chart.html">Chart Widget</a> (<span class="version">v2.19.0</span>; <span class="version updated">v2.24.0</span>).</li>
|
<li><span class="label label-info">Beta</span> <a href="example-widget-chart.html">Chart Widget</a> (<span class="version">v2.19.0</span>; <span class="version updated">v2.24.0</span>).</li>
|
||||||
<li><span class="results">†</span> <a href="example-widget-columns.html">Columns highlight widget</a> (v2.0.17; <span class="version updated">v2.28.11</span>).</li>
|
<li><span class="results">†</span> <a href="example-widget-columns.html">Columns highlight widget</a> (v2.0.17; <span class="version updated">v2.28.11</span>).</li>
|
||||||
<li><a href="example-widget-column-selector.html">Column selector widget</a> (<span class="version">v2.15</span>; <span class="version updated">v2.29.0</span>).</li>
|
<li><a href="example-widget-column-selector.html">Column selector widget</a> (<span class="version">v2.15</span>; <span class="version updated">v2.30.0</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-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.4</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.29.5</span>).</li>
|
<li><a href="example-widget-filter.html">basic</a> (v2.0.18; <span class="version updated">v2.30.0</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>
|
||||||
@ -496,9 +496,9 @@
|
|||||||
<br><br>
|
<br><br>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>Pager plugin (<a href="example-pager.html">basic</a> & <a href="example-pager-ajax.html">ajax</a> demos; <span class="version updated">v2.28.8</span>).</li>
|
<li>Pager plugin (<a href="example-pager.html">basic</a> & <a href="example-pager-ajax.html">ajax</a> demos; <span class="version updated">v2.30.0</span>).</li>
|
||||||
<li>
|
<li>
|
||||||
Pager widget (<a href="example-widget-pager.html">basic</a> & <a href="example-widget-pager-ajax.html">ajax</a> demos) (<span class="version">v2.12</span>; <span class="version updated">v2.28.11</span>).<br>
|
Pager widget (<a href="example-widget-pager.html">basic</a> & <a href="example-widget-pager-ajax.html">ajax</a> demos) (<span class="version">v2.12</span>; <span class="version updated">v2.30.0</span>).<br>
|
||||||
<br>
|
<br>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
@ -506,7 +506,7 @@
|
|||||||
<li><a href="example-widget-reflow.html">Reflow widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.19.0</span>).</li>
|
<li><a href="example-widget-reflow.html">Reflow widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.19.0</span>).</li>
|
||||||
<li><a href="example-widgets.html">Repeat headers widget</a> (v2.0.5; <span class="version updated">v2.19.0</span>).</li>
|
<li><a href="example-widgets.html">Repeat headers widget</a> (v2.0.5; <span class="version updated">v2.19.0</span>).</li>
|
||||||
<li><span class="results">†</span> <a href="example-widget-resizable.html">Resizable columns widget</a> (v2.0.23.1; <span class="version updated">v2.29.2</span>).</li>
|
<li><span class="results">†</span> <a href="example-widget-resizable.html">Resizable columns widget</a> (v2.0.23.1; <span class="version updated">v2.29.2</span>).</li>
|
||||||
<li><span class="results">†</span> <a href="example-widget-savesort.html">Save sort widget</a> (v2.0.27; <span class="version updated">v2.24.0</span>).</li>
|
<li><span class="results">†</span> <a href="example-widget-savesort.html">Save sort widget</a> (v2.0.27; <span class="version updated">v2.30.0</span>).</li>
|
||||||
<li><a href="example-widget-scroller.html">Scroller widget</a> (<span class="version">v2.9</span>; <span class="version updated">v2.29.2</span>).</li>
|
<li><a href="example-widget-scroller.html">Scroller widget</a> (<span class="version">v2.9</span>; <span class="version updated">v2.29.2</span>).</li>
|
||||||
<li><span class="label label-info">Beta</span> <a href="example-widget-sort-to-hash.html">Sort-to-hash widget</a> (<span class="version">v2.22.4</span>; <span class="version updated">v2.29.0</span>).</li>
|
<li><span class="label label-info">Beta</span> <a href="example-widget-sort-to-hash.html">Sort-to-hash widget</a> (<span class="version">v2.22.4</span>; <span class="version updated">v2.29.0</span>).</li>
|
||||||
<li><span class="label label-info">Beta</span> <a href="example-widget-sort-tbodies.html">Sort tbodies widget</a> (<span class="version">v2.22.2</span>; <span class="version updated">v2.28.0</span>).</li>
|
<li><span class="label label-info">Beta</span> <a href="example-widget-sort-tbodies.html">Sort tbodies widget</a> (<span class="version">v2.22.2</span>; <span class="version updated">v2.28.0</span>).</li>
|
||||||
@ -515,11 +515,11 @@
|
|||||||
<li><span class="results">†</span> <a href="example-widget-sticky-header.html">Sticky header widget</a> (v2.0.21.1; <span class="version updated">v2.29.0</span>).</li>
|
<li><span class="results">†</span> <a href="example-widget-sticky-header.html">Sticky header widget</a> (v2.0.21.1; <span class="version updated">v2.29.0</span>).</li>
|
||||||
<li><a href="example-widget-css-sticky-header.html">Sticky header (css3) widget</a> (<span class="version">v2.14.2</span>; <span class="version updated">v2.28.11</span>).</li>
|
<li><a href="example-widget-css-sticky-header.html">Sticky header (css3) widget</a> (<span class="version">v2.14.2</span>; <span class="version updated">v2.28.11</span>).</li>
|
||||||
|
|
||||||
<li><span class="results">†</span> <a href="#function-storage">Storage Widget</a> (<span class="version">v2.20.0</span>; <span class="version updated">v2.28.8</span>).</li>
|
<li><span class="results">†</span> <a href="#function-storage">Storage Widget</a> (<span class="version">v2.20.0</span>; <span class="version updated">v2.30.0</span>).</li>
|
||||||
|
|
||||||
<li><span class="label label-info">Beta</span> <a href="example-widget-toggle-tablesorter.html">Toggle Sort & Filter Widget</a> (<span class="version">v2.24.4</span>).</li>
|
<li><span class="label label-info">Beta</span> <a href="example-widget-toggle-tablesorter.html">Toggle Sort & Filter Widget</a> (<span class="version">v2.24.4</span>).</li>
|
||||||
|
|
||||||
<li><span class="results">†</span> UITheme widget (<span class="version">v2.0.9</span>; <span class="version updated">v2.29.0</span>):
|
<li><span class="results">†</span> UITheme widget (<span class="version">v2.0.9</span>; <span class="version updated">v2.30.0</span>):
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="example-widget-ui-theme.html">jQuery UI theme</a> (v2.0.9; <span class="version updated">v2.27.0</span>).</li>
|
<li><a href="example-widget-ui-theme.html">jQuery UI theme</a> (v2.0.9; <span class="version updated">v2.27.0</span>).</li>
|
||||||
<li><a href="example-option-theme-bootstrap-v2.html">Bootstrap v2.x</a> (demo added <span class="version">v2.22.0</span>).</li>
|
<li><a href="example-option-theme-bootstrap-v2.html">Bootstrap v2.x</a> (demo added <span class="version">v2.22.0</span>).</li>
|
||||||
@ -928,11 +928,24 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
<tr id="debug">
|
<tr id="debug">
|
||||||
<td><span class="permalink">debug</span></td>
|
<td><a href="#" class="permalink">debug</a></td>
|
||||||
<td>Boolean</td>
|
<td>Boolean or String</td>
|
||||||
<td>false</td>
|
<td>false</td>
|
||||||
<td>
|
<td>
|
||||||
Boolean flag indicating if tablesorter should display debuging information useful for development.
|
Set this option to provide useful for development debugging information in the console <span class="version updated">v2.30.0</span>.
|
||||||
|
<div class="collapsible">
|
||||||
|
<p>In <span class="version updated">v2.30.0</span>, set this option as a string containing either "core" and/or a specific widget name; or, a boolean value.</p>
|
||||||
|
<p>When a boolean flag is set, <em>all</em> debugging information is shown in the console.</p>
|
||||||
|
To display debugging information specific to a widget, or widgets include the widget name:
|
||||||
|
<pre class="prettyprint lang-js">$(function() {
|
||||||
|
$("table").tablesorter({
|
||||||
|
// Show debugging info only for the filter and columnSelector widgets
|
||||||
|
// include "core" to only show the core debugging info
|
||||||
|
debug : "filter columnSelector"
|
||||||
|
});
|
||||||
|
});</pre>
|
||||||
|
The option only tests if the string contains the widget name, so <code>"corefilter"</code> would show debugging for both the core and filter widget.
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td><a href="example-option-debug.html">Example</a></td>
|
<td><a href="example-option-debug.html">Example</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
||||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||||
*/
|
*/
|
||||||
/*! tablesorter (FORK) - updated 2018-02-25 (v2.29.6)*/
|
/*! tablesorter (FORK) - updated 2018-03-18 (v2.30.0)*/
|
||||||
/* 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.6 *//*
|
/*! TableSorter (FORK) v2.30.0 *//*
|
||||||
* 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.6',
|
version : '2.30.0',
|
||||||
|
|
||||||
parsers : [],
|
parsers : [],
|
||||||
widgets : [],
|
widgets : [],
|
||||||
@ -234,7 +234,7 @@
|
|||||||
setup : function( table, c ) {
|
setup : function( table, c ) {
|
||||||
// if no thead or tbody, or tablesorter is already present, quit
|
// if no thead or tbody, or tablesorter is already present, quit
|
||||||
if ( !table || !table.tHead || table.tBodies.length === 0 || table.hasInitialized === true ) {
|
if ( !table || !table.tHead || table.tBodies.length === 0 || table.hasInitialized === true ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
if ( table.hasInitialized ) {
|
if ( table.hasInitialized ) {
|
||||||
console.warn( 'Stopping initialization. Tablesorter has already been initialized' );
|
console.warn( 'Stopping initialization. Tablesorter has already been initialized' );
|
||||||
} else {
|
} else {
|
||||||
@ -255,7 +255,7 @@
|
|||||||
table.config = c;
|
table.config = c;
|
||||||
// save the settings where they read
|
// save the settings where they read
|
||||||
$.data( table, 'tablesorter', c );
|
$.data( table, 'tablesorter', c );
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Initializing tablesorter v' + ts.version );
|
console[ console.group ? 'group' : 'log' ]( 'Initializing tablesorter v' + ts.version );
|
||||||
$.data( table, 'startoveralltimer', new Date() );
|
$.data( table, 'startoveralltimer', new Date() );
|
||||||
}
|
}
|
||||||
@ -361,9 +361,9 @@
|
|||||||
// initialized
|
// initialized
|
||||||
table.hasInitialized = true;
|
table.hasInitialized = true;
|
||||||
table.isProcessing = false;
|
table.isProcessing = false;
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'Overall initialization time:' + ts.benchmark( $.data( table, 'startoveralltimer' ) ) );
|
console.log( 'Overall initialization time:' + ts.benchmark( $.data( table, 'startoveralltimer' ) ) );
|
||||||
if ( c.debug && console.groupEnd ) { console.groupEnd(); }
|
if ( ts.debug(c, 'core') && console.groupEnd ) { console.groupEnd(); }
|
||||||
}
|
}
|
||||||
$table.triggerHandler( 'tablesorter-initialized', table );
|
$table.triggerHandler( 'tablesorter-initialized', table );
|
||||||
if ( typeof c.initialized === 'function' ) {
|
if ( typeof c.initialized === 'function' ) {
|
||||||
@ -560,7 +560,7 @@
|
|||||||
c.headerList = [];
|
c.headerList = [];
|
||||||
c.headerContent = [];
|
c.headerContent = [];
|
||||||
c.sortVars = [];
|
c.sortVars = [];
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
timer = new Date();
|
timer = new Date();
|
||||||
}
|
}
|
||||||
// children tr in tfoot - see issue #196 & #547
|
// children tr in tfoot - see issue #196 & #547
|
||||||
@ -655,7 +655,7 @@
|
|||||||
});
|
});
|
||||||
// enable/disable sorting
|
// enable/disable sorting
|
||||||
ts.updateHeader( c );
|
ts.updateHeader( c );
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'Built headers:' + ts.benchmark( timer ) );
|
console.log( 'Built headers:' + ts.benchmark( timer ) );
|
||||||
console.log( c.$headers );
|
console.log( c.$headers );
|
||||||
}
|
}
|
||||||
@ -678,14 +678,15 @@
|
|||||||
noParser, parser, extractor, time, tbody, len,
|
noParser, parser, extractor, time, tbody, len,
|
||||||
table = c.table,
|
table = c.table,
|
||||||
tbodyIndex = 0,
|
tbodyIndex = 0,
|
||||||
debug = {};
|
debug = ts.debug(c, 'core'),
|
||||||
|
debugOutput = {};
|
||||||
// update table bodies in case we start with an empty table
|
// update table bodies in case we start with an empty table
|
||||||
c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
|
c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
|
||||||
tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies;
|
tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies;
|
||||||
len = tbody.length;
|
len = tbody.length;
|
||||||
if ( len === 0 ) {
|
if ( len === 0 ) {
|
||||||
return c.debug ? console.warn( 'Warning: *Empty table!* Not building a parser cache' ) : '';
|
return debug ? console.warn( 'Warning: *Empty table!* Not building a parser cache' ) : '';
|
||||||
} else if ( c.debug ) {
|
} else if ( debug ) {
|
||||||
time = new Date();
|
time = new Date();
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Detecting parsers for each column' );
|
console[ console.group ? 'group' : 'log' ]( 'Detecting parsers for each column' );
|
||||||
}
|
}
|
||||||
@ -727,8 +728,8 @@
|
|||||||
if ( !parser ) {
|
if ( !parser ) {
|
||||||
parser = ts.detectParserForColumn( c, rows, -1, colIndex );
|
parser = ts.detectParserForColumn( c, rows, -1, colIndex );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
debug[ '(' + colIndex + ') ' + header.text() ] = {
|
debugOutput[ '(' + colIndex + ') ' + header.text() ] = {
|
||||||
parser : parser.id,
|
parser : parser.id,
|
||||||
extractor : extractor ? extractor.id : 'none',
|
extractor : extractor ? extractor.id : 'none',
|
||||||
string : c.strings[ colIndex ],
|
string : c.strings[ colIndex ],
|
||||||
@ -754,9 +755,9 @@
|
|||||||
}
|
}
|
||||||
tbodyIndex += ( list.parsers.length ) ? len : 1;
|
tbodyIndex += ( list.parsers.length ) ? len : 1;
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
if ( !ts.isEmptyObject( debug ) ) {
|
if ( !ts.isEmptyObject( debugOutput ) ) {
|
||||||
console[ console.table ? 'table' : 'log' ]( debug );
|
console[ console.table ? 'table' : 'log' ]( debugOutput );
|
||||||
} else {
|
} else {
|
||||||
console.warn( ' No parsers detected!' );
|
console.warn( ' No parsers detected!' );
|
||||||
}
|
}
|
||||||
@ -782,7 +783,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
getParserById : function( name ) {
|
getParserById : function( name ) {
|
||||||
/*jshint eqeqeq:false */
|
/*jshint eqeqeq:false */ // eslint-disable-next-line eqeqeq
|
||||||
if ( name == 'false' ) { return false; }
|
if ( name == 'false' ) { return false; }
|
||||||
var indx,
|
var indx,
|
||||||
len = ts.parsers.length;
|
len = ts.parsers.length;
|
||||||
@ -799,6 +800,7 @@
|
|||||||
indx = ts.parsers.length,
|
indx = ts.parsers.length,
|
||||||
node = false,
|
node = false,
|
||||||
nodeValue = '',
|
nodeValue = '',
|
||||||
|
debug = ts.debug(c, 'core'),
|
||||||
keepLooking = true;
|
keepLooking = true;
|
||||||
while ( nodeValue === '' && keepLooking ) {
|
while ( nodeValue === '' && keepLooking ) {
|
||||||
rowIndex++;
|
rowIndex++;
|
||||||
@ -809,7 +811,7 @@
|
|||||||
node = rows[ rowIndex ].cells[ cellIndex ];
|
node = rows[ rowIndex ].cells[ cellIndex ];
|
||||||
nodeValue = ts.getElementText( c, node, cellIndex );
|
nodeValue = ts.getElementText( c, node, cellIndex );
|
||||||
$node = $( node );
|
$node = $( node );
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Checking if value was empty on row ' + rowIndex + ', column: ' +
|
console.log( 'Checking if value was empty on row ' + rowIndex + ', column: ' +
|
||||||
cellIndex + ': "' + nodeValue + '"' );
|
cellIndex + ': "' + nodeValue + '"' );
|
||||||
}
|
}
|
||||||
@ -891,7 +893,8 @@
|
|||||||
cols, $cells, cell, cacheTime, totalRows, rowData, prevRowData,
|
cols, $cells, cell, cacheTime, totalRows, rowData, prevRowData,
|
||||||
colMax, span, cacheIndex, hasParser, max, len, index,
|
colMax, span, cacheIndex, hasParser, max, len, index,
|
||||||
table = c.table,
|
table = c.table,
|
||||||
parsers = c.parsers;
|
parsers = c.parsers,
|
||||||
|
debug = ts.debug(c, 'core');
|
||||||
// update tbody variable
|
// update tbody variable
|
||||||
c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
|
c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
|
||||||
$tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies,
|
$tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies,
|
||||||
@ -899,9 +902,9 @@
|
|||||||
c.totalRows = 0;
|
c.totalRows = 0;
|
||||||
// if no parsers found, return - it's an empty table.
|
// if no parsers found, return - it's an empty table.
|
||||||
if ( !parsers ) {
|
if ( !parsers ) {
|
||||||
return c.debug ? console.warn( 'Warning: *Empty table!* Not building a cache' ) : '';
|
return debug ? console.warn( 'Warning: *Empty table!* Not building a cache' ) : '';
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
cacheTime = new Date();
|
cacheTime = new Date();
|
||||||
}
|
}
|
||||||
// processing icon
|
// processing icon
|
||||||
@ -970,7 +973,7 @@
|
|||||||
cell = $row[ 0 ].cells[ colIndex ];
|
cell = $row[ 0 ].cells[ colIndex ];
|
||||||
if ( cell && cacheIndex < c.columns ) {
|
if ( cell && cacheIndex < c.columns ) {
|
||||||
hasParser = typeof parsers[ cacheIndex ] !== 'undefined';
|
hasParser = typeof parsers[ cacheIndex ] !== 'undefined';
|
||||||
if ( !hasParser && c.debug ) {
|
if ( !hasParser && debug ) {
|
||||||
console.warn( 'No parser found for row: ' + rowIndex + ', column: ' + colIndex +
|
console.warn( 'No parser found for row: ' + rowIndex + ', column: ' + colIndex +
|
||||||
'; cell containing: "' + $(cell).text() + '"; does it have a header?' );
|
'; cell containing: "' + $(cell).text() + '"; does it have a header?' );
|
||||||
}
|
}
|
||||||
@ -1018,7 +1021,7 @@
|
|||||||
if ( c.showProcessing ) {
|
if ( c.showProcessing ) {
|
||||||
ts.isProcessing( table ); // remove processing icon
|
ts.isProcessing( table ); // remove processing icon
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
len = Math.min( 5, c.cache[ 0 ].normalized.length );
|
len = Math.min( 5, c.cache[ 0 ].normalized.length );
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Building cache for ' + c.totalRows +
|
console[ console.group ? 'group' : 'log' ]( 'Building cache for ' + c.totalRows +
|
||||||
' rows (showing ' + len + ' rows in log) and ' + c.columns + ' columns' +
|
' rows (showing ' + len + ' rows in log) and ' + c.columns + ' columns' +
|
||||||
@ -1049,7 +1052,7 @@
|
|||||||
data = { raw : [], parsed: [], $cell: [] },
|
data = { raw : [], parsed: [], $cell: [] },
|
||||||
c = table.config;
|
c = table.config;
|
||||||
if ( ts.isEmptyObject( c ) ) {
|
if ( ts.isEmptyObject( c ) ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.warn( 'No cache found - aborting getColumnText function!' );
|
console.warn( 'No cache found - aborting getColumnText function!' );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1393,7 +1396,7 @@
|
|||||||
ts.resortComplete( c, callback );
|
ts.resortComplete( c, callback );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.error( 'updateCell aborted, tbody missing or not within the indicated table' );
|
console.error( 'updateCell aborted, tbody missing or not within the indicated table' );
|
||||||
}
|
}
|
||||||
c.table.isUpdating = false;
|
c.table.isUpdating = false;
|
||||||
@ -1416,7 +1419,7 @@
|
|||||||
// row contained in the table?
|
// row contained in the table?
|
||||||
( ts.getClosest( $row, 'table' )[ 0 ] !== c.table )
|
( ts.getClosest( $row, 'table' )[ 0 ] !== c.table )
|
||||||
) {
|
) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.error( 'addRows method requires (1) a jQuery selector reference to rows that have already ' +
|
console.error( 'addRows method requires (1) a jQuery selector reference to rows that have already ' +
|
||||||
'been added to the table, or (2) row HTML string to be added to a table with only one tbody' );
|
'been added to the table, or (2) row HTML string to be added to a table with only one tbody' );
|
||||||
}
|
}
|
||||||
@ -1488,7 +1491,6 @@
|
|||||||
appendCache : function( c, init ) {
|
appendCache : function( c, init ) {
|
||||||
var parsed, totalRows, $tbody, $curTbody, rowIndex, tbodyIndex, appendTime,
|
var parsed, totalRows, $tbody, $curTbody, rowIndex, tbodyIndex, appendTime,
|
||||||
table = c.table,
|
table = c.table,
|
||||||
wo = c.widgetOptions,
|
|
||||||
$tbodies = c.$tbodies,
|
$tbodies = c.$tbodies,
|
||||||
rows = [],
|
rows = [],
|
||||||
cache = c.cache;
|
cache = c.cache;
|
||||||
@ -1498,7 +1500,7 @@
|
|||||||
return c.appender ? c.appender( table, rows ) :
|
return c.appender ? c.appender( table, rows ) :
|
||||||
table.isUpdating ? c.$table.triggerHandler( 'updateComplete', table ) : ''; // Fixes #532
|
table.isUpdating ? c.$table.triggerHandler( 'updateComplete', table ) : ''; // Fixes #532
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
appendTime = new Date();
|
appendTime = new Date();
|
||||||
}
|
}
|
||||||
for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) {
|
for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) {
|
||||||
@ -1511,7 +1513,7 @@
|
|||||||
for ( rowIndex = 0; rowIndex < totalRows; rowIndex++ ) {
|
for ( rowIndex = 0; rowIndex < totalRows; rowIndex++ ) {
|
||||||
rows[rows.length] = parsed[ rowIndex ][ c.columns ].$row;
|
rows[rows.length] = parsed[ rowIndex ][ c.columns ].$row;
|
||||||
// removeRows used by the pager plugin; don't render if using ajax - fixes #411
|
// removeRows used by the pager plugin; don't render if using ajax - fixes #411
|
||||||
if ( !c.appender || ( c.pager && ( !c.pager.removeRows || !wo.pager_removeRows ) && !c.pager.ajax ) ) {
|
if ( !c.appender || ( c.pager && !c.pager.removeRows && !c.pager.ajax ) ) {
|
||||||
$curTbody.append( parsed[ rowIndex ][ c.columns ].$row );
|
$curTbody.append( parsed[ rowIndex ][ c.columns ].$row );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1522,7 +1524,7 @@
|
|||||||
if ( c.appender ) {
|
if ( c.appender ) {
|
||||||
c.appender( table, rows );
|
c.appender( table, rows );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'Rebuilt table' + ts.benchmark( appendTime ) );
|
console.log( 'Rebuilt table' + ts.benchmark( appendTime ) );
|
||||||
}
|
}
|
||||||
// apply table widgets; but not before ajax completes
|
// apply table widgets; but not before ajax completes
|
||||||
@ -1704,7 +1706,7 @@
|
|||||||
// empty table - fixes #206/#346
|
// empty table - fixes #206/#346
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( c.debug ) { sortTime = new Date(); }
|
if ( ts.debug(c, 'core') ) { sortTime = new Date(); }
|
||||||
// cache textSorter to optimize speed
|
// cache textSorter to optimize speed
|
||||||
if ( typeof textSorter === 'object' ) {
|
if ( typeof textSorter === 'object' ) {
|
||||||
colMax = c.columns;
|
colMax = c.columns;
|
||||||
@ -1766,7 +1768,7 @@
|
|||||||
return a[ c.columns ].order - b[ c.columns ].order;
|
return a[ c.columns ].order - b[ c.columns ].order;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'Applying sort ' + sortList.toString() + ts.benchmark( sortTime ) );
|
console.log( 'Applying sort ' + sortList.toString() + ts.benchmark( sortTime ) );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2019,6 +2021,7 @@
|
|||||||
var applied, time, name,
|
var applied, time, name,
|
||||||
c = table.config,
|
c = table.config,
|
||||||
wo = c.widgetOptions,
|
wo = c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'core'),
|
||||||
widget = ts.getWidgetById( id );
|
widget = ts.getWidgetById( id );
|
||||||
if ( widget ) {
|
if ( widget ) {
|
||||||
name = widget.id;
|
name = widget.id;
|
||||||
@ -2027,7 +2030,7 @@
|
|||||||
if ( $.inArray( name, c.widgets ) < 0 ) {
|
if ( $.inArray( name, c.widgets ) < 0 ) {
|
||||||
c.widgets[ c.widgets.length ] = name;
|
c.widgets[ c.widgets.length ] = name;
|
||||||
}
|
}
|
||||||
if ( c.debug ) { time = new Date(); }
|
if ( debug ) { time = new Date(); }
|
||||||
|
|
||||||
if ( init || !( c.widgetInit[ name ] ) ) {
|
if ( init || !( c.widgetInit[ name ] ) ) {
|
||||||
// set init flag first to prevent calling init more than once (e.g. pager)
|
// set init flag first to prevent calling init more than once (e.g. pager)
|
||||||
@ -2038,7 +2041,7 @@
|
|||||||
}
|
}
|
||||||
if ( typeof widget.init === 'function' ) {
|
if ( typeof widget.init === 'function' ) {
|
||||||
applied = true;
|
applied = true;
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Initializing ' + name + ' widget' );
|
console[ console.group ? 'group' : 'log' ]( 'Initializing ' + name + ' widget' );
|
||||||
}
|
}
|
||||||
widget.init( table, widget, c, wo );
|
widget.init( table, widget, c, wo );
|
||||||
@ -2046,12 +2049,12 @@
|
|||||||
}
|
}
|
||||||
if ( !init && typeof widget.format === 'function' ) {
|
if ( !init && typeof widget.format === 'function' ) {
|
||||||
applied = true;
|
applied = true;
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Updating ' + name + ' widget' );
|
console[ console.group ? 'group' : 'log' ]( 'Updating ' + name + ' widget' );
|
||||||
}
|
}
|
||||||
widget.format( table, c, wo, false );
|
widget.format( table, c, wo, false );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
if ( applied ) {
|
if ( applied ) {
|
||||||
console.log( 'Completed ' + ( init ? 'initializing ' : 'applying ' ) + name + ' widget' + ts.benchmark( time ) );
|
console.log( 'Completed ' + ( init ? 'initializing ' : 'applying ' ) + name + ' widget' + ts.benchmark( time ) );
|
||||||
if ( console.groupEnd ) { console.groupEnd(); }
|
if ( console.groupEnd ) { console.groupEnd(); }
|
||||||
@ -2064,12 +2067,13 @@
|
|||||||
table = $( table )[ 0 ]; // in case this is called externally
|
table = $( table )[ 0 ]; // in case this is called externally
|
||||||
var indx, len, names, widget, time,
|
var indx, len, names, widget, time,
|
||||||
c = table.config,
|
c = table.config,
|
||||||
|
debug = ts.debug(c, 'core'),
|
||||||
widgets = [];
|
widgets = [];
|
||||||
// prevent numerous consecutive widget applications
|
// prevent numerous consecutive widget applications
|
||||||
if ( init !== false && table.hasInitialized && ( table.isApplyingWidgets || table.isUpdating ) ) {
|
if ( init !== false && table.hasInitialized && ( table.isApplyingWidgets || table.isUpdating ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( c.debug ) { time = new Date(); }
|
if ( debug ) { time = new Date(); }
|
||||||
ts.addWidgetFromClass( table );
|
ts.addWidgetFromClass( table );
|
||||||
// prevent "tablesorter-ready" from firing multiple times in a row
|
// prevent "tablesorter-ready" from firing multiple times in a row
|
||||||
clearTimeout( c.timerReady );
|
clearTimeout( c.timerReady );
|
||||||
@ -2088,7 +2092,7 @@
|
|||||||
// set priority to 10 if not defined
|
// set priority to 10 if not defined
|
||||||
if ( !widget.priority ) { widget.priority = 10; }
|
if ( !widget.priority ) { widget.priority = 10; }
|
||||||
widgets[ indx ] = widget;
|
widgets[ indx ] = widget;
|
||||||
} else if ( c.debug ) {
|
} else if ( debug ) {
|
||||||
console.warn( '"' + names[ indx ] + '" was enabled, but the widget code has not been loaded!' );
|
console.warn( '"' + names[ indx ] + '" was enabled, but the widget code has not been loaded!' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2098,7 +2102,7 @@
|
|||||||
});
|
});
|
||||||
// add/update selected widgets
|
// add/update selected widgets
|
||||||
len = widgets.length;
|
len = widgets.length;
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Start ' + ( init ? 'initializing' : 'applying' ) + ' widgets' );
|
console[ console.group ? 'group' : 'log' ]( 'Start ' + ( init ? 'initializing' : 'applying' ) + ' widgets' );
|
||||||
}
|
}
|
||||||
for ( indx = 0; indx < len; indx++ ) {
|
for ( indx = 0; indx < len; indx++ ) {
|
||||||
@ -2107,7 +2111,7 @@
|
|||||||
ts.applyWidgetId( table, widget.id, init );
|
ts.applyWidgetId( table, widget.id, init );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( c.debug && console.groupEnd ) { console.groupEnd(); }
|
if ( debug && console.groupEnd ) { console.groupEnd(); }
|
||||||
}
|
}
|
||||||
c.timerReady = setTimeout( function() {
|
c.timerReady = setTimeout( function() {
|
||||||
table.isApplyingWidgets = false;
|
table.isApplyingWidgets = false;
|
||||||
@ -2117,7 +2121,7 @@
|
|||||||
if ( !init && typeof callback === 'function' ) {
|
if ( !init && typeof callback === 'function' ) {
|
||||||
callback( table );
|
callback( table );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
widget = c.widgets.length;
|
widget = c.widgets.length;
|
||||||
console.log( 'Completed ' +
|
console.log( 'Completed ' +
|
||||||
( init === true ? 'initializing ' : 'applying ' ) + widget +
|
( init === true ? 'initializing ' : 'applying ' ) + widget +
|
||||||
@ -2154,7 +2158,7 @@
|
|||||||
c.widgets.splice( indx, 1 );
|
c.widgets.splice( indx, 1 );
|
||||||
}
|
}
|
||||||
if ( widget && widget.remove ) {
|
if ( widget && widget.remove ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( ( refreshing ? 'Refreshing' : 'Removing' ) + ' "' + name[ index ] + '" widget' );
|
console.log( ( refreshing ? 'Refreshing' : 'Removing' ) + ' "' + name[ index ] + '" widget' );
|
||||||
}
|
}
|
||||||
widget.remove( table, c, c.widgetOptions, refreshing );
|
widget.remove( table, c, c.widgetOptions, refreshing );
|
||||||
@ -2208,6 +2212,12 @@
|
|||||||
log : function() {
|
log : function() {
|
||||||
console.log( arguments );
|
console.log( arguments );
|
||||||
},
|
},
|
||||||
|
debug : function(c, name) {
|
||||||
|
return c && (
|
||||||
|
c.debug === true ||
|
||||||
|
typeof c.debug === 'string' && c.debug.indexOf(name) > -1
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
// $.isEmptyObject from jQuery v1.4
|
// $.isEmptyObject from jQuery v1.4
|
||||||
isEmptyObject : function( obj ) {
|
isEmptyObject : function( obj ) {
|
||||||
@ -2513,7 +2523,7 @@
|
|||||||
ignore = 'headers sortForce sortList sortAppend widgets'.split( ' ' ),
|
ignore = 'headers sortForce sortList sortAppend widgets'.split( ' ' ),
|
||||||
orig = c.originalSettings;
|
orig = c.originalSettings;
|
||||||
if ( orig ) {
|
if ( orig ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
timer = new Date();
|
timer = new Date();
|
||||||
}
|
}
|
||||||
for ( setting in orig ) {
|
for ( setting in orig ) {
|
||||||
@ -2529,7 +2539,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'validate options time:' + ts.benchmark( timer ) );
|
console.log( 'validate options time:' + ts.benchmark( timer ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2560,7 +2570,6 @@
|
|||||||
var events,
|
var events,
|
||||||
$t = $( table ),
|
$t = $( table ),
|
||||||
c = table.config,
|
c = table.config,
|
||||||
debug = c.debug,
|
|
||||||
$h = $t.find( 'thead:first' ),
|
$h = $t.find( 'thead:first' ),
|
||||||
$r = $h.find( 'tr.' + ts.css.headerRow ).removeClass( ts.css.headerRow + ' ' + c.cssHeaderRow ),
|
$r = $h.find( 'tr.' + ts.css.headerRow ).removeClass( ts.css.headerRow + ' ' + c.cssHeaderRow ),
|
||||||
$f = $t.find( 'tfoot:first > tr' ).children( 'th, td' );
|
$f = $t.find( 'tfoot:first > tr' ).children( 'th, td' );
|
||||||
@ -2598,7 +2607,7 @@
|
|||||||
if ( typeof callback === 'function' ) {
|
if ( typeof callback === 'function' ) {
|
||||||
callback( table );
|
callback( table );
|
||||||
}
|
}
|
||||||
if ( debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'tablesorter has been removed' );
|
console.log( 'tablesorter has been removed' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2715,7 +2724,7 @@
|
|||||||
is : function( str ) {
|
is : function( str ) {
|
||||||
return ts.regex.isoDate.test( str );
|
return ts.regex.isoDate.test( str );
|
||||||
},
|
},
|
||||||
format : function( str, table ) {
|
format : function( str ) {
|
||||||
var date = str ? new Date( str.replace( ts.regex.dash, '/' ) ) : str;
|
var date = str ? new Date( str.replace( ts.regex.dash, '/' ) ) : str;
|
||||||
return date instanceof Date && isFinite( date ) ? date.getTime() : str;
|
return date instanceof Date && isFinite( date ) ? date.getTime() : str;
|
||||||
},
|
},
|
||||||
@ -2758,7 +2767,7 @@
|
|||||||
// Jan 01, 2013 12:34:56 PM or 01 Jan 2013
|
// Jan 01, 2013 12:34:56 PM or 01 Jan 2013
|
||||||
return ts.regex.usLongDateTest1.test( str ) || ts.regex.usLongDateTest2.test( str );
|
return ts.regex.usLongDateTest1.test( str ) || ts.regex.usLongDateTest2.test( str );
|
||||||
},
|
},
|
||||||
format : function( str, table ) {
|
format : function( str ) {
|
||||||
var date = str ? new Date( str.replace( ts.regex.dateReplace, '$1 $2' ) ) : str;
|
var date = str ? new Date( str.replace( ts.regex.dateReplace, '$1 $2' ) ) : str;
|
||||||
return date instanceof Date && isFinite( date ) ? date.getTime() : str;
|
return date instanceof Date && isFinite( date ) ? date.getTime() : str;
|
||||||
},
|
},
|
||||||
@ -2819,7 +2828,7 @@
|
|||||||
is : function( str ) {
|
is : function( str ) {
|
||||||
return ts.regex.timeTest.test( str );
|
return ts.regex.timeTest.test( str );
|
||||||
},
|
},
|
||||||
format : function( str, table ) {
|
format : function( str ) {
|
||||||
// isolate time... ignore month, day and year
|
// isolate time... ignore month, day and year
|
||||||
var temp,
|
var temp,
|
||||||
timePart = ( str || '' ).match( ts.regex.timeMatch ),
|
timePart = ( str || '' ).match( ts.regex.timeMatch ),
|
||||||
@ -2896,7 +2905,7 @@
|
|||||||
|
|
||||||
})( jQuery );
|
})( jQuery );
|
||||||
|
|
||||||
/*! Widget: storage - updated 4/18/2017 (v2.28.8) */
|
/*! Widget: storage - updated 2018-03-18 (v2.30.0) */
|
||||||
/*global JSON:false */
|
/*global JSON:false */
|
||||||
;(function ($, window, document) {
|
;(function ($, window, document) {
|
||||||
'use strict';
|
'use strict';
|
||||||
@ -2942,6 +2951,7 @@
|
|||||||
values = {},
|
values = {},
|
||||||
c = table.config,
|
c = table.config,
|
||||||
wo = c && c.widgetOptions,
|
wo = c && c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'storage'),
|
||||||
storageType = (
|
storageType = (
|
||||||
( options && options.storageType ) || ( wo && wo.storage_storageType )
|
( options && options.storageType ) || ( wo && wo.storage_storageType )
|
||||||
).toString().charAt(0).toLowerCase(),
|
).toString().charAt(0).toLowerCase(),
|
||||||
@ -2970,14 +2980,12 @@
|
|||||||
hasStorage = true;
|
hasStorage = true;
|
||||||
window[storageType].removeItem('_tmptest');
|
window[storageType].removeItem('_tmptest');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (c && c.debug) {
|
|
||||||
console.warn( storageType + ' is not supported in this browser' );
|
console.warn( storageType + ' is not supported in this browser' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (debug) {
|
||||||
if (c.debug) {
|
console.log('Storage >> Using', hasStorage ? storageType : 'cookies');
|
||||||
console.log('Storage widget using', hasStorage ? storageType : 'cookies');
|
|
||||||
}
|
}
|
||||||
// *** get value ***
|
// *** get value ***
|
||||||
if ($.parseJSON) {
|
if ($.parseJSON) {
|
||||||
@ -3013,7 +3021,7 @@
|
|||||||
|
|
||||||
})(jQuery, window, document);
|
})(jQuery, window, document);
|
||||||
|
|
||||||
/*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
|
/*! Widget: uitheme - updated 2018-03-18 (v2.30.0) */
|
||||||
;(function ($) {
|
;(function ($) {
|
||||||
'use strict';
|
'use strict';
|
||||||
var ts = $.tablesorter || {};
|
var ts = $.tablesorter || {};
|
||||||
@ -3078,8 +3086,9 @@
|
|||||||
theme = c.theme || 'jui',
|
theme = c.theme || 'jui',
|
||||||
themes = themesAll[theme] || {},
|
themes = themesAll[theme] || {},
|
||||||
remove = $.trim( [ themes.sortNone, themes.sortDesc, themes.sortAsc, themes.active ].join( ' ' ) ),
|
remove = $.trim( [ themes.sortNone, themes.sortDesc, themes.sortAsc, themes.active ].join( ' ' ) ),
|
||||||
iconRmv = $.trim( [ themes.iconSortNone, themes.iconSortDesc, themes.iconSortAsc ].join( ' ' ) );
|
iconRmv = $.trim( [ themes.iconSortNone, themes.iconSortDesc, themes.iconSortAsc ].join( ' ' ) ),
|
||||||
if (c.debug) { time = new Date(); }
|
debug = ts.debug(c, 'uitheme');
|
||||||
|
if (debug) { time = new Date(); }
|
||||||
// initialization code - run once
|
// initialization code - run once
|
||||||
if (!$table.hasClass('tablesorter-' + theme) || c.theme !== c.appliedTheme || !wo.uitheme_applied) {
|
if (!$table.hasClass('tablesorter-' + theme) || c.theme !== c.appliedTheme || !wo.uitheme_applied) {
|
||||||
wo.uitheme_applied = true;
|
wo.uitheme_applied = true;
|
||||||
@ -3182,8 +3191,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('Applying ' + theme + ' theme' + ts.benchmark(time));
|
console.log('uitheme >> Applied ' + theme + ' theme' + ts.benchmark(time));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove: function(table, c, wo, refreshing) {
|
remove: function(table, c, wo, refreshing) {
|
||||||
@ -3288,7 +3297,7 @@
|
|||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
/*! Widget: filter - updated 2018-01-30 (v2.29.5) *//*
|
/*! Widget: filter - updated 2018-03-18 (v2.30.0) *//*
|
||||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -3570,6 +3579,7 @@
|
|||||||
if ( tsfRegex.exact.test( data.iFilter ) ) {
|
if ( tsfRegex.exact.test( data.iFilter ) ) {
|
||||||
var txt = data.iFilter.replace( tsfRegex.exact, '' ),
|
var txt = data.iFilter.replace( tsfRegex.exact, '' ),
|
||||||
filter = tsf.parseFilter( c, txt, data ) || '';
|
filter = tsf.parseFilter( c, txt, data ) || '';
|
||||||
|
// eslint-disable-next-line eqeqeq
|
||||||
return data.anyMatch ? $.inArray( filter, data.rowArray ) >= 0 : filter == data.iExact;
|
return data.anyMatch ? $.inArray( filter, data.rowArray ) >= 0 : filter == data.iExact;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@ -3837,7 +3847,7 @@
|
|||||||
|
|
||||||
// show processing icon
|
// show processing icon
|
||||||
if ( c.showProcessing ) {
|
if ( c.showProcessing ) {
|
||||||
txt = 'filterStart filterEnd '.split( ' ' ).join( c.namespace + 'filter ' );
|
txt = 'filterStart filterEnd '.split( ' ' ).join( c.namespace + 'filter-sp ' );
|
||||||
c.$table
|
c.$table
|
||||||
.unbind( txt.replace( ts.regex.spaces, ' ' ) )
|
.unbind( txt.replace( ts.regex.spaces, ' ' ) )
|
||||||
.bind( txt, function( event, columns ) {
|
.bind( txt, function( event, columns ) {
|
||||||
@ -3916,6 +3926,9 @@
|
|||||||
c.lastSearch = c.$table.data( 'lastSearch' );
|
c.lastSearch = c.$table.data( 'lastSearch' );
|
||||||
c.$table.triggerHandler( 'filterInit', c );
|
c.$table.triggerHandler( 'filterInit', c );
|
||||||
tsf.findRows( c.table, c.lastSearch || [] );
|
tsf.findRows( c.table, c.lastSearch || [] );
|
||||||
|
if (ts.debug(c, 'filter')) {
|
||||||
|
console.log('Filter >> Widget initialized');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
if ( $.isEmptyObject( wo.filter_formatter ) ) {
|
if ( $.isEmptyObject( wo.filter_formatter ) ) {
|
||||||
completed();
|
completed();
|
||||||
@ -4616,6 +4629,7 @@
|
|||||||
storedFilters = $.extend( [], filters ),
|
storedFilters = $.extend( [], filters ),
|
||||||
c = table.config,
|
c = table.config,
|
||||||
wo = c.widgetOptions,
|
wo = c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'filter'),
|
||||||
// data object passed to filters; anyMatch is a flag for the filters
|
// data object passed to filters; anyMatch is a flag for the filters
|
||||||
data = {
|
data = {
|
||||||
anyMatch: false,
|
anyMatch: false,
|
||||||
@ -4632,7 +4646,6 @@
|
|||||||
defaultColFilter : [],
|
defaultColFilter : [],
|
||||||
defaultAnyFilter : ts.getColumnData( table, wo.filter_defaultFilter, c.columns, true ) || ''
|
defaultAnyFilter : ts.getColumnData( table, wo.filter_defaultFilter, c.columns, true ) || ''
|
||||||
};
|
};
|
||||||
|
|
||||||
// parse columns after formatter, in case the class is added at that point
|
// parse columns after formatter, in case the class is added at that point
|
||||||
data.parsed = [];
|
data.parsed = [];
|
||||||
for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
|
for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
|
||||||
@ -4654,8 +4667,8 @@
|
|||||||
( ts.getColumnData( table, wo.filter_excludeFilter, columnIndex, true ) || '' ).split( /\s+/ );
|
( ts.getColumnData( table, wo.filter_excludeFilter, columnIndex, true ) || '' ).split( /\s+/ );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Filter: Starting filter widget search', filters );
|
console.log( 'Filter >> Starting filter widget search', filters );
|
||||||
time = new Date();
|
time = new Date();
|
||||||
}
|
}
|
||||||
// filtered rows count
|
// filtered rows count
|
||||||
@ -4753,8 +4766,8 @@
|
|||||||
notFiltered = $rows.not( '.' + wo.filter_filteredRow ).length;
|
notFiltered = $rows.not( '.' + wo.filter_filteredRow ).length;
|
||||||
// can't search when all rows are hidden - this happens when looking for exact matches
|
// can't search when all rows are hidden - this happens when looking for exact matches
|
||||||
if ( searchFiltered && notFiltered === 0 ) { searchFiltered = false; }
|
if ( searchFiltered && notFiltered === 0 ) { searchFiltered = false; }
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Filter: Searching through ' +
|
console.log( 'Filter >> Searching through ' +
|
||||||
( searchFiltered && notFiltered < len ? notFiltered : 'all' ) + ' rows' );
|
( searchFiltered && notFiltered < len ? notFiltered : 'all' ) + ' rows' );
|
||||||
}
|
}
|
||||||
if ( data.anyMatchFlag ) {
|
if ( data.anyMatchFlag ) {
|
||||||
@ -4857,8 +4870,8 @@
|
|||||||
if ( wo.filter_saveFilters && ts.storage ) {
|
if ( wo.filter_saveFilters && ts.storage ) {
|
||||||
ts.storage( table, 'tablesorter-filters', tsf.processFilters( storedFilters, true ) );
|
ts.storage( table, 'tablesorter-filters', tsf.processFilters( storedFilters, true ) );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Completed filter widget search' + ts.benchmark(time) );
|
console.log( 'Filter >> Completed search' + ts.benchmark(time) );
|
||||||
}
|
}
|
||||||
if ( wo.filter_initialized ) {
|
if ( wo.filter_initialized ) {
|
||||||
c.$table.triggerHandler( 'filterBeforeEnd', c );
|
c.$table.triggerHandler( 'filterBeforeEnd', c );
|
||||||
@ -5073,13 +5086,13 @@
|
|||||||
options += '<option';
|
options += '<option';
|
||||||
for ( val in option ) {
|
for ( val in option ) {
|
||||||
if ( option.hasOwnProperty( val ) && val !== 'text' ) {
|
if ( option.hasOwnProperty( val ) && val !== 'text' ) {
|
||||||
options += ' ' + val + '="' + option[ val ] + '"';
|
options += ' ' + val + '="' + option[ val ].replace( tsfRegex.quote, '"' ) + '"';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( !option.value ) {
|
if ( !option.value ) {
|
||||||
options += ' value="' + option.text + '"';
|
options += ' value="' + option.text.replace( tsfRegex.quote, '"' ) + '"';
|
||||||
}
|
}
|
||||||
options += '>' + option.text + '</option>';
|
options += '>' + option.text.replace( tsfRegex.quote, '"' ) + '</option>';
|
||||||
// above code is needed in jQuery < v1.8
|
// above code is needed in jQuery < v1.8
|
||||||
|
|
||||||
// make sure we don't turn an object into a string (objects without a "text" property)
|
// make sure we don't turn an object into a string (objects without a "text" property)
|
||||||
@ -5981,7 +5994,7 @@
|
|||||||
|
|
||||||
})( jQuery, window );
|
})( jQuery, window );
|
||||||
|
|
||||||
/*! Widget: saveSort - updated 10/31/2015 (v2.24.0) *//*
|
/*! Widget: saveSort - updated 2018-03-18 (v2.30.0) *//*
|
||||||
* Requires tablesorter v2.16+
|
* Requires tablesorter v2.16+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -5989,6 +6002,15 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
var ts = $.tablesorter || {};
|
var ts = $.tablesorter || {};
|
||||||
|
|
||||||
|
function getStoredSortList(c) {
|
||||||
|
var stored = ts.storage( c.table, 'tablesorter-savesort' );
|
||||||
|
return (stored && stored.hasOwnProperty('sortList') && $.isArray(stored.sortList)) ? stored.sortList : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function sortListChanged(c, sortList) {
|
||||||
|
return (sortList || getStoredSortList(c)).join(',') !== c.sortList.join(',');
|
||||||
|
}
|
||||||
|
|
||||||
// this widget saves the last sort only if the
|
// this widget saves the last sort only if the
|
||||||
// saveSort widget option is true AND the
|
// saveSort widget option is true AND the
|
||||||
// $.tablesorter.storage function is included
|
// $.tablesorter.storage function is included
|
||||||
@ -6004,18 +6026,19 @@
|
|||||||
thisWidget.format(table, c, wo, true);
|
thisWidget.format(table, c, wo, true);
|
||||||
},
|
},
|
||||||
format: function(table, c, wo, init) {
|
format: function(table, c, wo, init) {
|
||||||
var stored, time,
|
var time,
|
||||||
$table = c.$table,
|
$table = c.$table,
|
||||||
saveSort = wo.saveSort !== false, // make saveSort active/inactive; default to true
|
saveSort = wo.saveSort !== false, // make saveSort active/inactive; default to true
|
||||||
sortList = { 'sortList' : c.sortList };
|
sortList = { 'sortList' : c.sortList },
|
||||||
if (c.debug) {
|
debug = ts.debug(c, 'saveSort');
|
||||||
|
if (debug) {
|
||||||
time = new Date();
|
time = new Date();
|
||||||
}
|
}
|
||||||
if ($table.hasClass('hasSaveSort')) {
|
if ($table.hasClass('hasSaveSort')) {
|
||||||
if (saveSort && table.hasInitialized && ts.storage) {
|
if (saveSort && table.hasInitialized && ts.storage && sortListChanged(c)) {
|
||||||
ts.storage( table, 'tablesorter-savesort', sortList );
|
ts.storage( table, 'tablesorter-savesort', sortList );
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('saveSort widget: Saving last sort: ' + c.sortList + ts.benchmark(time));
|
console.log('saveSort >> Saving last sort: ' + c.sortList + ts.benchmark(time));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -6024,10 +6047,9 @@
|
|||||||
sortList = '';
|
sortList = '';
|
||||||
// get data
|
// get data
|
||||||
if (ts.storage) {
|
if (ts.storage) {
|
||||||
stored = ts.storage( table, 'tablesorter-savesort' );
|
sortList = getStoredSortList(c);
|
||||||
sortList = (stored && stored.hasOwnProperty('sortList') && $.isArray(stored.sortList)) ? stored.sortList : '';
|
if (debug) {
|
||||||
if (c.debug) {
|
console.log('saveSort >> Last sort loaded: "' + sortList + '"' + ts.benchmark(time));
|
||||||
console.log('saveSort: Last sort loaded: "' + sortList + '"' + ts.benchmark(time));
|
|
||||||
}
|
}
|
||||||
$table.bind('saveSortReset', function(event) {
|
$table.bind('saveSortReset', function(event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
@ -6040,9 +6062,11 @@
|
|||||||
c.sortList = sortList;
|
c.sortList = sortList;
|
||||||
} else if (table.hasInitialized && sortList && sortList.length > 0) {
|
} else if (table.hasInitialized && sortList && sortList.length > 0) {
|
||||||
// update sort change
|
// update sort change
|
||||||
|
if (sortListChanged(c, sortList)) {
|
||||||
ts.sortOn(c, sortList);
|
ts.sortOn(c, sortList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
remove: function(table, c) {
|
remove: function(table, c) {
|
||||||
c.$table.removeClass('hasSaveSort');
|
c.$table.removeClass('hasSaveSort');
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*! TableSorter (FORK) v2.29.6 *//*
|
/*! TableSorter (FORK) v2.30.0 *//*
|
||||||
* 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.6',
|
version : '2.30.0',
|
||||||
|
|
||||||
parsers : [],
|
parsers : [],
|
||||||
widgets : [],
|
widgets : [],
|
||||||
@ -216,7 +216,7 @@
|
|||||||
setup : function( table, c ) {
|
setup : function( table, c ) {
|
||||||
// if no thead or tbody, or tablesorter is already present, quit
|
// if no thead or tbody, or tablesorter is already present, quit
|
||||||
if ( !table || !table.tHead || table.tBodies.length === 0 || table.hasInitialized === true ) {
|
if ( !table || !table.tHead || table.tBodies.length === 0 || table.hasInitialized === true ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
if ( table.hasInitialized ) {
|
if ( table.hasInitialized ) {
|
||||||
console.warn( 'Stopping initialization. Tablesorter has already been initialized' );
|
console.warn( 'Stopping initialization. Tablesorter has already been initialized' );
|
||||||
} else {
|
} else {
|
||||||
@ -237,7 +237,7 @@
|
|||||||
table.config = c;
|
table.config = c;
|
||||||
// save the settings where they read
|
// save the settings where they read
|
||||||
$.data( table, 'tablesorter', c );
|
$.data( table, 'tablesorter', c );
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Initializing tablesorter v' + ts.version );
|
console[ console.group ? 'group' : 'log' ]( 'Initializing tablesorter v' + ts.version );
|
||||||
$.data( table, 'startoveralltimer', new Date() );
|
$.data( table, 'startoveralltimer', new Date() );
|
||||||
}
|
}
|
||||||
@ -343,9 +343,9 @@
|
|||||||
// initialized
|
// initialized
|
||||||
table.hasInitialized = true;
|
table.hasInitialized = true;
|
||||||
table.isProcessing = false;
|
table.isProcessing = false;
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'Overall initialization time:' + ts.benchmark( $.data( table, 'startoveralltimer' ) ) );
|
console.log( 'Overall initialization time:' + ts.benchmark( $.data( table, 'startoveralltimer' ) ) );
|
||||||
if ( c.debug && console.groupEnd ) { console.groupEnd(); }
|
if ( ts.debug(c, 'core') && console.groupEnd ) { console.groupEnd(); }
|
||||||
}
|
}
|
||||||
$table.triggerHandler( 'tablesorter-initialized', table );
|
$table.triggerHandler( 'tablesorter-initialized', table );
|
||||||
if ( typeof c.initialized === 'function' ) {
|
if ( typeof c.initialized === 'function' ) {
|
||||||
@ -542,7 +542,7 @@
|
|||||||
c.headerList = [];
|
c.headerList = [];
|
||||||
c.headerContent = [];
|
c.headerContent = [];
|
||||||
c.sortVars = [];
|
c.sortVars = [];
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
timer = new Date();
|
timer = new Date();
|
||||||
}
|
}
|
||||||
// children tr in tfoot - see issue #196 & #547
|
// children tr in tfoot - see issue #196 & #547
|
||||||
@ -637,7 +637,7 @@
|
|||||||
});
|
});
|
||||||
// enable/disable sorting
|
// enable/disable sorting
|
||||||
ts.updateHeader( c );
|
ts.updateHeader( c );
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'Built headers:' + ts.benchmark( timer ) );
|
console.log( 'Built headers:' + ts.benchmark( timer ) );
|
||||||
console.log( c.$headers );
|
console.log( c.$headers );
|
||||||
}
|
}
|
||||||
@ -660,14 +660,15 @@
|
|||||||
noParser, parser, extractor, time, tbody, len,
|
noParser, parser, extractor, time, tbody, len,
|
||||||
table = c.table,
|
table = c.table,
|
||||||
tbodyIndex = 0,
|
tbodyIndex = 0,
|
||||||
debug = {};
|
debug = ts.debug(c, 'core'),
|
||||||
|
debugOutput = {};
|
||||||
// update table bodies in case we start with an empty table
|
// update table bodies in case we start with an empty table
|
||||||
c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
|
c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
|
||||||
tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies;
|
tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies;
|
||||||
len = tbody.length;
|
len = tbody.length;
|
||||||
if ( len === 0 ) {
|
if ( len === 0 ) {
|
||||||
return c.debug ? console.warn( 'Warning: *Empty table!* Not building a parser cache' ) : '';
|
return debug ? console.warn( 'Warning: *Empty table!* Not building a parser cache' ) : '';
|
||||||
} else if ( c.debug ) {
|
} else if ( debug ) {
|
||||||
time = new Date();
|
time = new Date();
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Detecting parsers for each column' );
|
console[ console.group ? 'group' : 'log' ]( 'Detecting parsers for each column' );
|
||||||
}
|
}
|
||||||
@ -709,8 +710,8 @@
|
|||||||
if ( !parser ) {
|
if ( !parser ) {
|
||||||
parser = ts.detectParserForColumn( c, rows, -1, colIndex );
|
parser = ts.detectParserForColumn( c, rows, -1, colIndex );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
debug[ '(' + colIndex + ') ' + header.text() ] = {
|
debugOutput[ '(' + colIndex + ') ' + header.text() ] = {
|
||||||
parser : parser.id,
|
parser : parser.id,
|
||||||
extractor : extractor ? extractor.id : 'none',
|
extractor : extractor ? extractor.id : 'none',
|
||||||
string : c.strings[ colIndex ],
|
string : c.strings[ colIndex ],
|
||||||
@ -736,9 +737,9 @@
|
|||||||
}
|
}
|
||||||
tbodyIndex += ( list.parsers.length ) ? len : 1;
|
tbodyIndex += ( list.parsers.length ) ? len : 1;
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
if ( !ts.isEmptyObject( debug ) ) {
|
if ( !ts.isEmptyObject( debugOutput ) ) {
|
||||||
console[ console.table ? 'table' : 'log' ]( debug );
|
console[ console.table ? 'table' : 'log' ]( debugOutput );
|
||||||
} else {
|
} else {
|
||||||
console.warn( ' No parsers detected!' );
|
console.warn( ' No parsers detected!' );
|
||||||
}
|
}
|
||||||
@ -764,7 +765,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
getParserById : function( name ) {
|
getParserById : function( name ) {
|
||||||
/*jshint eqeqeq:false */
|
/*jshint eqeqeq:false */ // eslint-disable-next-line eqeqeq
|
||||||
if ( name == 'false' ) { return false; }
|
if ( name == 'false' ) { return false; }
|
||||||
var indx,
|
var indx,
|
||||||
len = ts.parsers.length;
|
len = ts.parsers.length;
|
||||||
@ -781,6 +782,7 @@
|
|||||||
indx = ts.parsers.length,
|
indx = ts.parsers.length,
|
||||||
node = false,
|
node = false,
|
||||||
nodeValue = '',
|
nodeValue = '',
|
||||||
|
debug = ts.debug(c, 'core'),
|
||||||
keepLooking = true;
|
keepLooking = true;
|
||||||
while ( nodeValue === '' && keepLooking ) {
|
while ( nodeValue === '' && keepLooking ) {
|
||||||
rowIndex++;
|
rowIndex++;
|
||||||
@ -791,7 +793,7 @@
|
|||||||
node = rows[ rowIndex ].cells[ cellIndex ];
|
node = rows[ rowIndex ].cells[ cellIndex ];
|
||||||
nodeValue = ts.getElementText( c, node, cellIndex );
|
nodeValue = ts.getElementText( c, node, cellIndex );
|
||||||
$node = $( node );
|
$node = $( node );
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Checking if value was empty on row ' + rowIndex + ', column: ' +
|
console.log( 'Checking if value was empty on row ' + rowIndex + ', column: ' +
|
||||||
cellIndex + ': "' + nodeValue + '"' );
|
cellIndex + ': "' + nodeValue + '"' );
|
||||||
}
|
}
|
||||||
@ -873,7 +875,8 @@
|
|||||||
cols, $cells, cell, cacheTime, totalRows, rowData, prevRowData,
|
cols, $cells, cell, cacheTime, totalRows, rowData, prevRowData,
|
||||||
colMax, span, cacheIndex, hasParser, max, len, index,
|
colMax, span, cacheIndex, hasParser, max, len, index,
|
||||||
table = c.table,
|
table = c.table,
|
||||||
parsers = c.parsers;
|
parsers = c.parsers,
|
||||||
|
debug = ts.debug(c, 'core');
|
||||||
// update tbody variable
|
// update tbody variable
|
||||||
c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
|
c.$tbodies = c.$table.children( 'tbody:not(.' + c.cssInfoBlock + ')' );
|
||||||
$tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies,
|
$tbody = typeof $tbodies === 'undefined' ? c.$tbodies : $tbodies,
|
||||||
@ -881,9 +884,9 @@
|
|||||||
c.totalRows = 0;
|
c.totalRows = 0;
|
||||||
// if no parsers found, return - it's an empty table.
|
// if no parsers found, return - it's an empty table.
|
||||||
if ( !parsers ) {
|
if ( !parsers ) {
|
||||||
return c.debug ? console.warn( 'Warning: *Empty table!* Not building a cache' ) : '';
|
return debug ? console.warn( 'Warning: *Empty table!* Not building a cache' ) : '';
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
cacheTime = new Date();
|
cacheTime = new Date();
|
||||||
}
|
}
|
||||||
// processing icon
|
// processing icon
|
||||||
@ -952,7 +955,7 @@
|
|||||||
cell = $row[ 0 ].cells[ colIndex ];
|
cell = $row[ 0 ].cells[ colIndex ];
|
||||||
if ( cell && cacheIndex < c.columns ) {
|
if ( cell && cacheIndex < c.columns ) {
|
||||||
hasParser = typeof parsers[ cacheIndex ] !== 'undefined';
|
hasParser = typeof parsers[ cacheIndex ] !== 'undefined';
|
||||||
if ( !hasParser && c.debug ) {
|
if ( !hasParser && debug ) {
|
||||||
console.warn( 'No parser found for row: ' + rowIndex + ', column: ' + colIndex +
|
console.warn( 'No parser found for row: ' + rowIndex + ', column: ' + colIndex +
|
||||||
'; cell containing: "' + $(cell).text() + '"; does it have a header?' );
|
'; cell containing: "' + $(cell).text() + '"; does it have a header?' );
|
||||||
}
|
}
|
||||||
@ -1000,7 +1003,7 @@
|
|||||||
if ( c.showProcessing ) {
|
if ( c.showProcessing ) {
|
||||||
ts.isProcessing( table ); // remove processing icon
|
ts.isProcessing( table ); // remove processing icon
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
len = Math.min( 5, c.cache[ 0 ].normalized.length );
|
len = Math.min( 5, c.cache[ 0 ].normalized.length );
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Building cache for ' + c.totalRows +
|
console[ console.group ? 'group' : 'log' ]( 'Building cache for ' + c.totalRows +
|
||||||
' rows (showing ' + len + ' rows in log) and ' + c.columns + ' columns' +
|
' rows (showing ' + len + ' rows in log) and ' + c.columns + ' columns' +
|
||||||
@ -1031,7 +1034,7 @@
|
|||||||
data = { raw : [], parsed: [], $cell: [] },
|
data = { raw : [], parsed: [], $cell: [] },
|
||||||
c = table.config;
|
c = table.config;
|
||||||
if ( ts.isEmptyObject( c ) ) {
|
if ( ts.isEmptyObject( c ) ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.warn( 'No cache found - aborting getColumnText function!' );
|
console.warn( 'No cache found - aborting getColumnText function!' );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1375,7 +1378,7 @@
|
|||||||
ts.resortComplete( c, callback );
|
ts.resortComplete( c, callback );
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.error( 'updateCell aborted, tbody missing or not within the indicated table' );
|
console.error( 'updateCell aborted, tbody missing or not within the indicated table' );
|
||||||
}
|
}
|
||||||
c.table.isUpdating = false;
|
c.table.isUpdating = false;
|
||||||
@ -1398,7 +1401,7 @@
|
|||||||
// row contained in the table?
|
// row contained in the table?
|
||||||
( ts.getClosest( $row, 'table' )[ 0 ] !== c.table )
|
( ts.getClosest( $row, 'table' )[ 0 ] !== c.table )
|
||||||
) {
|
) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.error( 'addRows method requires (1) a jQuery selector reference to rows that have already ' +
|
console.error( 'addRows method requires (1) a jQuery selector reference to rows that have already ' +
|
||||||
'been added to the table, or (2) row HTML string to be added to a table with only one tbody' );
|
'been added to the table, or (2) row HTML string to be added to a table with only one tbody' );
|
||||||
}
|
}
|
||||||
@ -1470,7 +1473,6 @@
|
|||||||
appendCache : function( c, init ) {
|
appendCache : function( c, init ) {
|
||||||
var parsed, totalRows, $tbody, $curTbody, rowIndex, tbodyIndex, appendTime,
|
var parsed, totalRows, $tbody, $curTbody, rowIndex, tbodyIndex, appendTime,
|
||||||
table = c.table,
|
table = c.table,
|
||||||
wo = c.widgetOptions,
|
|
||||||
$tbodies = c.$tbodies,
|
$tbodies = c.$tbodies,
|
||||||
rows = [],
|
rows = [],
|
||||||
cache = c.cache;
|
cache = c.cache;
|
||||||
@ -1480,7 +1482,7 @@
|
|||||||
return c.appender ? c.appender( table, rows ) :
|
return c.appender ? c.appender( table, rows ) :
|
||||||
table.isUpdating ? c.$table.triggerHandler( 'updateComplete', table ) : ''; // Fixes #532
|
table.isUpdating ? c.$table.triggerHandler( 'updateComplete', table ) : ''; // Fixes #532
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
appendTime = new Date();
|
appendTime = new Date();
|
||||||
}
|
}
|
||||||
for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) {
|
for ( tbodyIndex = 0; tbodyIndex < $tbodies.length; tbodyIndex++ ) {
|
||||||
@ -1493,7 +1495,7 @@
|
|||||||
for ( rowIndex = 0; rowIndex < totalRows; rowIndex++ ) {
|
for ( rowIndex = 0; rowIndex < totalRows; rowIndex++ ) {
|
||||||
rows[rows.length] = parsed[ rowIndex ][ c.columns ].$row;
|
rows[rows.length] = parsed[ rowIndex ][ c.columns ].$row;
|
||||||
// removeRows used by the pager plugin; don't render if using ajax - fixes #411
|
// removeRows used by the pager plugin; don't render if using ajax - fixes #411
|
||||||
if ( !c.appender || ( c.pager && ( !c.pager.removeRows || !wo.pager_removeRows ) && !c.pager.ajax ) ) {
|
if ( !c.appender || ( c.pager && !c.pager.removeRows && !c.pager.ajax ) ) {
|
||||||
$curTbody.append( parsed[ rowIndex ][ c.columns ].$row );
|
$curTbody.append( parsed[ rowIndex ][ c.columns ].$row );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1504,7 +1506,7 @@
|
|||||||
if ( c.appender ) {
|
if ( c.appender ) {
|
||||||
c.appender( table, rows );
|
c.appender( table, rows );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'Rebuilt table' + ts.benchmark( appendTime ) );
|
console.log( 'Rebuilt table' + ts.benchmark( appendTime ) );
|
||||||
}
|
}
|
||||||
// apply table widgets; but not before ajax completes
|
// apply table widgets; but not before ajax completes
|
||||||
@ -1686,7 +1688,7 @@
|
|||||||
// empty table - fixes #206/#346
|
// empty table - fixes #206/#346
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( c.debug ) { sortTime = new Date(); }
|
if ( ts.debug(c, 'core') ) { sortTime = new Date(); }
|
||||||
// cache textSorter to optimize speed
|
// cache textSorter to optimize speed
|
||||||
if ( typeof textSorter === 'object' ) {
|
if ( typeof textSorter === 'object' ) {
|
||||||
colMax = c.columns;
|
colMax = c.columns;
|
||||||
@ -1748,7 +1750,7 @@
|
|||||||
return a[ c.columns ].order - b[ c.columns ].order;
|
return a[ c.columns ].order - b[ c.columns ].order;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'Applying sort ' + sortList.toString() + ts.benchmark( sortTime ) );
|
console.log( 'Applying sort ' + sortList.toString() + ts.benchmark( sortTime ) );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -2001,6 +2003,7 @@
|
|||||||
var applied, time, name,
|
var applied, time, name,
|
||||||
c = table.config,
|
c = table.config,
|
||||||
wo = c.widgetOptions,
|
wo = c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'core'),
|
||||||
widget = ts.getWidgetById( id );
|
widget = ts.getWidgetById( id );
|
||||||
if ( widget ) {
|
if ( widget ) {
|
||||||
name = widget.id;
|
name = widget.id;
|
||||||
@ -2009,7 +2012,7 @@
|
|||||||
if ( $.inArray( name, c.widgets ) < 0 ) {
|
if ( $.inArray( name, c.widgets ) < 0 ) {
|
||||||
c.widgets[ c.widgets.length ] = name;
|
c.widgets[ c.widgets.length ] = name;
|
||||||
}
|
}
|
||||||
if ( c.debug ) { time = new Date(); }
|
if ( debug ) { time = new Date(); }
|
||||||
|
|
||||||
if ( init || !( c.widgetInit[ name ] ) ) {
|
if ( init || !( c.widgetInit[ name ] ) ) {
|
||||||
// set init flag first to prevent calling init more than once (e.g. pager)
|
// set init flag first to prevent calling init more than once (e.g. pager)
|
||||||
@ -2020,7 +2023,7 @@
|
|||||||
}
|
}
|
||||||
if ( typeof widget.init === 'function' ) {
|
if ( typeof widget.init === 'function' ) {
|
||||||
applied = true;
|
applied = true;
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Initializing ' + name + ' widget' );
|
console[ console.group ? 'group' : 'log' ]( 'Initializing ' + name + ' widget' );
|
||||||
}
|
}
|
||||||
widget.init( table, widget, c, wo );
|
widget.init( table, widget, c, wo );
|
||||||
@ -2028,12 +2031,12 @@
|
|||||||
}
|
}
|
||||||
if ( !init && typeof widget.format === 'function' ) {
|
if ( !init && typeof widget.format === 'function' ) {
|
||||||
applied = true;
|
applied = true;
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Updating ' + name + ' widget' );
|
console[ console.group ? 'group' : 'log' ]( 'Updating ' + name + ' widget' );
|
||||||
}
|
}
|
||||||
widget.format( table, c, wo, false );
|
widget.format( table, c, wo, false );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
if ( applied ) {
|
if ( applied ) {
|
||||||
console.log( 'Completed ' + ( init ? 'initializing ' : 'applying ' ) + name + ' widget' + ts.benchmark( time ) );
|
console.log( 'Completed ' + ( init ? 'initializing ' : 'applying ' ) + name + ' widget' + ts.benchmark( time ) );
|
||||||
if ( console.groupEnd ) { console.groupEnd(); }
|
if ( console.groupEnd ) { console.groupEnd(); }
|
||||||
@ -2046,12 +2049,13 @@
|
|||||||
table = $( table )[ 0 ]; // in case this is called externally
|
table = $( table )[ 0 ]; // in case this is called externally
|
||||||
var indx, len, names, widget, time,
|
var indx, len, names, widget, time,
|
||||||
c = table.config,
|
c = table.config,
|
||||||
|
debug = ts.debug(c, 'core'),
|
||||||
widgets = [];
|
widgets = [];
|
||||||
// prevent numerous consecutive widget applications
|
// prevent numerous consecutive widget applications
|
||||||
if ( init !== false && table.hasInitialized && ( table.isApplyingWidgets || table.isUpdating ) ) {
|
if ( init !== false && table.hasInitialized && ( table.isApplyingWidgets || table.isUpdating ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( c.debug ) { time = new Date(); }
|
if ( debug ) { time = new Date(); }
|
||||||
ts.addWidgetFromClass( table );
|
ts.addWidgetFromClass( table );
|
||||||
// prevent "tablesorter-ready" from firing multiple times in a row
|
// prevent "tablesorter-ready" from firing multiple times in a row
|
||||||
clearTimeout( c.timerReady );
|
clearTimeout( c.timerReady );
|
||||||
@ -2070,7 +2074,7 @@
|
|||||||
// set priority to 10 if not defined
|
// set priority to 10 if not defined
|
||||||
if ( !widget.priority ) { widget.priority = 10; }
|
if ( !widget.priority ) { widget.priority = 10; }
|
||||||
widgets[ indx ] = widget;
|
widgets[ indx ] = widget;
|
||||||
} else if ( c.debug ) {
|
} else if ( debug ) {
|
||||||
console.warn( '"' + names[ indx ] + '" was enabled, but the widget code has not been loaded!' );
|
console.warn( '"' + names[ indx ] + '" was enabled, but the widget code has not been loaded!' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2080,7 +2084,7 @@
|
|||||||
});
|
});
|
||||||
// add/update selected widgets
|
// add/update selected widgets
|
||||||
len = widgets.length;
|
len = widgets.length;
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console[ console.group ? 'group' : 'log' ]( 'Start ' + ( init ? 'initializing' : 'applying' ) + ' widgets' );
|
console[ console.group ? 'group' : 'log' ]( 'Start ' + ( init ? 'initializing' : 'applying' ) + ' widgets' );
|
||||||
}
|
}
|
||||||
for ( indx = 0; indx < len; indx++ ) {
|
for ( indx = 0; indx < len; indx++ ) {
|
||||||
@ -2089,7 +2093,7 @@
|
|||||||
ts.applyWidgetId( table, widget.id, init );
|
ts.applyWidgetId( table, widget.id, init );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( c.debug && console.groupEnd ) { console.groupEnd(); }
|
if ( debug && console.groupEnd ) { console.groupEnd(); }
|
||||||
}
|
}
|
||||||
c.timerReady = setTimeout( function() {
|
c.timerReady = setTimeout( function() {
|
||||||
table.isApplyingWidgets = false;
|
table.isApplyingWidgets = false;
|
||||||
@ -2099,7 +2103,7 @@
|
|||||||
if ( !init && typeof callback === 'function' ) {
|
if ( !init && typeof callback === 'function' ) {
|
||||||
callback( table );
|
callback( table );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
widget = c.widgets.length;
|
widget = c.widgets.length;
|
||||||
console.log( 'Completed ' +
|
console.log( 'Completed ' +
|
||||||
( init === true ? 'initializing ' : 'applying ' ) + widget +
|
( init === true ? 'initializing ' : 'applying ' ) + widget +
|
||||||
@ -2136,7 +2140,7 @@
|
|||||||
c.widgets.splice( indx, 1 );
|
c.widgets.splice( indx, 1 );
|
||||||
}
|
}
|
||||||
if ( widget && widget.remove ) {
|
if ( widget && widget.remove ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( ( refreshing ? 'Refreshing' : 'Removing' ) + ' "' + name[ index ] + '" widget' );
|
console.log( ( refreshing ? 'Refreshing' : 'Removing' ) + ' "' + name[ index ] + '" widget' );
|
||||||
}
|
}
|
||||||
widget.remove( table, c, c.widgetOptions, refreshing );
|
widget.remove( table, c, c.widgetOptions, refreshing );
|
||||||
@ -2190,6 +2194,12 @@
|
|||||||
log : function() {
|
log : function() {
|
||||||
console.log( arguments );
|
console.log( arguments );
|
||||||
},
|
},
|
||||||
|
debug : function(c, name) {
|
||||||
|
return c && (
|
||||||
|
c.debug === true ||
|
||||||
|
typeof c.debug === 'string' && c.debug.indexOf(name) > -1
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
// $.isEmptyObject from jQuery v1.4
|
// $.isEmptyObject from jQuery v1.4
|
||||||
isEmptyObject : function( obj ) {
|
isEmptyObject : function( obj ) {
|
||||||
@ -2495,7 +2505,7 @@
|
|||||||
ignore = 'headers sortForce sortList sortAppend widgets'.split( ' ' ),
|
ignore = 'headers sortForce sortList sortAppend widgets'.split( ' ' ),
|
||||||
orig = c.originalSettings;
|
orig = c.originalSettings;
|
||||||
if ( orig ) {
|
if ( orig ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
timer = new Date();
|
timer = new Date();
|
||||||
}
|
}
|
||||||
for ( setting in orig ) {
|
for ( setting in orig ) {
|
||||||
@ -2511,7 +2521,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'validate options time:' + ts.benchmark( timer ) );
|
console.log( 'validate options time:' + ts.benchmark( timer ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2542,7 +2552,6 @@
|
|||||||
var events,
|
var events,
|
||||||
$t = $( table ),
|
$t = $( table ),
|
||||||
c = table.config,
|
c = table.config,
|
||||||
debug = c.debug,
|
|
||||||
$h = $t.find( 'thead:first' ),
|
$h = $t.find( 'thead:first' ),
|
||||||
$r = $h.find( 'tr.' + ts.css.headerRow ).removeClass( ts.css.headerRow + ' ' + c.cssHeaderRow ),
|
$r = $h.find( 'tr.' + ts.css.headerRow ).removeClass( ts.css.headerRow + ' ' + c.cssHeaderRow ),
|
||||||
$f = $t.find( 'tfoot:first > tr' ).children( 'th, td' );
|
$f = $t.find( 'tfoot:first > tr' ).children( 'th, td' );
|
||||||
@ -2580,7 +2589,7 @@
|
|||||||
if ( typeof callback === 'function' ) {
|
if ( typeof callback === 'function' ) {
|
||||||
callback( table );
|
callback( table );
|
||||||
}
|
}
|
||||||
if ( debug ) {
|
if ( ts.debug(c, 'core') ) {
|
||||||
console.log( 'tablesorter has been removed' );
|
console.log( 'tablesorter has been removed' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2697,7 +2706,7 @@
|
|||||||
is : function( str ) {
|
is : function( str ) {
|
||||||
return ts.regex.isoDate.test( str );
|
return ts.regex.isoDate.test( str );
|
||||||
},
|
},
|
||||||
format : function( str, table ) {
|
format : function( str ) {
|
||||||
var date = str ? new Date( str.replace( ts.regex.dash, '/' ) ) : str;
|
var date = str ? new Date( str.replace( ts.regex.dash, '/' ) ) : str;
|
||||||
return date instanceof Date && isFinite( date ) ? date.getTime() : str;
|
return date instanceof Date && isFinite( date ) ? date.getTime() : str;
|
||||||
},
|
},
|
||||||
@ -2740,7 +2749,7 @@
|
|||||||
// Jan 01, 2013 12:34:56 PM or 01 Jan 2013
|
// Jan 01, 2013 12:34:56 PM or 01 Jan 2013
|
||||||
return ts.regex.usLongDateTest1.test( str ) || ts.regex.usLongDateTest2.test( str );
|
return ts.regex.usLongDateTest1.test( str ) || ts.regex.usLongDateTest2.test( str );
|
||||||
},
|
},
|
||||||
format : function( str, table ) {
|
format : function( str ) {
|
||||||
var date = str ? new Date( str.replace( ts.regex.dateReplace, '$1 $2' ) ) : str;
|
var date = str ? new Date( str.replace( ts.regex.dateReplace, '$1 $2' ) ) : str;
|
||||||
return date instanceof Date && isFinite( date ) ? date.getTime() : str;
|
return date instanceof Date && isFinite( date ) ? date.getTime() : str;
|
||||||
},
|
},
|
||||||
@ -2801,7 +2810,7 @@
|
|||||||
is : function( str ) {
|
is : function( str ) {
|
||||||
return ts.regex.timeTest.test( str );
|
return ts.regex.timeTest.test( str );
|
||||||
},
|
},
|
||||||
format : function( str, table ) {
|
format : function( str ) {
|
||||||
// isolate time... ignore month, day and year
|
// isolate time... ignore month, day and year
|
||||||
var temp,
|
var temp,
|
||||||
timePart = ( str || '' ).match( ts.regex.timeMatch ),
|
timePart = ( str || '' ).match( ts.regex.timeMatch ),
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
||||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||||
*/
|
*/
|
||||||
/*! tablesorter (FORK) - updated 2018-02-25 (v2.29.6)*/
|
/*! tablesorter (FORK) - updated 2018-03-18 (v2.30.0)*/
|
||||||
/* 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) {
|
||||||
|
|
||||||
/*! Widget: storage - updated 4/18/2017 (v2.28.8) */
|
/*! Widget: storage - updated 2018-03-18 (v2.30.0) */
|
||||||
/*global JSON:false */
|
/*global JSON:false */
|
||||||
;(function ($, window, document) {
|
;(function ($, window, document) {
|
||||||
'use strict';
|
'use strict';
|
||||||
@ -62,6 +62,7 @@
|
|||||||
values = {},
|
values = {},
|
||||||
c = table.config,
|
c = table.config,
|
||||||
wo = c && c.widgetOptions,
|
wo = c && c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'storage'),
|
||||||
storageType = (
|
storageType = (
|
||||||
( options && options.storageType ) || ( wo && wo.storage_storageType )
|
( options && options.storageType ) || ( wo && wo.storage_storageType )
|
||||||
).toString().charAt(0).toLowerCase(),
|
).toString().charAt(0).toLowerCase(),
|
||||||
@ -90,14 +91,12 @@
|
|||||||
hasStorage = true;
|
hasStorage = true;
|
||||||
window[storageType].removeItem('_tmptest');
|
window[storageType].removeItem('_tmptest');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (c && c.debug) {
|
|
||||||
console.warn( storageType + ' is not supported in this browser' );
|
console.warn( storageType + ' is not supported in this browser' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (debug) {
|
||||||
if (c.debug) {
|
console.log('Storage >> Using', hasStorage ? storageType : 'cookies');
|
||||||
console.log('Storage widget using', hasStorage ? storageType : 'cookies');
|
|
||||||
}
|
}
|
||||||
// *** get value ***
|
// *** get value ***
|
||||||
if ($.parseJSON) {
|
if ($.parseJSON) {
|
||||||
@ -133,7 +132,7 @@
|
|||||||
|
|
||||||
})(jQuery, window, document);
|
})(jQuery, window, document);
|
||||||
|
|
||||||
/*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
|
/*! Widget: uitheme - updated 2018-03-18 (v2.30.0) */
|
||||||
;(function ($) {
|
;(function ($) {
|
||||||
'use strict';
|
'use strict';
|
||||||
var ts = $.tablesorter || {};
|
var ts = $.tablesorter || {};
|
||||||
@ -198,8 +197,9 @@
|
|||||||
theme = c.theme || 'jui',
|
theme = c.theme || 'jui',
|
||||||
themes = themesAll[theme] || {},
|
themes = themesAll[theme] || {},
|
||||||
remove = $.trim( [ themes.sortNone, themes.sortDesc, themes.sortAsc, themes.active ].join( ' ' ) ),
|
remove = $.trim( [ themes.sortNone, themes.sortDesc, themes.sortAsc, themes.active ].join( ' ' ) ),
|
||||||
iconRmv = $.trim( [ themes.iconSortNone, themes.iconSortDesc, themes.iconSortAsc ].join( ' ' ) );
|
iconRmv = $.trim( [ themes.iconSortNone, themes.iconSortDesc, themes.iconSortAsc ].join( ' ' ) ),
|
||||||
if (c.debug) { time = new Date(); }
|
debug = ts.debug(c, 'uitheme');
|
||||||
|
if (debug) { time = new Date(); }
|
||||||
// initialization code - run once
|
// initialization code - run once
|
||||||
if (!$table.hasClass('tablesorter-' + theme) || c.theme !== c.appliedTheme || !wo.uitheme_applied) {
|
if (!$table.hasClass('tablesorter-' + theme) || c.theme !== c.appliedTheme || !wo.uitheme_applied) {
|
||||||
wo.uitheme_applied = true;
|
wo.uitheme_applied = true;
|
||||||
@ -302,8 +302,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('Applying ' + theme + ' theme' + ts.benchmark(time));
|
console.log('uitheme >> Applied ' + theme + ' theme' + ts.benchmark(time));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove: function(table, c, wo, refreshing) {
|
remove: function(table, c, wo, refreshing) {
|
||||||
@ -408,7 +408,7 @@
|
|||||||
|
|
||||||
})(jQuery);
|
})(jQuery);
|
||||||
|
|
||||||
/*! Widget: filter - updated 2018-01-30 (v2.29.5) *//*
|
/*! Widget: filter - updated 2018-03-18 (v2.30.0) *//*
|
||||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -690,6 +690,7 @@
|
|||||||
if ( tsfRegex.exact.test( data.iFilter ) ) {
|
if ( tsfRegex.exact.test( data.iFilter ) ) {
|
||||||
var txt = data.iFilter.replace( tsfRegex.exact, '' ),
|
var txt = data.iFilter.replace( tsfRegex.exact, '' ),
|
||||||
filter = tsf.parseFilter( c, txt, data ) || '';
|
filter = tsf.parseFilter( c, txt, data ) || '';
|
||||||
|
// eslint-disable-next-line eqeqeq
|
||||||
return data.anyMatch ? $.inArray( filter, data.rowArray ) >= 0 : filter == data.iExact;
|
return data.anyMatch ? $.inArray( filter, data.rowArray ) >= 0 : filter == data.iExact;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@ -957,7 +958,7 @@
|
|||||||
|
|
||||||
// show processing icon
|
// show processing icon
|
||||||
if ( c.showProcessing ) {
|
if ( c.showProcessing ) {
|
||||||
txt = 'filterStart filterEnd '.split( ' ' ).join( c.namespace + 'filter ' );
|
txt = 'filterStart filterEnd '.split( ' ' ).join( c.namespace + 'filter-sp ' );
|
||||||
c.$table
|
c.$table
|
||||||
.unbind( txt.replace( ts.regex.spaces, ' ' ) )
|
.unbind( txt.replace( ts.regex.spaces, ' ' ) )
|
||||||
.bind( txt, function( event, columns ) {
|
.bind( txt, function( event, columns ) {
|
||||||
@ -1036,6 +1037,9 @@
|
|||||||
c.lastSearch = c.$table.data( 'lastSearch' );
|
c.lastSearch = c.$table.data( 'lastSearch' );
|
||||||
c.$table.triggerHandler( 'filterInit', c );
|
c.$table.triggerHandler( 'filterInit', c );
|
||||||
tsf.findRows( c.table, c.lastSearch || [] );
|
tsf.findRows( c.table, c.lastSearch || [] );
|
||||||
|
if (ts.debug(c, 'filter')) {
|
||||||
|
console.log('Filter >> Widget initialized');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
if ( $.isEmptyObject( wo.filter_formatter ) ) {
|
if ( $.isEmptyObject( wo.filter_formatter ) ) {
|
||||||
completed();
|
completed();
|
||||||
@ -1736,6 +1740,7 @@
|
|||||||
storedFilters = $.extend( [], filters ),
|
storedFilters = $.extend( [], filters ),
|
||||||
c = table.config,
|
c = table.config,
|
||||||
wo = c.widgetOptions,
|
wo = c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'filter'),
|
||||||
// data object passed to filters; anyMatch is a flag for the filters
|
// data object passed to filters; anyMatch is a flag for the filters
|
||||||
data = {
|
data = {
|
||||||
anyMatch: false,
|
anyMatch: false,
|
||||||
@ -1752,7 +1757,6 @@
|
|||||||
defaultColFilter : [],
|
defaultColFilter : [],
|
||||||
defaultAnyFilter : ts.getColumnData( table, wo.filter_defaultFilter, c.columns, true ) || ''
|
defaultAnyFilter : ts.getColumnData( table, wo.filter_defaultFilter, c.columns, true ) || ''
|
||||||
};
|
};
|
||||||
|
|
||||||
// parse columns after formatter, in case the class is added at that point
|
// parse columns after formatter, in case the class is added at that point
|
||||||
data.parsed = [];
|
data.parsed = [];
|
||||||
for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
|
for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
|
||||||
@ -1774,8 +1778,8 @@
|
|||||||
( ts.getColumnData( table, wo.filter_excludeFilter, columnIndex, true ) || '' ).split( /\s+/ );
|
( ts.getColumnData( table, wo.filter_excludeFilter, columnIndex, true ) || '' ).split( /\s+/ );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Filter: Starting filter widget search', filters );
|
console.log( 'Filter >> Starting filter widget search', filters );
|
||||||
time = new Date();
|
time = new Date();
|
||||||
}
|
}
|
||||||
// filtered rows count
|
// filtered rows count
|
||||||
@ -1873,8 +1877,8 @@
|
|||||||
notFiltered = $rows.not( '.' + wo.filter_filteredRow ).length;
|
notFiltered = $rows.not( '.' + wo.filter_filteredRow ).length;
|
||||||
// can't search when all rows are hidden - this happens when looking for exact matches
|
// can't search when all rows are hidden - this happens when looking for exact matches
|
||||||
if ( searchFiltered && notFiltered === 0 ) { searchFiltered = false; }
|
if ( searchFiltered && notFiltered === 0 ) { searchFiltered = false; }
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Filter: Searching through ' +
|
console.log( 'Filter >> Searching through ' +
|
||||||
( searchFiltered && notFiltered < len ? notFiltered : 'all' ) + ' rows' );
|
( searchFiltered && notFiltered < len ? notFiltered : 'all' ) + ' rows' );
|
||||||
}
|
}
|
||||||
if ( data.anyMatchFlag ) {
|
if ( data.anyMatchFlag ) {
|
||||||
@ -1977,8 +1981,8 @@
|
|||||||
if ( wo.filter_saveFilters && ts.storage ) {
|
if ( wo.filter_saveFilters && ts.storage ) {
|
||||||
ts.storage( table, 'tablesorter-filters', tsf.processFilters( storedFilters, true ) );
|
ts.storage( table, 'tablesorter-filters', tsf.processFilters( storedFilters, true ) );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Completed filter widget search' + ts.benchmark(time) );
|
console.log( 'Filter >> Completed search' + ts.benchmark(time) );
|
||||||
}
|
}
|
||||||
if ( wo.filter_initialized ) {
|
if ( wo.filter_initialized ) {
|
||||||
c.$table.triggerHandler( 'filterBeforeEnd', c );
|
c.$table.triggerHandler( 'filterBeforeEnd', c );
|
||||||
@ -2193,13 +2197,13 @@
|
|||||||
options += '<option';
|
options += '<option';
|
||||||
for ( val in option ) {
|
for ( val in option ) {
|
||||||
if ( option.hasOwnProperty( val ) && val !== 'text' ) {
|
if ( option.hasOwnProperty( val ) && val !== 'text' ) {
|
||||||
options += ' ' + val + '="' + option[ val ] + '"';
|
options += ' ' + val + '="' + option[ val ].replace( tsfRegex.quote, '"' ) + '"';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( !option.value ) {
|
if ( !option.value ) {
|
||||||
options += ' value="' + option.text + '"';
|
options += ' value="' + option.text.replace( tsfRegex.quote, '"' ) + '"';
|
||||||
}
|
}
|
||||||
options += '>' + option.text + '</option>';
|
options += '>' + option.text.replace( tsfRegex.quote, '"' ) + '</option>';
|
||||||
// above code is needed in jQuery < v1.8
|
// above code is needed in jQuery < v1.8
|
||||||
|
|
||||||
// make sure we don't turn an object into a string (objects without a "text" property)
|
// make sure we don't turn an object into a string (objects without a "text" property)
|
||||||
@ -3101,7 +3105,7 @@
|
|||||||
|
|
||||||
})( jQuery, window );
|
})( jQuery, window );
|
||||||
|
|
||||||
/*! Widget: saveSort - updated 10/31/2015 (v2.24.0) *//*
|
/*! Widget: saveSort - updated 2018-03-18 (v2.30.0) *//*
|
||||||
* Requires tablesorter v2.16+
|
* Requires tablesorter v2.16+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -3109,6 +3113,15 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
var ts = $.tablesorter || {};
|
var ts = $.tablesorter || {};
|
||||||
|
|
||||||
|
function getStoredSortList(c) {
|
||||||
|
var stored = ts.storage( c.table, 'tablesorter-savesort' );
|
||||||
|
return (stored && stored.hasOwnProperty('sortList') && $.isArray(stored.sortList)) ? stored.sortList : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function sortListChanged(c, sortList) {
|
||||||
|
return (sortList || getStoredSortList(c)).join(',') !== c.sortList.join(',');
|
||||||
|
}
|
||||||
|
|
||||||
// this widget saves the last sort only if the
|
// this widget saves the last sort only if the
|
||||||
// saveSort widget option is true AND the
|
// saveSort widget option is true AND the
|
||||||
// $.tablesorter.storage function is included
|
// $.tablesorter.storage function is included
|
||||||
@ -3124,18 +3137,19 @@
|
|||||||
thisWidget.format(table, c, wo, true);
|
thisWidget.format(table, c, wo, true);
|
||||||
},
|
},
|
||||||
format: function(table, c, wo, init) {
|
format: function(table, c, wo, init) {
|
||||||
var stored, time,
|
var time,
|
||||||
$table = c.$table,
|
$table = c.$table,
|
||||||
saveSort = wo.saveSort !== false, // make saveSort active/inactive; default to true
|
saveSort = wo.saveSort !== false, // make saveSort active/inactive; default to true
|
||||||
sortList = { 'sortList' : c.sortList };
|
sortList = { 'sortList' : c.sortList },
|
||||||
if (c.debug) {
|
debug = ts.debug(c, 'saveSort');
|
||||||
|
if (debug) {
|
||||||
time = new Date();
|
time = new Date();
|
||||||
}
|
}
|
||||||
if ($table.hasClass('hasSaveSort')) {
|
if ($table.hasClass('hasSaveSort')) {
|
||||||
if (saveSort && table.hasInitialized && ts.storage) {
|
if (saveSort && table.hasInitialized && ts.storage && sortListChanged(c)) {
|
||||||
ts.storage( table, 'tablesorter-savesort', sortList );
|
ts.storage( table, 'tablesorter-savesort', sortList );
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('saveSort widget: Saving last sort: ' + c.sortList + ts.benchmark(time));
|
console.log('saveSort >> Saving last sort: ' + c.sortList + ts.benchmark(time));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -3144,10 +3158,9 @@
|
|||||||
sortList = '';
|
sortList = '';
|
||||||
// get data
|
// get data
|
||||||
if (ts.storage) {
|
if (ts.storage) {
|
||||||
stored = ts.storage( table, 'tablesorter-savesort' );
|
sortList = getStoredSortList(c);
|
||||||
sortList = (stored && stored.hasOwnProperty('sortList') && $.isArray(stored.sortList)) ? stored.sortList : '';
|
if (debug) {
|
||||||
if (c.debug) {
|
console.log('saveSort >> Last sort loaded: "' + sortList + '"' + ts.benchmark(time));
|
||||||
console.log('saveSort: Last sort loaded: "' + sortList + '"' + ts.benchmark(time));
|
|
||||||
}
|
}
|
||||||
$table.bind('saveSortReset', function(event) {
|
$table.bind('saveSortReset', function(event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
@ -3160,9 +3173,11 @@
|
|||||||
c.sortList = sortList;
|
c.sortList = sortList;
|
||||||
} else if (table.hasInitialized && sortList && sortList.length > 0) {
|
} else if (table.hasInitialized && sortList && sortList.length > 0) {
|
||||||
// update sort change
|
// update sort change
|
||||||
|
if (sortListChanged(c, sortList)) {
|
||||||
ts.sortOn(c, sortList);
|
ts.sortOn(c, sortList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
remove: function(table, c) {
|
remove: function(table, c) {
|
||||||
c.$table.removeClass('hasSaveSort');
|
c.$table.removeClass('hasSaveSort');
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
;( function( $ ) {
|
;( function( $ ) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var updateServer = function( event, $table, $input ) {
|
var updateServer = function( /* event, $table, $input */ ) {
|
||||||
// do something here to update your server, if needed
|
// do something here to update your server, if needed
|
||||||
// event = change event object
|
// event = change event object
|
||||||
// $table = jQuery object of the table that was just updated
|
// $table = jQuery object of the table that was just updated
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
str = number.toString();
|
str = number.toString();
|
||||||
if (
|
if (
|
||||||
!isNaN( number ) &&
|
!isNaN( number ) &&
|
||||||
|
// eslint-disable-next-line eqeqeq
|
||||||
number == val && // jshint ignore:line
|
number == val && // jshint ignore:line
|
||||||
val.length !== str.length
|
val.length !== str.length
|
||||||
) {
|
) {
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
address = address.replace( ts.regex.ipv4Extract, t );
|
address = address.replace( ts.regex.ipv4Extract, t );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (address.indexOf('::') == -1) {
|
if (address.indexOf('::') === -1) {
|
||||||
// All eight groups are present
|
// All eight groups are present
|
||||||
fullAddress = address;
|
fullAddress = address;
|
||||||
} else {
|
} else {
|
||||||
@ -74,7 +74,7 @@
|
|||||||
// it's fastest & easiest for tablesorter to sort decimal values (vs hex)
|
// it's fastest & easiest for tablesorter to sort decimal values (vs hex)
|
||||||
groups[i] = hex ? ('0000' + groups[i]).slice(-4) :
|
groups[i] = hex ? ('0000' + groups[i]).slice(-4) :
|
||||||
('00000' + (parseInt(groups[i], 16) || 0)).slice(-5);
|
('00000' + (parseInt(groups[i], 16) || 0)).slice(-5);
|
||||||
expandedAddress += ( i != validGroupCount - 1) ? groups[i] + ':' : groups[i];
|
expandedAddress += ( i !== validGroupCount - 1) ? groups[i] + ':' : groups[i];
|
||||||
}
|
}
|
||||||
return expandedAddress;
|
return expandedAddress;
|
||||||
},
|
},
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
format: function(s) {
|
format: function(s) {
|
||||||
var val,
|
var val,
|
||||||
// find roman numerals
|
// find roman numerals
|
||||||
roman = $.grep(s.split(/\b/), function(v, i){
|
roman = $.grep(s.split(/\b/), function(v) {
|
||||||
return validator.test(v) ? v : '';
|
return validator.test(v) ? v : '';
|
||||||
}).join('').match(matcher),
|
}).join('').match(matcher),
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*! Widget: Build Table - updated 4/2/2017 (v2.28.6) *//*
|
/*! Widget: Build Table - updated 2018-03-18 (v2.30.0) *//*
|
||||||
* for tableSorter v2.16.0+
|
* for tableSorter v2.16.0+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -21,6 +21,7 @@
|
|||||||
p = wo.build_processing,
|
p = wo.build_processing,
|
||||||
typ = wo.build_type,
|
typ = wo.build_type,
|
||||||
d = wo.build_source || c.data,
|
d = wo.build_source || c.data,
|
||||||
|
debug = ts.debug(c, 'build'),
|
||||||
|
|
||||||
// determine type: html, json, array, csv, object
|
// determine type: html, json, array, csv, object
|
||||||
runType = function(d) {
|
runType = function(d) {
|
||||||
@ -59,7 +60,9 @@
|
|||||||
|
|
||||||
// even if wo.build_type is undefined, we can try to figure out the type
|
// even if wo.build_type is undefined, we can try to figure out the type
|
||||||
if ( !ts.buildTable.hasOwnProperty(typ) && typ !== '' ) {
|
if ( !ts.buildTable.hasOwnProperty(typ) && typ !== '' ) {
|
||||||
if (c.debug) { console.error('aborting build table widget, incorrect build type'); }
|
if (debug) {
|
||||||
|
console.error('Build >> ERROR: Aborting build table widget, incorrect build type');
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -72,8 +75,10 @@
|
|||||||
.done(function(data) {
|
.done(function(data) {
|
||||||
runType(data);
|
runType(data);
|
||||||
})
|
})
|
||||||
.fail(function( jqXHR, textStatus, errorThrown) {
|
.fail(function( jqXHR, textStatus) {
|
||||||
if (c.debug) { console.error('aborting build table widget, failed ajax load'); }
|
if (debug) {
|
||||||
|
console.error('Build >> ERROR: Aborting build table widget, failed ajax load');
|
||||||
|
}
|
||||||
$tbl.html('<tr><td class="error">' + jqXHR.status + ' ' + textStatus + '</td></tr>');
|
$tbl.html('<tr><td class="error">' + jqXHR.status + ' ' + textStatus + '</td></tr>');
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
@ -198,6 +203,9 @@
|
|||||||
|
|
||||||
bt.buildComplete = function(table, wo) {
|
bt.buildComplete = function(table, wo) {
|
||||||
$(table).triggerHandler(wo.build_complete);
|
$(table).triggerHandler(wo.build_complete);
|
||||||
|
if (table.config && ts.debug(table.config, 'build')) {
|
||||||
|
console.log('Build >> Table build complete');
|
||||||
|
}
|
||||||
ts.setup(table, table.config);
|
ts.setup(table, table.config);
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -361,7 +369,9 @@
|
|||||||
r = data.hasOwnProperty(kr) && !$.isEmptyObject(data.kr) ? data.kr : data.hasOwnProperty('rows') ? data.rows : false;
|
r = data.hasOwnProperty(kr) && !$.isEmptyObject(data.kr) ? data.kr : data.hasOwnProperty('rows') ? data.rows : false;
|
||||||
|
|
||||||
if (!h || !r || h.length === 0 || r.length === 0) {
|
if (!h || !r || h.length === 0 || r.length === 0) {
|
||||||
if (c.debug) { console.error('aborting build table widget, missing data for object build'); }
|
if (ts.debug(c, 'build')) {
|
||||||
|
console.error('Build >> ERROR: Aborting build table widget, missing data for object build');
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* Widget: columnSelector (responsive table widget) - updated 9/27/2017 (v2.29.0) *//*
|
/* Widget: columnSelector (responsive table widget) - updated 2018-03-18 (v2.30.0) *//*
|
||||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||||
* by Justin Hallett & Rob Garrison
|
* by Justin Hallett & Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -15,13 +15,14 @@
|
|||||||
queryBreak : '@media all and (min-width: [size]) { [columns] { display: table-cell; } } ',
|
queryBreak : '@media all and (min-width: [size]) { [columns] { display: table-cell; } } ',
|
||||||
|
|
||||||
init: function(table, c, wo) {
|
init: function(table, c, wo) {
|
||||||
var $t, colSel;
|
var $t, colSel,
|
||||||
|
debug = ts.debug(c, 'columnSelector');
|
||||||
|
|
||||||
// abort if no input is contained within the layout
|
// abort if no input is contained within the layout
|
||||||
$t = $(wo.columnSelector_layout);
|
$t = $(wo.columnSelector_layout);
|
||||||
if (!$t.find('input').add( $t.filter('input') ).length) {
|
if (!$t.find('input').add( $t.filter('input') ).length) {
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.error('ColumnSelector: >> ERROR: Column Selector aborting, no input found in the layout! ***');
|
console.error('ColumnSelector >> ERROR: Column Selector aborting, no input found in the layout! ***');
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -45,8 +46,8 @@
|
|||||||
colSel.isInitializing = false;
|
colSel.isInitializing = false;
|
||||||
if (colSel.$container.length) {
|
if (colSel.$container.length) {
|
||||||
tsColSel.updateCols(c, wo);
|
tsColSel.updateCols(c, wo);
|
||||||
} else if (c.debug) {
|
} else if (debug) {
|
||||||
console.warn('ColumnSelector: >> container not found');
|
console.warn('ColumnSelector >> container not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
c.$table
|
c.$table
|
||||||
@ -64,6 +65,9 @@
|
|||||||
tsColSel.refreshColumns( this.config, optName, optState );
|
tsColSel.refreshColumns( this.config, optName, optState );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (debug) {
|
||||||
|
console.log('ColumnSelector >> Widget initialized');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
refreshColumns: function( c, optName, optState ) {
|
refreshColumns: function( c, optName, optState ) {
|
||||||
|
@ -208,10 +208,12 @@
|
|||||||
// hidden input changes may include compare symbols
|
// hidden input changes may include compare symbols
|
||||||
v = ( typeof v === 'undefined' ? $input.val() : v ).toString().replace(/[<>=]/g, '') || o.value;
|
v = ( typeof v === 'undefined' ? $input.val() : v ).toString().replace(/[<>=]/g, '') || o.value;
|
||||||
var compare = ($.isArray(o.compare) ? $cell.find(compareSelect).val() || o.compare[ o.selected || 0] : o.compare) || '',
|
var compare = ($.isArray(o.compare) ? $cell.find(compareSelect).val() || o.compare[ o.selected || 0] : o.compare) || '',
|
||||||
|
// eslint-disable-next-line eqeqeq
|
||||||
t = ' (' + (compare ? compare + v : v == o.min ? o.allText : v) + ')',
|
t = ' (' + (compare ? compare + v : v == o.min ? o.allText : v) + ')',
|
||||||
searchType = c.$table[0].hasInitialized ? (delayed ? delayed : o.delayed) || '' : true;
|
searchType = c.$table[0].hasInitialized ? (delayed ? delayed : o.delayed) || '' : true;
|
||||||
$cell.find('input[type=hidden]')
|
$cell.find('input[type=hidden]')
|
||||||
// add equal to the beginning, so we filter exact numbers
|
// add equal to the beginning, so we filter exact numbers
|
||||||
|
// eslint-disable-next-line eqeqeq
|
||||||
.val( ( compare ? compare + v : ( v == o.min ? '' : ( o.exactMatch ? '=' : '' ) + v ) ) )
|
.val( ( compare ? compare + v : ( v == o.min ? '' : ( o.exactMatch ? '=' : '' ) + v ) ) )
|
||||||
// ( val == o.min ? '' : val + (o.exactMatch ? '=' : ''))
|
// ( val == o.min ? '' : val + (o.exactMatch ? '=' : ''))
|
||||||
.trigger( notrigger ? '' : 'search', searchType ).end()
|
.trigger( notrigger ? '' : 'search', searchType ).end()
|
||||||
@ -242,6 +244,7 @@
|
|||||||
var v = this.value,
|
var v = this.value,
|
||||||
compare = ($.isArray(o.compare) ? $cell.find(compareSelect).val() || o.compare[ o.selected || 0] : o.compare) || '';
|
compare = ($.isArray(o.compare) ? $cell.find(compareSelect).val() || o.compare[ o.selected || 0] : o.compare) || '';
|
||||||
if (v !== this.lastValue) {
|
if (v !== this.lastValue) {
|
||||||
|
// eslint-disable-next-line eqeqeq
|
||||||
this.lastValue = ( compare ? compare + v : ( v == o.min ? '' : ( o.exactMatch ? '=' : '' ) + v ) );
|
this.lastValue = ( compare ? compare + v : ( v == o.min ? '' : ( o.exactMatch ? '=' : '' ) + v ) );
|
||||||
this.value = this.lastValue;
|
this.value = this.lastValue;
|
||||||
updateRange( v );
|
updateRange( v );
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*! Widget: filter - updated 2018-01-30 (v2.29.5) *//*
|
/*! Widget: filter - updated 2018-03-18 (v2.30.0) *//*
|
||||||
* Requires tablesorter v2.8+ and jQuery 1.7+
|
* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -280,6 +280,7 @@
|
|||||||
if ( tsfRegex.exact.test( data.iFilter ) ) {
|
if ( tsfRegex.exact.test( data.iFilter ) ) {
|
||||||
var txt = data.iFilter.replace( tsfRegex.exact, '' ),
|
var txt = data.iFilter.replace( tsfRegex.exact, '' ),
|
||||||
filter = tsf.parseFilter( c, txt, data ) || '';
|
filter = tsf.parseFilter( c, txt, data ) || '';
|
||||||
|
// eslint-disable-next-line eqeqeq
|
||||||
return data.anyMatch ? $.inArray( filter, data.rowArray ) >= 0 : filter == data.iExact;
|
return data.anyMatch ? $.inArray( filter, data.rowArray ) >= 0 : filter == data.iExact;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
@ -547,7 +548,7 @@
|
|||||||
|
|
||||||
// show processing icon
|
// show processing icon
|
||||||
if ( c.showProcessing ) {
|
if ( c.showProcessing ) {
|
||||||
txt = 'filterStart filterEnd '.split( ' ' ).join( c.namespace + 'filter ' );
|
txt = 'filterStart filterEnd '.split( ' ' ).join( c.namespace + 'filter-sp ' );
|
||||||
c.$table
|
c.$table
|
||||||
.unbind( txt.replace( ts.regex.spaces, ' ' ) )
|
.unbind( txt.replace( ts.regex.spaces, ' ' ) )
|
||||||
.bind( txt, function( event, columns ) {
|
.bind( txt, function( event, columns ) {
|
||||||
@ -626,6 +627,9 @@
|
|||||||
c.lastSearch = c.$table.data( 'lastSearch' );
|
c.lastSearch = c.$table.data( 'lastSearch' );
|
||||||
c.$table.triggerHandler( 'filterInit', c );
|
c.$table.triggerHandler( 'filterInit', c );
|
||||||
tsf.findRows( c.table, c.lastSearch || [] );
|
tsf.findRows( c.table, c.lastSearch || [] );
|
||||||
|
if (ts.debug(c, 'filter')) {
|
||||||
|
console.log('Filter >> Widget initialized');
|
||||||
|
}
|
||||||
};
|
};
|
||||||
if ( $.isEmptyObject( wo.filter_formatter ) ) {
|
if ( $.isEmptyObject( wo.filter_formatter ) ) {
|
||||||
completed();
|
completed();
|
||||||
@ -1326,6 +1330,7 @@
|
|||||||
storedFilters = $.extend( [], filters ),
|
storedFilters = $.extend( [], filters ),
|
||||||
c = table.config,
|
c = table.config,
|
||||||
wo = c.widgetOptions,
|
wo = c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'filter'),
|
||||||
// data object passed to filters; anyMatch is a flag for the filters
|
// data object passed to filters; anyMatch is a flag for the filters
|
||||||
data = {
|
data = {
|
||||||
anyMatch: false,
|
anyMatch: false,
|
||||||
@ -1342,7 +1347,6 @@
|
|||||||
defaultColFilter : [],
|
defaultColFilter : [],
|
||||||
defaultAnyFilter : ts.getColumnData( table, wo.filter_defaultFilter, c.columns, true ) || ''
|
defaultAnyFilter : ts.getColumnData( table, wo.filter_defaultFilter, c.columns, true ) || ''
|
||||||
};
|
};
|
||||||
|
|
||||||
// parse columns after formatter, in case the class is added at that point
|
// parse columns after formatter, in case the class is added at that point
|
||||||
data.parsed = [];
|
data.parsed = [];
|
||||||
for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
|
for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
|
||||||
@ -1364,8 +1368,8 @@
|
|||||||
( ts.getColumnData( table, wo.filter_excludeFilter, columnIndex, true ) || '' ).split( /\s+/ );
|
( ts.getColumnData( table, wo.filter_excludeFilter, columnIndex, true ) || '' ).split( /\s+/ );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Filter: Starting filter widget search', filters );
|
console.log( 'Filter >> Starting filter widget search', filters );
|
||||||
time = new Date();
|
time = new Date();
|
||||||
}
|
}
|
||||||
// filtered rows count
|
// filtered rows count
|
||||||
@ -1463,8 +1467,8 @@
|
|||||||
notFiltered = $rows.not( '.' + wo.filter_filteredRow ).length;
|
notFiltered = $rows.not( '.' + wo.filter_filteredRow ).length;
|
||||||
// can't search when all rows are hidden - this happens when looking for exact matches
|
// can't search when all rows are hidden - this happens when looking for exact matches
|
||||||
if ( searchFiltered && notFiltered === 0 ) { searchFiltered = false; }
|
if ( searchFiltered && notFiltered === 0 ) { searchFiltered = false; }
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Filter: Searching through ' +
|
console.log( 'Filter >> Searching through ' +
|
||||||
( searchFiltered && notFiltered < len ? notFiltered : 'all' ) + ' rows' );
|
( searchFiltered && notFiltered < len ? notFiltered : 'all' ) + ' rows' );
|
||||||
}
|
}
|
||||||
if ( data.anyMatchFlag ) {
|
if ( data.anyMatchFlag ) {
|
||||||
@ -1567,8 +1571,8 @@
|
|||||||
if ( wo.filter_saveFilters && ts.storage ) {
|
if ( wo.filter_saveFilters && ts.storage ) {
|
||||||
ts.storage( table, 'tablesorter-filters', tsf.processFilters( storedFilters, true ) );
|
ts.storage( table, 'tablesorter-filters', tsf.processFilters( storedFilters, true ) );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Completed filter widget search' + ts.benchmark(time) );
|
console.log( 'Filter >> Completed search' + ts.benchmark(time) );
|
||||||
}
|
}
|
||||||
if ( wo.filter_initialized ) {
|
if ( wo.filter_initialized ) {
|
||||||
c.$table.triggerHandler( 'filterBeforeEnd', c );
|
c.$table.triggerHandler( 'filterBeforeEnd', c );
|
||||||
@ -1783,13 +1787,13 @@
|
|||||||
options += '<option';
|
options += '<option';
|
||||||
for ( val in option ) {
|
for ( val in option ) {
|
||||||
if ( option.hasOwnProperty( val ) && val !== 'text' ) {
|
if ( option.hasOwnProperty( val ) && val !== 'text' ) {
|
||||||
options += ' ' + val + '="' + option[ val ] + '"';
|
options += ' ' + val + '="' + option[ val ].replace( tsfRegex.quote, '"' ) + '"';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ( !option.value ) {
|
if ( !option.value ) {
|
||||||
options += ' value="' + option.text + '"';
|
options += ' value="' + option.text.replace( tsfRegex.quote, '"' ) + '"';
|
||||||
}
|
}
|
||||||
options += '>' + option.text + '</option>';
|
options += '>' + option.text.replace( tsfRegex.quote, '"' ) + '</option>';
|
||||||
// above code is needed in jQuery < v1.8
|
// above code is needed in jQuery < v1.8
|
||||||
|
|
||||||
// make sure we don't turn an object into a string (objects without a "text" property)
|
// make sure we don't turn an object into a string (objects without a "text" property)
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
types : {
|
types : {
|
||||||
number : function(c, $column, txt, num) {
|
number : function(c, $column, txt, num) {
|
||||||
var word, result,
|
var result,
|
||||||
ascSort = $column.hasClass( ts.css.sortAsc );
|
ascSort = $column.hasClass( ts.css.sortAsc );
|
||||||
if ( num > 1 && txt !== '' ) {
|
if ( num > 1 && txt !== '' ) {
|
||||||
if ( ascSort ) {
|
if ( ascSort ) {
|
||||||
@ -43,7 +43,7 @@
|
|||||||
letter : function(c, $column, txt, num) {
|
letter : function(c, $column, txt, num) {
|
||||||
return txt ? (txt + ' ').substring(0, num) : '';
|
return txt ? (txt + ' ').substring(0, num) : '';
|
||||||
},
|
},
|
||||||
date : function(c, $column, txt, part, group) {
|
date : function(c, $column, txt, part) {
|
||||||
var year, month,
|
var year, month,
|
||||||
wo = c.widgetOptions,
|
wo = c.widgetOptions,
|
||||||
time = new Date(txt || '');
|
time = new Date(txt || '');
|
||||||
@ -203,7 +203,7 @@
|
|||||||
return savedGroup;
|
return savedGroup;
|
||||||
},
|
},
|
||||||
findColumnGroups : function( c, wo, data ) {
|
findColumnGroups : function( c, wo, data ) {
|
||||||
var tbodyIndex, norm_rows, $row, rowIndex, end, undef,
|
var tbodyIndex, norm_rows, rowIndex, end, undef,
|
||||||
hasPager = ts.hasWidget( c.table, 'pager' ),
|
hasPager = ts.hasWidget( c.table, 'pager' ),
|
||||||
p = c.pager || {};
|
p = c.pager || {};
|
||||||
data.groupIndex = 0;
|
data.groupIndex = 0;
|
||||||
@ -259,7 +259,7 @@
|
|||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
// pressing enter will toggle the group
|
// pressing enter will toggle the group
|
||||||
if (event.type === 'keyup' && event.which !== 13) { return; }
|
if (event.type === 'keyup' && event.which !== 13) { return; }
|
||||||
var isCollapsed, $groups, indx,
|
var isCollapsed, indx,
|
||||||
$this = $(this),
|
$this = $(this),
|
||||||
name = $this.find('.group-name').text().toLowerCase() + $this.attr('data-group-index');
|
name = $this.find('.group-name').text().toLowerCase() + $this.attr('data-group-index');
|
||||||
// use shift-click to toggle ALL groups
|
// use shift-click to toggle ALL groups
|
||||||
@ -276,7 +276,6 @@
|
|||||||
}
|
}
|
||||||
// save collapsed groups
|
// save collapsed groups
|
||||||
if (wo.group_saveGroups && ts.storage) {
|
if (wo.group_saveGroups && ts.storage) {
|
||||||
$groups = c.$table.find('.group-header');
|
|
||||||
if (!wo.group_collapsedGroups[wo.group_collapsedGroup]) {
|
if (!wo.group_collapsedGroups[wo.group_collapsedGroup]) {
|
||||||
wo.group_collapsedGroups[wo.group_collapsedGroup] = [];
|
wo.group_collapsedGroups[wo.group_collapsedGroup] = [];
|
||||||
}
|
}
|
||||||
@ -347,10 +346,10 @@
|
|||||||
init: function(table, thisWidget, c, wo) {
|
init: function(table, thisWidget, c, wo) {
|
||||||
tsg.bindEvents(table, c, wo);
|
tsg.bindEvents(table, c, wo);
|
||||||
},
|
},
|
||||||
format: function(table, c, wo) {
|
format: function(table) {
|
||||||
tsg.update(table);
|
tsg.update(table);
|
||||||
},
|
},
|
||||||
remove : function(table, c, wo){
|
remove : function(table, c) {
|
||||||
c.$table
|
c.$table
|
||||||
.off('click', 'tr.group-header')
|
.off('click', 'tr.group-header')
|
||||||
.off('pagerChange.tsgrouping')
|
.off('pagerChange.tsgrouping')
|
||||||
|
@ -52,8 +52,7 @@
|
|||||||
format: function (table, c, wo) {
|
format: function (table, c, wo) {
|
||||||
var txt;
|
var txt;
|
||||||
c.$headers.each(function() {
|
c.$headers.each(function() {
|
||||||
var t = this,
|
var $this = $(this),
|
||||||
$this = $(this),
|
|
||||||
col = parseInt( $this.attr( 'data-column' ), 10 ),
|
col = parseInt( $this.attr( 'data-column' ), 10 ),
|
||||||
sortType = wo.headerTitle_type[ col ] || c.parsers[ col ].type || 'text',
|
sortType = wo.headerTitle_type[ col ] || c.parsers[ col ].type || 'text',
|
||||||
sortDirection = $this.hasClass(ts.css.sortAsc) ? 0 : $this.hasClass(ts.css.sortDesc) ? 1 : 2,
|
sortDirection = $this.hasClass(ts.css.sortAsc) ? 0 : $this.hasClass(ts.css.sortDesc) ? 1 : 2,
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
$(window).scroll();
|
$(window).scroll();
|
||||||
}, 1);
|
}, 1);
|
||||||
},
|
},
|
||||||
remove : function( c, wo ) {
|
remove : function( c ) {
|
||||||
c.$table.off( c.namespace + 'lazyload' );
|
c.$table.off( c.namespace + 'lazyload' );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -200,26 +200,26 @@
|
|||||||
var settings = {
|
var settings = {
|
||||||
threshold : 0,
|
threshold : 0,
|
||||||
failure_limit : 0,
|
failure_limit : 0,
|
||||||
event : "scroll",
|
event : 'scroll',
|
||||||
effect : "show",
|
effect : 'show',
|
||||||
container : window,
|
container : window,
|
||||||
data_attribute : "original",
|
data_attribute : 'original',
|
||||||
skip_invisible : false,
|
skip_invisible : false,
|
||||||
appear : null,
|
appear : null,
|
||||||
load : null,
|
load : null,
|
||||||
placeholder : "data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
|
placeholder : 'data:image/gif;base64,R0lGODlhAQABAIABAP///wAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=='
|
||||||
};
|
};
|
||||||
function update() {
|
function update() {
|
||||||
var counter = 0;
|
var counter = 0;
|
||||||
elements.each(function() {
|
elements.each(function() {
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
if (settings.skip_invisible && !$this.is(":visible")) {
|
if (settings.skip_invisible && !$this.is(':visible')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ($.abovethetop(this, settings) || $.leftofbegin(this, settings)) {
|
if ($.abovethetop(this, settings) || $.leftofbegin(this, settings)) {
|
||||||
/* Nothing. */
|
/* Nothing. */
|
||||||
} else if (!$.belowthefold(this, settings) && !$.rightoffold(this, settings)) {
|
} else if (!$.belowthefold(this, settings) && !$.rightoffold(this, settings)) {
|
||||||
$this.trigger("appear");
|
$this.trigger('appear');
|
||||||
/* if we found an image we'll load, reset the counter */
|
/* if we found an image we'll load, reset the counter */
|
||||||
counter = 0;
|
counter = 0;
|
||||||
} else {
|
} else {
|
||||||
@ -245,7 +245,7 @@
|
|||||||
$container = (settings.container === undefined ||
|
$container = (settings.container === undefined ||
|
||||||
settings.container === window) ? $window : $(settings.container);
|
settings.container === window) ? $window : $(settings.container);
|
||||||
/* Fire one scroll event per scroll. Not one scroll event per image. */
|
/* Fire one scroll event per scroll. Not one scroll event per image. */
|
||||||
if (0 === settings.event.indexOf("scroll")) {
|
if (0 === settings.event.indexOf('scroll')) {
|
||||||
$container.bind(settings.event, function() {
|
$container.bind(settings.event, function() {
|
||||||
return update();
|
return update();
|
||||||
});
|
});
|
||||||
@ -255,26 +255,26 @@
|
|||||||
var $self = $(self);
|
var $self = $(self);
|
||||||
self.loaded = false;
|
self.loaded = false;
|
||||||
/* If no src attribute given use data:uri. */
|
/* If no src attribute given use data:uri. */
|
||||||
if ($self.attr("src") === undefined || $self.attr("src") === false) {
|
if ($self.attr('src') === undefined || $self.attr('src') === false) {
|
||||||
if ($self.is("img")) {
|
if ($self.is('img')) {
|
||||||
$self.attr("src", settings.placeholder);
|
$self.attr('src', settings.placeholder);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/* When appear is triggered load original image. */
|
/* When appear is triggered load original image. */
|
||||||
$self.one("appear", function() {
|
$self.one('appear', function() {
|
||||||
if (!this.loaded) {
|
if (!this.loaded) {
|
||||||
if (settings.appear) {
|
if (settings.appear) {
|
||||||
var elements_left = elements.length;
|
var elements_left = elements.length;
|
||||||
settings.appear.call(self, elements_left, settings);
|
settings.appear.call(self, elements_left, settings);
|
||||||
}
|
}
|
||||||
$("<img />")
|
$('<img />')
|
||||||
.bind("load", function() {
|
.bind('load', function() {
|
||||||
var original = $self.attr("data-" + settings.data_attribute);
|
var original = $self.attr('data-' + settings.data_attribute);
|
||||||
$self.hide();
|
$self.hide();
|
||||||
if ($self.is("img")) {
|
if ($self.is('img')) {
|
||||||
$self.attr("src", original);
|
$self.attr('src', original);
|
||||||
} else {
|
} else {
|
||||||
$self.css("background-image", "url('" + original + "')");
|
$self.css('background-image', 'url("' + original + '")');
|
||||||
}
|
}
|
||||||
$self[settings.effect](settings.effect_speed);
|
$self[settings.effect](settings.effect_speed);
|
||||||
self.loaded = true;
|
self.loaded = true;
|
||||||
@ -288,30 +288,30 @@
|
|||||||
settings.load.call(self, elements_left, settings);
|
settings.load.call(self, elements_left, settings);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.attr("src", $self.attr("data-" + settings.data_attribute));
|
.attr('src', $self.attr('data-' + settings.data_attribute));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/* When wanted event is triggered load original image */
|
/* When wanted event is triggered load original image */
|
||||||
/* by triggering appear. */
|
/* by triggering appear. */
|
||||||
if (0 !== settings.event.indexOf("scroll")) {
|
if (0 !== settings.event.indexOf('scroll')) {
|
||||||
$self.bind(settings.event, function() {
|
$self.bind(settings.event, function() {
|
||||||
if (!self.loaded) {
|
if (!self.loaded) {
|
||||||
$self.trigger("appear");
|
$self.trigger('appear');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/* Check if something appears when window is resized. */
|
/* Check if something appears when window is resized. */
|
||||||
$window.bind("resize", function() {
|
$window.bind('resize', function() {
|
||||||
update();
|
update();
|
||||||
});
|
});
|
||||||
/* With IOS5 force loading images when navigating with back button. */
|
/* With IOS5 force loading images when navigating with back button. */
|
||||||
/* Non optimal workaround. */
|
/* Non optimal workaround. */
|
||||||
if ((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)) {
|
if ((/(?:iphone|ipod|ipad).*os 5/gi).test(navigator.appVersion)) {
|
||||||
$window.bind("pageshow", function(event) {
|
$window.bind('pageshow', function(event) {
|
||||||
if (event.originalEvent && event.originalEvent.persisted) {
|
if (event.originalEvent && event.originalEvent.persisted) {
|
||||||
elements.each(function() {
|
elements.each(function() {
|
||||||
$(this).trigger("appear");
|
$(this).trigger('appear');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -365,17 +365,17 @@
|
|||||||
!$.belowthefold(element, settings) && !$.abovethetop(element, settings);
|
!$.belowthefold(element, settings) && !$.abovethetop(element, settings);
|
||||||
};
|
};
|
||||||
/* Custom selectors for your convenience. */
|
/* Custom selectors for your convenience. */
|
||||||
/* Use as $("img:below-the-fold").something() or */
|
/* Use as $('img:below-the-fold').something() or */
|
||||||
/* $("img").filter(":below-the-fold").something() which is faster */
|
/* $('img').filter(':below-the-fold').something() which is faster */
|
||||||
$.extend($.expr[":"], {
|
$.extend($.expr[':'], {
|
||||||
"below-the-fold" : function(a) { return $.belowthefold(a, {threshold : 0}); },
|
'below-the-fold' : function(a) { return $.belowthefold(a, {threshold : 0}); },
|
||||||
"above-the-top" : function(a) { return !$.belowthefold(a, {threshold : 0}); },
|
'above-the-top' : function(a) { return !$.belowthefold(a, {threshold : 0}); },
|
||||||
"right-of-screen": function(a) { return $.rightoffold(a, {threshold : 0}); },
|
'right-of-screen': function(a) { return $.rightoffold(a, {threshold : 0}); },
|
||||||
"left-of-screen" : function(a) { return !$.rightoffold(a, {threshold : 0}); },
|
'left-of-screen' : function(a) { return !$.rightoffold(a, {threshold : 0}); },
|
||||||
"in-viewport" : function(a) { return $.inviewport(a, {threshold : 0}); },
|
'in-viewport' : function(a) { return $.inviewport(a, {threshold : 0}); },
|
||||||
/* Maintain BC for couple of versions. */
|
/* Maintain BC for couple of versions. */
|
||||||
"above-the-fold" : function(a) { return !$.belowthefold(a, {threshold : 0}); },
|
'above-the-fold' : function(a) { return !$.belowthefold(a, {threshold : 0}); },
|
||||||
"right-of-fold" : function(a) { return $.rightoffold(a, {threshold : 0}); },
|
'right-of-fold' : function(a) { return $.rightoffold(a, {threshold : 0}); },
|
||||||
"left-of-fold" : function(a) { return !$.rightoffold(a, {threshold : 0}); }
|
'left-of-fold' : function(a) { return !$.rightoffold(a, {threshold : 0}); }
|
||||||
});
|
});
|
||||||
})(jQuery, window, document);
|
})(jQuery, window, document);
|
||||||
|
@ -171,7 +171,6 @@
|
|||||||
if ( hasFilter || !$row.hasClass( filtered ) ) {
|
if ( hasFilter || !$row.hasClass( filtered ) ) {
|
||||||
$cells = $row.children().not( mathIgnore );
|
$cells = $row.children().not( mathIgnore );
|
||||||
cellLen = $cells.length;
|
cellLen = $cells.length;
|
||||||
// $row.children().each(function(){
|
|
||||||
for ( cellIndex = 0; cellIndex < cellLen; cellIndex++ ) {
|
for ( cellIndex = 0; cellIndex < cellLen; cellIndex++ ) {
|
||||||
$t = $cells.eq( cellIndex );
|
$t = $cells.eq( cellIndex );
|
||||||
col = math.getCellIndex( $t );
|
col = math.getCellIndex( $t );
|
||||||
@ -221,7 +220,7 @@
|
|||||||
recalculate : function(c, wo, init) {
|
recalculate : function(c, wo, init) {
|
||||||
if ( c && ( !wo.math_isUpdating || init ) ) {
|
if ( c && ( !wo.math_isUpdating || init ) ) {
|
||||||
|
|
||||||
var undef, time, mathAttr, $mathCells, indx, len,
|
var time, mathAttr, $mathCells, indx, len,
|
||||||
changed = false,
|
changed = false,
|
||||||
filters = {};
|
filters = {};
|
||||||
if ( c.debug || wo.math_debug ) {
|
if ( c.debug || wo.math_debug ) {
|
||||||
@ -435,7 +434,7 @@
|
|||||||
mask = mask.substring( start, index );
|
mask = mask.substring( start, index );
|
||||||
|
|
||||||
// convert any string to number according to formation sign.
|
// convert any string to number according to formation sign.
|
||||||
val = mask.charAt( 0 ) == '-' ? -val : +val;
|
val = mask.charAt( 0 ) === '-' ? -val : +val;
|
||||||
isNegative = val < 0 ? val = -val : 0; // process only abs(), and turn on flag.
|
isNegative = val < 0 ? val = -val : 0; // process only abs(), and turn on flag.
|
||||||
|
|
||||||
// search for separator for grp & decimal, anything not digit, not +/- sign, not #.
|
// search for separator for grp & decimal, anything not digit, not +/- sign, not #.
|
||||||
@ -606,7 +605,7 @@
|
|||||||
// complete executed after each fucntion
|
// complete executed after each fucntion
|
||||||
math_complete : null, // function($cell, wo, result, value, arry) { return result; },
|
math_complete : null, // function($cell, wo, result, value, arry) { return result; },
|
||||||
// math_completed called after all math calculations have completed
|
// math_completed called after all math calculations have completed
|
||||||
math_completed: function( config ) {},
|
math_completed: function( /* config */ ) {},
|
||||||
// order of calculation; 'all' is last
|
// order of calculation; 'all' is last
|
||||||
math_priority : [ 'row', 'above', 'below', 'col' ],
|
math_priority : [ 'row', 'above', 'below', 'col' ],
|
||||||
// template for or just prepend the mask prefix & suffix with this HTML
|
// template for or just prepend the mask prefix & suffix with this HTML
|
||||||
|
@ -164,8 +164,9 @@
|
|||||||
headers = output.processRow(c, $this, true, outputJSON);
|
headers = output.processRow(c, $this, true, outputJSON);
|
||||||
|
|
||||||
// all tbody rows - do not include widget added rows (e.g. grouping widget headers)
|
// all tbody rows - do not include widget added rows (e.g. grouping widget headers)
|
||||||
if ( !$rows )
|
if ( !$rows ) {
|
||||||
$rows = $el.children('tbody').children('tr').not(c.selectorRemove);
|
$rows = $el.children('tbody').children('tr').not(c.selectorRemove);
|
||||||
|
}
|
||||||
|
|
||||||
// check for a filter callback function first! because
|
// check for a filter callback function first! because
|
||||||
// /^f/.test(function() { console.log('test'); }) is TRUE! (function is converted to a string)
|
// /^f/.test(function() { console.log('test'); }) is TRUE! (function is converted to a string)
|
||||||
@ -414,7 +415,7 @@
|
|||||||
// callback executed when processing completes
|
// callback executed when processing completes
|
||||||
// return true to continue download/output
|
// return true to continue download/output
|
||||||
// return false to stop delivery & do something else with the data
|
// return false to stop delivery & do something else with the data
|
||||||
output_callback : function(config, data){ return true; },
|
output_callback : function(/* config, data */) { return true; },
|
||||||
// JSON callback executed when a colspan is encountered in the header
|
// JSON callback executed when a colspan is encountered in the header
|
||||||
output_callbackJSON : function($cell, txt, cellIndex) { return txt + '(' + (cellIndex) + ')'; },
|
output_callbackJSON : function($cell, txt, cellIndex) { return txt + '(' + (cellIndex) + ')'; },
|
||||||
// the need to modify this for Excel no longer exists
|
// the need to modify this for Excel no longer exists
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*! Widget: Pager - updated 5/24/2017 (v2.28.11) */
|
/*! Widget: Pager - updated 2018-03-18 (v2.30.0) */
|
||||||
/* Requires tablesorter v2.8+ and jQuery 1.7+
|
/* Requires tablesorter v2.8+ and jQuery 1.7+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -91,7 +91,7 @@
|
|||||||
// ],
|
// ],
|
||||||
// [ "header1", "header2", ... "headerN" ] // optional
|
// [ "header1", "header2", ... "headerN" ] // optional
|
||||||
// ]
|
// ]
|
||||||
pager_ajaxProcessing: function( ajax ){ return [ 0, [], null ]; },
|
pager_ajaxProcessing: function( /* ajax */ ) { return [ 0, [], null ]; },
|
||||||
|
|
||||||
// css class names of pager arrows
|
// css class names of pager arrows
|
||||||
pager_css: {
|
pager_css: {
|
||||||
@ -158,12 +158,15 @@
|
|||||||
setPage: wo.pager_startPage
|
setPage: wo.pager_startPage
|
||||||
}, c.pager );
|
}, c.pager );
|
||||||
|
|
||||||
|
// Used by core appendCache; !undefined is always true
|
||||||
|
p.removeRows = wo.pager_removeRows;
|
||||||
|
|
||||||
// pager initializes multiple times before table has completed initialization
|
// pager initializes multiple times before table has completed initialization
|
||||||
if ( p.isInitializing ) { return; }
|
if ( p.isInitializing ) { return; }
|
||||||
|
|
||||||
p.isInitializing = true;
|
p.isInitializing = true;
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'pager') ) {
|
||||||
console.log( 'Pager: Initializing' );
|
console.log( 'Pager >> Initializing' );
|
||||||
}
|
}
|
||||||
|
|
||||||
p.size = $.data( table, 'pagerLastSize' ) || wo.pager_size;
|
p.size = $.data( table, 'pagerLastSize' ) || wo.pager_size;
|
||||||
@ -227,8 +230,8 @@
|
|||||||
p.initializing = false;
|
p.initializing = false;
|
||||||
p.isInitializing = false;
|
p.isInitializing = false;
|
||||||
tsp.setPageSize( c, p.size ); // page size 0 is ignored
|
tsp.setPageSize( c, p.size ); // page size 0 is ignored
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'pager') ) {
|
||||||
console.log( 'Pager: Triggering pagerInitialized' );
|
console.log( 'Pager >> Triggering pagerInitialized' );
|
||||||
}
|
}
|
||||||
c.$table.triggerHandler( 'pagerInitialized', c );
|
c.$table.triggerHandler( 'pagerInitialized', c );
|
||||||
// filter widget not initialized; it will update the output display & fire off the pagerComplete event
|
// filter widget not initialized; it will update the output display & fire off the pagerComplete event
|
||||||
@ -243,7 +246,8 @@
|
|||||||
p = c.pager,
|
p = c.pager,
|
||||||
wo = c.widgetOptions,
|
wo = c.widgetOptions,
|
||||||
namespace = c.namespace + 'pager',
|
namespace = c.namespace + 'pager',
|
||||||
s = wo.pager_selectors;
|
s = wo.pager_selectors,
|
||||||
|
debug = ts.debug(c, 'pager');
|
||||||
c.$table
|
c.$table
|
||||||
.off( namespace )
|
.off( namespace )
|
||||||
.on( 'filterInit filterStart '.split( ' ' ).join( namespace + ' ' ), function( e, filters ) {
|
.on( 'filterInit filterStart '.split( ' ' ).join( namespace + ' ' ), function( e, filters ) {
|
||||||
@ -284,7 +288,7 @@
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
tsp.enablePager( c, true );
|
tsp.enablePager( c, true );
|
||||||
})
|
})
|
||||||
.on( 'destroyPager' + namespace, function( e, refreshing ) {
|
.on( 'destroyPager' + namespace, function( e ) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
// call removeWidget to make sure internal flags are modified.
|
// call removeWidget to make sure internal flags are modified.
|
||||||
ts.removeWidget( c.table, 'pager', false );
|
ts.removeWidget( c.table, 'pager', false );
|
||||||
@ -343,8 +347,8 @@
|
|||||||
// clicked controls
|
// clicked controls
|
||||||
ctrls = [ s.first, s.prev, s.next, s.last ];
|
ctrls = [ s.first, s.prev, s.next, s.last ];
|
||||||
fxn = [ 'moveToFirstPage', 'moveToPrevPage', 'moveToNextPage', 'moveToLastPage' ];
|
fxn = [ 'moveToFirstPage', 'moveToPrevPage', 'moveToNextPage', 'moveToLastPage' ];
|
||||||
if ( c.debug && !p.$container.length ) {
|
if ( debug && !p.$container.length ) {
|
||||||
console.warn( 'Pager: >> Container not found' );
|
console.warn( 'Pager >> "container" not found' );
|
||||||
}
|
}
|
||||||
p.$container.find( ctrls.join( ',' ) )
|
p.$container.find( ctrls.join( ',' ) )
|
||||||
.attr( 'tabindex', 0 )
|
.attr( 'tabindex', 0 )
|
||||||
@ -373,8 +377,8 @@
|
|||||||
tsp.moveToPage( c, p, true );
|
tsp.moveToPage( c, p, true );
|
||||||
tsp.updatePageDisplay( c, false );
|
tsp.updatePageDisplay( c, false );
|
||||||
});
|
});
|
||||||
} else if ( c.debug ) {
|
} else if ( debug ) {
|
||||||
console.warn( 'Pager: >> Goto selector not found' );
|
console.warn( 'Pager >> "goto" selector not found' );
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = p.$container.find( wo.pager_selectors.pageSize );
|
tmp = p.$container.find( wo.pager_selectors.pageSize );
|
||||||
@ -394,8 +398,8 @@
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
} else if ( c.debug ) {
|
} else if ( debug ) {
|
||||||
console.warn('Pager: >> Size selector not found');
|
console.warn('Pager >> "size" selector not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
@ -532,8 +536,8 @@
|
|||||||
tsp.pagerArrows( c );
|
tsp.pagerArrows( c );
|
||||||
tsp.fixHeight( c );
|
tsp.fixHeight( c );
|
||||||
if ( p.initialized && completed !== false ) {
|
if ( p.initialized && completed !== false ) {
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'pager') ) {
|
||||||
console.log( 'Pager: Triggering pagerComplete' );
|
console.log( 'Pager >> Triggering pagerComplete' );
|
||||||
}
|
}
|
||||||
c.$table.triggerHandler( 'pagerComplete', c );
|
c.$table.triggerHandler( 'pagerComplete', c );
|
||||||
// save pager info to storage
|
// save pager info to storage
|
||||||
@ -655,7 +659,6 @@
|
|||||||
hideRows: function( c ) {
|
hideRows: function( c ) {
|
||||||
if ( !c.widgetOptions.pager_ajaxUrl ) {
|
if ( !c.widgetOptions.pager_ajaxUrl ) {
|
||||||
var tbodyIndex, rowIndex, $rows, len, lastIndex,
|
var tbodyIndex, rowIndex, $rows, len, lastIndex,
|
||||||
table = c.table,
|
|
||||||
p = c.pager,
|
p = c.pager,
|
||||||
wo = c.widgetOptions,
|
wo = c.widgetOptions,
|
||||||
tbodyLen = c.$tbodies.length,
|
tbodyLen = c.$tbodies.length,
|
||||||
@ -721,7 +724,8 @@
|
|||||||
renderAjax: function( data, c, xhr, settings, exception ) {
|
renderAjax: function( data, c, xhr, settings, exception ) {
|
||||||
var table = c.table,
|
var table = c.table,
|
||||||
p = c.pager,
|
p = c.pager,
|
||||||
wo = c.widgetOptions;
|
wo = c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'pager');
|
||||||
// process data
|
// process data
|
||||||
if ( $.isFunction( wo.pager_ajaxProcessing ) ) {
|
if ( $.isFunction( wo.pager_ajaxProcessing ) ) {
|
||||||
|
|
||||||
@ -734,15 +738,14 @@
|
|||||||
var i, j, t, hsh, $f, $sh, $headers, $h, icon, th, d, l, rr_count, len, sz,
|
var i, j, t, hsh, $f, $sh, $headers, $h, icon, th, d, l, rr_count, len, sz,
|
||||||
$table = c.$table,
|
$table = c.$table,
|
||||||
tds = '',
|
tds = '',
|
||||||
result = wo.pager_ajaxProcessing( data, table, xhr ) || [ 0, [] ],
|
result = wo.pager_ajaxProcessing( data, table, xhr ) || [ 0, [] ];
|
||||||
hl = $table.find( 'thead th' ).length;
|
|
||||||
|
|
||||||
// Clean up any previous error.
|
// Clean up any previous error.
|
||||||
ts.showError( table );
|
ts.showError( table );
|
||||||
|
|
||||||
if ( exception ) {
|
if ( exception ) {
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.error( 'Pager: >> Ajax Error', xhr, settings, exception );
|
console.error( 'Pager >> Ajax Error', xhr, settings, exception );
|
||||||
}
|
}
|
||||||
ts.showError( table, xhr, settings, exception );
|
ts.showError( table, xhr, settings, exception );
|
||||||
c.$tbodies.eq( 0 ).children( 'tr' ).detach();
|
c.$tbodies.eq( 0 ).children( 'tr' ).detach();
|
||||||
@ -846,8 +849,8 @@
|
|||||||
// apply widgets after table has rendered & after a delay to prevent
|
// apply widgets after table has rendered & after a delay to prevent
|
||||||
// multiple applyWidget blocking code from blocking this trigger
|
// multiple applyWidget blocking code from blocking this trigger
|
||||||
setTimeout( function() {
|
setTimeout( function() {
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Pager: Triggering pagerChange' );
|
console.log( 'Pager >> Triggering pagerChange' );
|
||||||
}
|
}
|
||||||
$table.triggerHandler( 'pagerChange', p );
|
$table.triggerHandler( 'pagerChange', p );
|
||||||
ts.applyWidget( table );
|
ts.applyWidget( table );
|
||||||
@ -889,8 +892,8 @@
|
|||||||
p.oldAjaxSuccess( data );
|
p.oldAjaxSuccess( data );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'pager') ) {
|
||||||
console.log( 'Pager: Ajax initialized', p.ajaxObject );
|
console.log( 'Pager >> Ajax initialized', p.ajaxObject );
|
||||||
}
|
}
|
||||||
$.ajax( p.ajaxObject );
|
$.ajax( p.ajaxObject );
|
||||||
}
|
}
|
||||||
@ -935,8 +938,8 @@
|
|||||||
if ( $.isFunction( wo.pager_customAjaxUrl ) ) {
|
if ( $.isFunction( wo.pager_customAjaxUrl ) ) {
|
||||||
url = wo.pager_customAjaxUrl( c.table, url );
|
url = wo.pager_customAjaxUrl( c.table, url );
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'pager') ) {
|
||||||
console.log( 'Pager: Ajax url = ' + url );
|
console.log( 'Pager >> Ajax url = ' + url );
|
||||||
}
|
}
|
||||||
return url;
|
return url;
|
||||||
},
|
},
|
||||||
@ -946,13 +949,14 @@
|
|||||||
table = c.table,
|
table = c.table,
|
||||||
p = c.pager,
|
p = c.pager,
|
||||||
wo = c.widgetOptions,
|
wo = c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'pager'),
|
||||||
f = c.$table.hasClass('hasFilters'),
|
f = c.$table.hasClass('hasFilters'),
|
||||||
l = rows && rows.length || 0, // rows may be undefined
|
l = rows && rows.length || 0, // rows may be undefined
|
||||||
e = p.size === 'all' ? p.totalRows : p.size,
|
e = p.size === 'all' ? p.totalRows : p.size,
|
||||||
s = ( p.page * e );
|
s = ( p.page * e );
|
||||||
if ( l < 1 ) {
|
if ( l < 1 ) {
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.warn( 'Pager: >> No rows for pager to render' );
|
console.warn( 'Pager >> No rows for pager to render' );
|
||||||
}
|
}
|
||||||
// empty table, abort!
|
// empty table, abort!
|
||||||
return;
|
return;
|
||||||
@ -964,8 +968,8 @@
|
|||||||
p.cacheIndex = [];
|
p.cacheIndex = [];
|
||||||
p.isDisabled = false; // needed because sorting will change the page and re-enable the pager
|
p.isDisabled = false; // needed because sorting will change the page and re-enable the pager
|
||||||
if ( p.initialized ) {
|
if ( p.initialized ) {
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Pager: Triggering pagerChange' );
|
console.log( 'Pager >> Triggering pagerChange' );
|
||||||
}
|
}
|
||||||
c.$table.triggerHandler( 'pagerChange', c );
|
c.$table.triggerHandler( 'pagerChange', c );
|
||||||
}
|
}
|
||||||
@ -997,8 +1001,8 @@
|
|||||||
wo.pager_startPage = p.page;
|
wo.pager_startPage = p.page;
|
||||||
wo.pager_size = p.size;
|
wo.pager_size = p.size;
|
||||||
if ( table.isUpdating ) {
|
if ( table.isUpdating ) {
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Pager: Triggering updateComplete' );
|
console.log( 'Pager >> Triggering updateComplete' );
|
||||||
}
|
}
|
||||||
c.$table.triggerHandler( 'updateComplete', [ table, true ] );
|
c.$table.triggerHandler( 'updateComplete', [ table, true ] );
|
||||||
}
|
}
|
||||||
@ -1026,8 +1030,8 @@
|
|||||||
tsp.renderTable( c, c.rowsCopy );
|
tsp.renderTable( c, c.rowsCopy );
|
||||||
p.isDisabled = true;
|
p.isDisabled = true;
|
||||||
ts.applyWidget( table );
|
ts.applyWidget( table );
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'pager') ) {
|
||||||
console.log( 'Pager: Disabled' );
|
console.log( 'Pager >> Disabled' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// disable size selector
|
// disable size selector
|
||||||
@ -1074,14 +1078,14 @@
|
|||||||
var tmp,
|
var tmp,
|
||||||
table = c.table,
|
table = c.table,
|
||||||
wo = c.widgetOptions,
|
wo = c.widgetOptions,
|
||||||
l = p.last;
|
l = p.last,
|
||||||
|
debug = ts.debug(c, 'pager');
|
||||||
|
|
||||||
// abort page move if the table has filters and has not been initialized
|
// abort page move if the table has filters and has not been initialized
|
||||||
if ( p.ajax && !wo.filter_initialized && ts.hasWidget( table, 'filter' ) ) { return; }
|
if ( p.ajax && !wo.filter_initialized && ts.hasWidget( table, 'filter' ) ) { return; }
|
||||||
|
|
||||||
tsp.parsePageNumber( c, p );
|
tsp.parsePageNumber( c, p );
|
||||||
tsp.calcFilters( c );
|
tsp.calcFilters( c );
|
||||||
|
|
||||||
// fixes issue where one current filter is [] and the other is [ '', '', '' ],
|
// fixes issue where one current filter is [] and the other is [ '', '', '' ],
|
||||||
// making the next if comparison think the filters as different. Fixes #202.
|
// making the next if comparison think the filters as different. Fixes #202.
|
||||||
l.currentFilters = ( l.currentFilters || [] ).join( '' ) === '' ? [] : l.currentFilters;
|
l.currentFilters = ( l.currentFilters || [] ).join( '' ) === '' ? [] : l.currentFilters;
|
||||||
@ -1096,8 +1100,8 @@
|
|||||||
l.sortList === ( c.sortList || [] ).join( ',' ) ) {
|
l.sortList === ( c.sortList || [] ).join( ',' ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Pager: Changing to page ' + p.page );
|
console.log( 'Pager >> Changing to page ' + p.page );
|
||||||
}
|
}
|
||||||
p.last = {
|
p.last = {
|
||||||
page: p.page,
|
page: p.page,
|
||||||
@ -1114,9 +1118,9 @@
|
|||||||
wo.pager_processAjaxOnInit = true;
|
wo.pager_processAjaxOnInit = true;
|
||||||
tmp = wo.pager_initialRows;
|
tmp = wo.pager_initialRows;
|
||||||
p.totalRows = typeof tmp.total !== 'undefined' ? tmp.total :
|
p.totalRows = typeof tmp.total !== 'undefined' ? tmp.total :
|
||||||
( c.debug ? console.error('Pager: no initial total page set!') || 0 : 0 );
|
( debug ? console.error('Pager >> No initial total page set!') || 0 : 0 );
|
||||||
p.filteredRows = typeof tmp.filtered !== 'undefined' ? tmp.filtered :
|
p.filteredRows = typeof tmp.filtered !== 'undefined' ? tmp.filtered :
|
||||||
( c.debug ? console.error('Pager: no initial filtered page set!') || 0 : 0 );
|
( debug ? console.error('Pager >> No initial filtered page set!') || 0 : 0 );
|
||||||
tsp.updatePageDisplay( c, false );
|
tsp.updatePageDisplay( c, false );
|
||||||
} else {
|
} else {
|
||||||
tsp.getAjax( c );
|
tsp.getAjax( c );
|
||||||
@ -1126,14 +1130,14 @@
|
|||||||
}
|
}
|
||||||
$.data( table, 'pagerLastPage', p.page );
|
$.data( table, 'pagerLastPage', p.page );
|
||||||
if ( p.initialized && pageMoved !== false ) {
|
if ( p.initialized && pageMoved !== false ) {
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Pager: Triggering pageMoved' );
|
console.log( 'Pager >> Triggering pageMoved' );
|
||||||
}
|
}
|
||||||
c.$table.triggerHandler( 'pageMoved', c );
|
c.$table.triggerHandler( 'pageMoved', c );
|
||||||
ts.applyWidget( table );
|
ts.applyWidget( table );
|
||||||
if ( !p.ajax && table.isUpdating ) {
|
if ( !p.ajax && table.isUpdating ) {
|
||||||
if ( c.debug ) {
|
if ( debug ) {
|
||||||
console.log( 'Pager: Triggering updateComplete' );
|
console.log( 'Pager >> Triggering updateComplete' );
|
||||||
}
|
}
|
||||||
c.$table.triggerHandler( 'updateComplete', [ table, true ] );
|
c.$table.triggerHandler( 'updateComplete', [ table, true ] );
|
||||||
}
|
}
|
||||||
@ -1269,8 +1273,8 @@
|
|||||||
tsp.setPageSize( c, p.size );
|
tsp.setPageSize( c, p.size );
|
||||||
tsp.moveToPage( c, p, true );
|
tsp.moveToPage( c, p, true );
|
||||||
tsp.hideRowsSetup( c );
|
tsp.hideRowsSetup( c );
|
||||||
if ( c.debug ) {
|
if ( ts.debug(c, 'pager') ) {
|
||||||
console.log( 'Pager: Enabled' );
|
console.log( 'Pager >> Enabled' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1296,8 +1300,7 @@
|
|||||||
|
|
||||||
// see #486
|
// see #486
|
||||||
ts.showError = function( table, xhr, settings, exception ) {
|
ts.showError = function( table, xhr, settings, exception ) {
|
||||||
var $row,
|
var $table = $( table ),
|
||||||
$table = $( table ),
|
|
||||||
c = $table[ 0 ].config,
|
c = $table[ 0 ].config,
|
||||||
wo = c && c.widgetOptions,
|
wo = c && c.widgetOptions,
|
||||||
errorRow = c.pager && c.pager.cssErrorRow ||
|
errorRow = c.pager && c.pager.cssErrorRow ||
|
||||||
@ -1352,9 +1355,10 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// allow message to include entire row HTML!
|
// allow message to include entire row HTML!
|
||||||
$row = ( /tr\>/.test( message ) ?
|
$( /tr\>/.test( message ) ?
|
||||||
$( message ) :
|
message :
|
||||||
$( '<tr><td colspan="' + c.columns + '">' + message + '</td></tr>' ) )
|
'<tr><td colspan="' + c.columns + '">' + message + '</td></tr>'
|
||||||
|
)
|
||||||
.click( function() {
|
.click( function() {
|
||||||
$( this ).remove();
|
$( this ).remove();
|
||||||
})
|
})
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*! Widget: saveSort - updated 10/31/2015 (v2.24.0) *//*
|
/*! Widget: saveSort - updated 2018-03-18 (v2.30.0) *//*
|
||||||
* Requires tablesorter v2.16+
|
* Requires tablesorter v2.16+
|
||||||
* by Rob Garrison
|
* by Rob Garrison
|
||||||
*/
|
*/
|
||||||
@ -6,6 +6,15 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
var ts = $.tablesorter || {};
|
var ts = $.tablesorter || {};
|
||||||
|
|
||||||
|
function getStoredSortList(c) {
|
||||||
|
var stored = ts.storage( c.table, 'tablesorter-savesort' );
|
||||||
|
return (stored && stored.hasOwnProperty('sortList') && $.isArray(stored.sortList)) ? stored.sortList : '';
|
||||||
|
}
|
||||||
|
|
||||||
|
function sortListChanged(c, sortList) {
|
||||||
|
return (sortList || getStoredSortList(c)).join(',') !== c.sortList.join(',');
|
||||||
|
}
|
||||||
|
|
||||||
// this widget saves the last sort only if the
|
// this widget saves the last sort only if the
|
||||||
// saveSort widget option is true AND the
|
// saveSort widget option is true AND the
|
||||||
// $.tablesorter.storage function is included
|
// $.tablesorter.storage function is included
|
||||||
@ -21,18 +30,19 @@
|
|||||||
thisWidget.format(table, c, wo, true);
|
thisWidget.format(table, c, wo, true);
|
||||||
},
|
},
|
||||||
format: function(table, c, wo, init) {
|
format: function(table, c, wo, init) {
|
||||||
var stored, time,
|
var time,
|
||||||
$table = c.$table,
|
$table = c.$table,
|
||||||
saveSort = wo.saveSort !== false, // make saveSort active/inactive; default to true
|
saveSort = wo.saveSort !== false, // make saveSort active/inactive; default to true
|
||||||
sortList = { 'sortList' : c.sortList };
|
sortList = { 'sortList' : c.sortList },
|
||||||
if (c.debug) {
|
debug = ts.debug(c, 'saveSort');
|
||||||
|
if (debug) {
|
||||||
time = new Date();
|
time = new Date();
|
||||||
}
|
}
|
||||||
if ($table.hasClass('hasSaveSort')) {
|
if ($table.hasClass('hasSaveSort')) {
|
||||||
if (saveSort && table.hasInitialized && ts.storage) {
|
if (saveSort && table.hasInitialized && ts.storage && sortListChanged(c)) {
|
||||||
ts.storage( table, 'tablesorter-savesort', sortList );
|
ts.storage( table, 'tablesorter-savesort', sortList );
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('saveSort widget: Saving last sort: ' + c.sortList + ts.benchmark(time));
|
console.log('saveSort >> Saving last sort: ' + c.sortList + ts.benchmark(time));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -41,10 +51,9 @@
|
|||||||
sortList = '';
|
sortList = '';
|
||||||
// get data
|
// get data
|
||||||
if (ts.storage) {
|
if (ts.storage) {
|
||||||
stored = ts.storage( table, 'tablesorter-savesort' );
|
sortList = getStoredSortList(c);
|
||||||
sortList = (stored && stored.hasOwnProperty('sortList') && $.isArray(stored.sortList)) ? stored.sortList : '';
|
if (debug) {
|
||||||
if (c.debug) {
|
console.log('saveSort >> Last sort loaded: "' + sortList + '"' + ts.benchmark(time));
|
||||||
console.log('saveSort: Last sort loaded: "' + sortList + '"' + ts.benchmark(time));
|
|
||||||
}
|
}
|
||||||
$table.bind('saveSortReset', function(event) {
|
$table.bind('saveSortReset', function(event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
@ -57,9 +66,11 @@
|
|||||||
c.sortList = sortList;
|
c.sortList = sortList;
|
||||||
} else if (table.hasInitialized && sortList && sortList.length > 0) {
|
} else if (table.hasInitialized && sortList && sortList.length > 0) {
|
||||||
// update sort change
|
// update sort change
|
||||||
|
if (sortListChanged(c, sortList)) {
|
||||||
ts.sortOn(c, sortList);
|
ts.sortOn(c, sortList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
remove: function(table, c) {
|
remove: function(table, c) {
|
||||||
c.$table.removeClass('hasSaveSort');
|
c.$table.removeClass('hasSaveSort');
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*! Widget: scroller - updated 12/13/2017 (v2.29.1) *//*
|
/*! Widget: scroller - updated 2018-02-25 (v2.29.6) *//*
|
||||||
Copyright (C) 2011 T. Connell & Associates, Inc.
|
Copyright (C) 2011 T. Connell & Associates, Inc.
|
||||||
|
|
||||||
Dual-licensed under the MIT and GPL licenses
|
Dual-licensed under the MIT and GPL licenses
|
||||||
@ -188,7 +188,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
setup : function( c, wo ) {
|
setup : function( c, wo ) {
|
||||||
var tbHt, $hdr, $t, $hCells, $fCells, $tableWrap, events, tmp, detectedWidth,
|
var tbHt, $hdr, $t, $hCells, $tableWrap, events, tmp, detectedWidth,
|
||||||
$win = $( window ),
|
$win = $( window ),
|
||||||
tsScroller = ts.scroller,
|
tsScroller = ts.scroller,
|
||||||
namespace = c.namespace + 'tsscroller',
|
namespace = c.namespace + 'tsscroller',
|
||||||
@ -228,7 +228,6 @@
|
|||||||
// maintain any bindings on the tfoot cells
|
// maintain any bindings on the tfoot cells
|
||||||
.append( $t.clone( true ) )
|
.append( $t.clone( true ) )
|
||||||
.wrap( '<div class="' + tscss.scrollerFooter + '"/>' );
|
.wrap( '<div class="' + tscss.scrollerFooter + '"/>' );
|
||||||
$fCells = $foot.children( 'tfoot' ).eq( 0 ).children( 'tr' ).children();
|
|
||||||
}
|
}
|
||||||
wo.scroller_$footer = $foot;
|
wo.scroller_$footer = $foot;
|
||||||
|
|
||||||
|
@ -237,7 +237,7 @@
|
|||||||
var baseUrl = window.location.href.split(hashChar)[0];
|
var baseUrl = window.location.href.split(hashChar)[0];
|
||||||
// Ensure that there is a leading hash character
|
// Ensure that there is a leading hash character
|
||||||
var firstChar = newHash[0];
|
var firstChar = newHash[0];
|
||||||
if (firstChar != hashChar) {
|
if (firstChar !== hashChar) {
|
||||||
newHash = hashChar + newHash;
|
newHash = hashChar + newHash;
|
||||||
}
|
}
|
||||||
// Update URL in browser
|
// Update URL in browser
|
||||||
|
@ -230,7 +230,7 @@
|
|||||||
init : function( table, thisWidget, c, wo ) {
|
init : function( table, thisWidget, c, wo ) {
|
||||||
ts.sortTbodies.init( c, wo );
|
ts.sortTbodies.init( c, wo );
|
||||||
},
|
},
|
||||||
remove : function( table, c, wo, refreshing ) {
|
remove : function( table, c, wo ) {
|
||||||
c.$table.unbind( 'sortBegin updateComplete '.split( ' ' ).join( c.namespace + 'sortTbody ' ) );
|
c.$table.unbind( 'sortBegin updateComplete '.split( ' ' ).join( c.namespace + 'sortTbody ' ) );
|
||||||
c.serverSideSorting = wo.sortTbody_original_serverSideSorting;
|
c.serverSideSorting = wo.sortTbody_original_serverSideSorting;
|
||||||
c.cssInfoBlock = wo.sortTbody_original_cssInfoBlock;
|
c.cssInfoBlock = wo.sortTbody_original_cssInfoBlock;
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*! Widget: storage - updated 4/18/2017 (v2.28.8) */
|
/*! Widget: storage - updated 2018-03-18 (v2.30.0) */
|
||||||
/*global JSON:false */
|
/*global JSON:false */
|
||||||
;(function ($, window, document) {
|
;(function ($, window, document) {
|
||||||
'use strict';
|
'use strict';
|
||||||
@ -44,6 +44,7 @@
|
|||||||
values = {},
|
values = {},
|
||||||
c = table.config,
|
c = table.config,
|
||||||
wo = c && c.widgetOptions,
|
wo = c && c.widgetOptions,
|
||||||
|
debug = ts.debug(c, 'storage'),
|
||||||
storageType = (
|
storageType = (
|
||||||
( options && options.storageType ) || ( wo && wo.storage_storageType )
|
( options && options.storageType ) || ( wo && wo.storage_storageType )
|
||||||
).toString().charAt(0).toLowerCase(),
|
).toString().charAt(0).toLowerCase(),
|
||||||
@ -72,14 +73,12 @@
|
|||||||
hasStorage = true;
|
hasStorage = true;
|
||||||
window[storageType].removeItem('_tmptest');
|
window[storageType].removeItem('_tmptest');
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (c && c.debug) {
|
|
||||||
console.warn( storageType + ' is not supported in this browser' );
|
console.warn( storageType + ' is not supported in this browser' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if (debug) {
|
||||||
if (c.debug) {
|
console.log('Storage >> Using', hasStorage ? storageType : 'cookies');
|
||||||
console.log('Storage widget using', hasStorage ? storageType : 'cookies');
|
|
||||||
}
|
}
|
||||||
// *** get value ***
|
// *** get value ***
|
||||||
if ($.parseJSON) {
|
if ($.parseJSON) {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
|
/*! Widget: uitheme - updated 2018-03-18 (v2.30.0) */
|
||||||
;(function ($) {
|
;(function ($) {
|
||||||
'use strict';
|
'use strict';
|
||||||
var ts = $.tablesorter || {};
|
var ts = $.tablesorter || {};
|
||||||
@ -63,8 +63,9 @@
|
|||||||
theme = c.theme || 'jui',
|
theme = c.theme || 'jui',
|
||||||
themes = themesAll[theme] || {},
|
themes = themesAll[theme] || {},
|
||||||
remove = $.trim( [ themes.sortNone, themes.sortDesc, themes.sortAsc, themes.active ].join( ' ' ) ),
|
remove = $.trim( [ themes.sortNone, themes.sortDesc, themes.sortAsc, themes.active ].join( ' ' ) ),
|
||||||
iconRmv = $.trim( [ themes.iconSortNone, themes.iconSortDesc, themes.iconSortAsc ].join( ' ' ) );
|
iconRmv = $.trim( [ themes.iconSortNone, themes.iconSortDesc, themes.iconSortAsc ].join( ' ' ) ),
|
||||||
if (c.debug) { time = new Date(); }
|
debug = ts.debug(c, 'uitheme');
|
||||||
|
if (debug) { time = new Date(); }
|
||||||
// initialization code - run once
|
// initialization code - run once
|
||||||
if (!$table.hasClass('tablesorter-' + theme) || c.theme !== c.appliedTheme || !wo.uitheme_applied) {
|
if (!$table.hasClass('tablesorter-' + theme) || c.theme !== c.appliedTheme || !wo.uitheme_applied) {
|
||||||
wo.uitheme_applied = true;
|
wo.uitheme_applied = true;
|
||||||
@ -167,8 +168,8 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (c.debug) {
|
if (debug) {
|
||||||
console.log('Applying ' + theme + ' theme' + ts.benchmark(time));
|
console.log('uitheme >> Applied ' + theme + ' theme' + ts.benchmark(time));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove: function(table, c, wo, refreshing) {
|
remove: function(table, c, wo, refreshing) {
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
.addClass( wo.zebra[ indx % 2] );
|
.addClass( wo.zebra[ indx % 2] );
|
||||||
}
|
}
|
||||||
|
|
||||||
function verticalGroup( table, c, wo, init ) {
|
function verticalGroup( table, c, wo ) {
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// loop thru the header row,
|
// loop thru the header row,
|
||||||
// - look for .vertical-group
|
// - look for .vertical-group
|
||||||
@ -69,10 +69,8 @@
|
|||||||
// - the border-color needs to be the same
|
// - the border-color needs to be the same
|
||||||
//
|
//
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
var tmp,
|
var zebra_index = -1, // increments at start of loop
|
||||||
zebra_index = -1, // increments at start of loop
|
|
||||||
rows = table.tBodies[0].rows,
|
rows = table.tBodies[0].rows,
|
||||||
header = table.tHead.rows,
|
|
||||||
has_zebra = ts.hasWidget( table, 'zebra'),
|
has_zebra = ts.hasWidget( table, 'zebra'),
|
||||||
is_vertical_group_col = [],
|
is_vertical_group_col = [],
|
||||||
last_row = [];
|
last_row = [];
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
$.each(wo.view_layouts, function(k, v) {
|
$.each(wo.view_layouts, function(k, v) {
|
||||||
var classes = wo.view_switcher_class;
|
var classes = wo.view_switcher_class;
|
||||||
if (k == wo.view_layout) {
|
if (k === wo.view_layout) {
|
||||||
classes += ' active';
|
classes += ' active';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -108,7 +108,7 @@
|
|||||||
|
|
||||||
var $tmpl = $(tmpl);
|
var $tmpl = $(tmpl);
|
||||||
$.each(data.$row[0].attributes, function(idx, attr) {
|
$.each(data.$row[0].attributes, function(idx, attr) {
|
||||||
if (attr.nodeName == 'class') {
|
if (attr.nodeName === 'class') {
|
||||||
$tmpl.attr(attr.nodeName, $tmpl.attr(attr.nodeName) + ' ' + attr.nodeValue);
|
$tmpl.attr(attr.nodeName, $tmpl.attr(attr.nodeName) + ' ' + attr.nodeValue);
|
||||||
} else {
|
} else {
|
||||||
$tmpl.attr(attr.nodeName, attr.nodeValue);
|
$tmpl.attr(attr.nodeName, attr.nodeValue);
|
||||||
@ -125,7 +125,7 @@
|
|||||||
$(wo.view_container).empty();
|
$(wo.view_container).empty();
|
||||||
},
|
},
|
||||||
|
|
||||||
hideTable: function(c, wo) {
|
hideTable: function(c) {
|
||||||
tpos = c.$table.css('position');
|
tpos = c.$table.css('position');
|
||||||
ttop = c.$table.css('bottom');
|
ttop = c.$table.css('bottom');
|
||||||
tleft = c.$table.css('left');
|
tleft = c.$table.css('left');
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "tablesorter",
|
"name": "tablesorter",
|
||||||
"title": "tablesorter",
|
"title": "tablesorter",
|
||||||
"version": "2.29.6",
|
"version": "2.30.0",
|
||||||
"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",
|
||||||
@ -39,7 +39,8 @@
|
|||||||
"url": "git://github.com/Mottie/tablesorter.git"
|
"url": "git://github.com/Mottie/tablesorter.git"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"authors": "bash testing/authors.sh"
|
"authors": "bash testing/authors.sh",
|
||||||
|
"eslint": "eslint --color Gruntfile.js js/jquery.tablesorter.js js/parsers/* js/widgets/*"
|
||||||
},
|
},
|
||||||
"npmName": "tablesorter",
|
"npmName": "tablesorter",
|
||||||
"npmFileMap": [
|
"npmFileMap": [
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "tablesorter",
|
"name": "tablesorter",
|
||||||
"title": "tablesorter",
|
"title": "tablesorter",
|
||||||
"version": "2.29.6",
|
"version": "2.30.0",
|
||||||
"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