Merge branch 'master' into gh-pages

This commit is contained in:
Rob Garrison 2017-04-18 19:50:56 -05:00
commit c9f64f9707
46 changed files with 1474 additions and 658 deletions

View File

@ -104,6 +104,28 @@ If you would like to contribute, please...
View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes).
#### <a name="v2.28.8">Version 2.28.8</a> (4/18/2017)
* Docs:
* Update version tags.
* Core:
* Fixed `updateCell` to work correctly with child rows. Thanks [@andysleigh](https://github.com/andysleigh); see [PR #1381](https://github.com/Mottie/tablesorter/pull/1381).
* Filter:
* Add `equalFilters` function; for more reliable comparisons.
* Pager:
* use `equalFilters` function for comparison. See [issue #1384](https://github.com/Mottie/tablesorter/issues/1384).
* Resizable:
* Add `resizable_includeFooter` option. Fixes [issue #1386](https://github.com/Mottie/tablesorter/issues/1386).
* Scroller:
* Set max-width to initial. See [issue #1382](https://github.com/Mottie/tablesorter/issues/1382).
* Fix offset from hidden row. See [issue #1376](https://github.com/Mottie/tablesorter/issues/1376).
* Fix linting issue.
* Storage:
* Add options early to prevent validator message.
* Add `storage_storageType` option & deprecate `storage_useSessionStorage`.
* Meta:
* Update dependencies x2.
#### <a name="v2.28.7">Version 2.28.7</a> (4/4/2017)
* Editable:
@ -154,15 +176,3 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C
* Fix indentation & remove extra spaces.
* Remove cdnjs auto-update config - see [CDNJS #9080](https://github.com/cdnjs/cdnjs/pull/9080).
* Update SPDX license.
#### <a name="v2.28.5">Version 2.28.5</a> (1/28/2017)
* Docs: Fix "update" labels.
* Output:
* Prevent multiple popups/download with dblClick (i.e. triggering "outputTable" multiple times).
* Remove extraneous console log.
* Resizable:
* Add "resizableUpdate" & "resizableReset" methods.
* Scroller:
* Add `scrollerComplete` event. Fixes [issue #1351](https://github.com/Mottie/tablesorter/issues/1351).
* Readme: Add related project, tablesorter-pagercontrols

View File

@ -1,6 +1,6 @@
/*!
* tablesorter (FORK) pager plugin
* updated 4/2/2017 (v2.28.6)
* updated 4/18/2017 (v2.28.8)
*/
/*jshint browser:true, jquery:true, unused:false */
;(function($) {
@ -968,11 +968,15 @@
.unbind( pagerEvents.split(' ').join(namespace + ' ').replace(/\s+/g, ' ') )
.bind('filterInit filterStart '.split(' ').join(namespace + ' '), function(e, filters) {
p.currentFilters = $.isArray(filters) ? filters : c.$table.data('lastSearch');
var filtersEqual;
if (ts.filter.equalFilters) {
filtersEqual = ts.filter.equalFilters(c, c.lastSearch, p.currentFilters);
} else {
// will miss filter changes of the same value in a different column, see #1363
filtersEqual = (c.lastSearch || []).join('') !== (p.currentFilters || []).join('');
}
// don't change page if filters are the same (pager updating, etc)
if (
e.type === 'filterStart' &&
p.pageReset !== false &&
(c.lastSearch || []).join(',') !== (p.currentFilters || []).join(',')) {
if (e.type === 'filterStart' && p.pageReset !== false && !filtersEqual) {
p.page = p.pageReset; // fixes #456 & #565
}
})

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 04-04-2017 (v2.28.7)*/
/*! tablesorter (FORK) - updated 04-18-2017 (v2.28.8)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -10,7 +10,7 @@
}
}(function(jQuery) {
/*! TableSorter (FORK) v2.28.7 *//*
/*! TableSorter (FORK) v2.28.8 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -34,7 +34,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.28.7',
version : '2.28.8',
parsers : [],
widgets : [],
@ -1319,7 +1319,7 @@
cell = $cell[ 0 ]; // in case cell is a jQuery object
// tbody may not exist if update is initialized while tbody is removed for processing
if ( $tbodies.length && tbodyIndex >= 0 ) {
row = $tbodies.eq( tbodyIndex ).find( 'tr' ).index( $row );
row = $tbodies.eq( tbodyIndex ).find( 'tr' ).not( '.' + c.cssChildRow ).index( $row );
cache = tbcache.normalized[ row ];
len = $row[ 0 ].cells.length;
if ( len !== c.columns ) {
@ -1340,7 +1340,6 @@
cache[ c.columns ].raw[ icell ] = tmp;
tmp = ts.getParsedText( c, cell, icell, tmp );
cache[ icell ] = tmp; // parsed
cache[ c.columns ].$row = $row;
if ( ( c.parsers[ icell ].type || '' ).toLowerCase() === 'numeric' ) {
// update column max value (ignore sign)
tbcache.colMax[ icell ] = Math.max( Math.abs( tmp ) || 0, tbcache.colMax[ icell ] || 0 );
@ -2821,12 +2820,26 @@
})( jQuery );
/*! Widget: storage - updated 11/26/2016 (v2.28.0) */
/*! Widget: storage - updated 4/18/2017 (v2.28.8) */
/*global JSON:false */
;(function ($, window, document) {
'use strict';
var ts = $.tablesorter || {};
// update defaults for validator; these values must be falsy!
$.extend(true, ts.defaults, {
fixedUrl: '',
widgetOptions: {
storage_fixedUrl: '',
storage_group: '',
storage_page: '',
storage_storageType: '',
storage_tableId: '',
storage_useSessionStorage: ''
}
});
// *** Store data in local storage, with a cookie fallback ***
/* IE7 needs JSON library for JSON.stringify - (http://caniuse.com/#search=json)
if you need it, then include https://github.com/douglascrockford/JSON-js
@ -2853,8 +2866,12 @@
values = {},
c = table.config,
wo = c && c.widgetOptions,
storageType = ( options && options.useSessionStorage ) || ( wo && wo.storage_useSessionStorage ) ?
'sessionStorage' : 'localStorage',
storageType = (
( options && options.storageType ) || ( wo && wo.storage_storageType )
).toString().charAt(0).toLowerCase(),
// deprecating "useSessionStorage"; any storageType setting overrides it
session = storageType ? '' :
( options && options.useSessionStorage ) || ( wo && wo.storage_useSessionStorage ),
$table = $(table),
// id from (1) options ID, (2) table 'data-table-group' attribute, (3) widgetOptions.storage_tableId,
// (4) table ID, then (5) table index
@ -2866,17 +2883,10 @@
url = options && options.url ||
$table.attr(options && options.page || wo && wo.storage_page || 'data-table-page') ||
wo && wo.storage_fixedUrl || c && c.fixedUrl || window.location.pathname;
// update defaults for validator; these values must be falsy!
$.extend(true, ts.defaults, {
fixedUrl: '',
widgetOptions: {
storage_fixedUrl: '',
storage_group: '',
storage_page: '',
storage_tableId: '',
storage_useSessionStorage: ''
}
});
// skip if using cookies
if (storageType !== 'c') {
storageType = (storageType === 's' || session) ? 'sessionStorage' : 'localStorage';
// https://gist.github.com/paulirish/5558557
if (storageType in window) {
try {
@ -2889,6 +2899,10 @@
}
}
}
}
if (c.debug) {
console.log('Storage widget using', hasStorage ? storageType : 'cookies');
}
// *** get value ***
if ($.parseJSON) {
if (hasStorage) {
@ -3198,7 +3212,7 @@
})(jQuery);
/*! Widget: filter - updated 4/4/2017 (v2.28.7) *//*
/*! Widget: filter - updated 4/18/2017 (v2.28.8) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -4085,6 +4099,19 @@
tsf.checkFilters( table, filter, skipFirst );
}
},
equalFilters: function (c, filter1, filter2) {
var indx,
f1 = [],
f2 = [],
len = c.columns + 1; // add one to include anyMatch filter
filter1 = $.isArray(filter1) ? filter1 : [];
filter2 = $.isArray(filter2) ? filter2 : [];
for (indx = 0; indx < len; indx++) {
f1[indx] = filter1[indx] || '';
f2[indx] = filter2[indx] || '';
}
return f1.join(',') === f2.join(',');
},
checkFilters: function( table, filter, skipFirst ) {
var c = table.config,
wo = c.widgetOptions,
@ -4117,7 +4144,7 @@
}
// return if the last search is the same; but filter === false when updating the search
// see example-widget-filter.html filter toggle buttons
if ( c.lastSearch.join(',') === currentFilters.join(',') && filter !== false ) {
if ( tsf.equalFilters(c, c.lastSearch, currentFilters) && filter !== false ) {
return;
} else if ( filter === false ) {
// force filter refresh
@ -4466,7 +4493,7 @@
},
findRows: function( table, filters, currentFilters ) {
if (
table.config.lastSearch.join(',') === ( currentFilters || [] ).join(',') ||
tsf.equalFilters(table.config, table.config.lastSearch, currentFilters) ||
!table.config.widgetOptions.filter_initialized
) {
return;
@ -5011,7 +5038,8 @@
if ( ( getRaw !== true && wo && !wo.filter_columnFilters ) ||
// setFilters called, but last search is exactly the same as the current
// fixes issue #733 & #903 where calling update causes the input values to reset
( $.isArray(setFilters) && setFilters.join(',') === c.lastSearch.join(',') ) ) {
( $.isArray(setFilters) && tsf.equalFilters(c, setFilters, c.lastSearch) )
) {
return $( table ).data( 'lastSearch' ) || [];
}
if ( c ) {
@ -5396,7 +5424,7 @@
})(jQuery, window);
/*! Widget: resizable - updated 1/28/2017 (v2.28.5) */
/*! Widget: resizable - updated 4/18/2017 (v2.28.8) */
/*jshint browser:true, jquery:true, unused:false */
;(function ($, window) {
'use strict';
@ -5561,6 +5589,10 @@
tableHeight += $this.filter('[style*="height"]').length ? $this.height() : $this.children('table').height();
});
}
if ( !wo.resizable_includeFooter && c.$table.children('tfoot').length ) {
tableHeight -= c.$table.children('tfoot').height();
}
// subtract out table left position from resizable handles. Fixes #864
startPosition = c.$table.position().left;
$handles.each( function() {
@ -5731,10 +5763,10 @@
options: {
resizable : true, // save column widths to storage
resizable_addLastColumn : false,
resizable_includeFooter: true,
resizable_widths : [],
resizable_throttle : false, // set to true (5ms) or any number 0-10 range
resizable_targetLast : false,
resizable_fullWidth : null
resizable_targetLast : false
},
init: function(table, thisWidget, c, wo) {
ts.resizable.init( c, wo );

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
}
}(function(jQuery) {
/*! TableSorter (FORK) v2.28.7 *//*
/*! TableSorter (FORK) v2.28.8 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -32,7 +32,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.28.7',
version : '2.28.8',
parsers : [],
widgets : [],
@ -1317,7 +1317,7 @@
cell = $cell[ 0 ]; // in case cell is a jQuery object
// tbody may not exist if update is initialized while tbody is removed for processing
if ( $tbodies.length && tbodyIndex >= 0 ) {
row = $tbodies.eq( tbodyIndex ).find( 'tr' ).index( $row );
row = $tbodies.eq( tbodyIndex ).find( 'tr' ).not( '.' + c.cssChildRow ).index( $row );
cache = tbcache.normalized[ row ];
len = $row[ 0 ].cells.length;
if ( len !== c.columns ) {
@ -1338,7 +1338,6 @@
cache[ c.columns ].raw[ icell ] = tmp;
tmp = ts.getParsedText( c, cell, icell, tmp );
cache[ icell ] = tmp; // parsed
cache[ c.columns ].$row = $row;
if ( ( c.parsers[ icell ].type || '' ).toLowerCase() === 'numeric' ) {
// update column max value (ignore sign)
tbcache.colMax[ icell ] = Math.max( Math.abs( tmp ) || 0, tbcache.colMax[ icell ] || 0 );

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 04-04-2017 (v2.28.7)*/
/*! tablesorter (FORK) - updated 04-18-2017 (v2.28.8)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -10,12 +10,26 @@
}
}(function(jQuery) {
/*! Widget: storage - updated 11/26/2016 (v2.28.0) */
/*! Widget: storage - updated 4/18/2017 (v2.28.8) */
/*global JSON:false */
;(function ($, window, document) {
'use strict';
var ts = $.tablesorter || {};
// update defaults for validator; these values must be falsy!
$.extend(true, ts.defaults, {
fixedUrl: '',
widgetOptions: {
storage_fixedUrl: '',
storage_group: '',
storage_page: '',
storage_storageType: '',
storage_tableId: '',
storage_useSessionStorage: ''
}
});
// *** Store data in local storage, with a cookie fallback ***
/* IE7 needs JSON library for JSON.stringify - (http://caniuse.com/#search=json)
if you need it, then include https://github.com/douglascrockford/JSON-js
@ -42,8 +56,12 @@
values = {},
c = table.config,
wo = c && c.widgetOptions,
storageType = ( options && options.useSessionStorage ) || ( wo && wo.storage_useSessionStorage ) ?
'sessionStorage' : 'localStorage',
storageType = (
( options && options.storageType ) || ( wo && wo.storage_storageType )
).toString().charAt(0).toLowerCase(),
// deprecating "useSessionStorage"; any storageType setting overrides it
session = storageType ? '' :
( options && options.useSessionStorage ) || ( wo && wo.storage_useSessionStorage ),
$table = $(table),
// id from (1) options ID, (2) table 'data-table-group' attribute, (3) widgetOptions.storage_tableId,
// (4) table ID, then (5) table index
@ -55,17 +73,10 @@
url = options && options.url ||
$table.attr(options && options.page || wo && wo.storage_page || 'data-table-page') ||
wo && wo.storage_fixedUrl || c && c.fixedUrl || window.location.pathname;
// update defaults for validator; these values must be falsy!
$.extend(true, ts.defaults, {
fixedUrl: '',
widgetOptions: {
storage_fixedUrl: '',
storage_group: '',
storage_page: '',
storage_tableId: '',
storage_useSessionStorage: ''
}
});
// skip if using cookies
if (storageType !== 'c') {
storageType = (storageType === 's' || session) ? 'sessionStorage' : 'localStorage';
// https://gist.github.com/paulirish/5558557
if (storageType in window) {
try {
@ -78,6 +89,10 @@
}
}
}
}
if (c.debug) {
console.log('Storage widget using', hasStorage ? storageType : 'cookies');
}
// *** get value ***
if ($.parseJSON) {
if (hasStorage) {
@ -387,7 +402,7 @@
})(jQuery);
/*! Widget: filter - updated 4/4/2017 (v2.28.7) *//*
/*! Widget: filter - updated 4/18/2017 (v2.28.8) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -1274,6 +1289,19 @@
tsf.checkFilters( table, filter, skipFirst );
}
},
equalFilters: function (c, filter1, filter2) {
var indx,
f1 = [],
f2 = [],
len = c.columns + 1; // add one to include anyMatch filter
filter1 = $.isArray(filter1) ? filter1 : [];
filter2 = $.isArray(filter2) ? filter2 : [];
for (indx = 0; indx < len; indx++) {
f1[indx] = filter1[indx] || '';
f2[indx] = filter2[indx] || '';
}
return f1.join(',') === f2.join(',');
},
checkFilters: function( table, filter, skipFirst ) {
var c = table.config,
wo = c.widgetOptions,
@ -1306,7 +1334,7 @@
}
// return if the last search is the same; but filter === false when updating the search
// see example-widget-filter.html filter toggle buttons
if ( c.lastSearch.join(',') === currentFilters.join(',') && filter !== false ) {
if ( tsf.equalFilters(c, c.lastSearch, currentFilters) && filter !== false ) {
return;
} else if ( filter === false ) {
// force filter refresh
@ -1655,7 +1683,7 @@
},
findRows: function( table, filters, currentFilters ) {
if (
table.config.lastSearch.join(',') === ( currentFilters || [] ).join(',') ||
tsf.equalFilters(table.config, table.config.lastSearch, currentFilters) ||
!table.config.widgetOptions.filter_initialized
) {
return;
@ -2200,7 +2228,8 @@
if ( ( getRaw !== true && wo && !wo.filter_columnFilters ) ||
// setFilters called, but last search is exactly the same as the current
// fixes issue #733 & #903 where calling update causes the input values to reset
( $.isArray(setFilters) && setFilters.join(',') === c.lastSearch.join(',') ) ) {
( $.isArray(setFilters) && tsf.equalFilters(c, setFilters, c.lastSearch) )
) {
return $( table ).data( 'lastSearch' ) || [];
}
if ( c ) {
@ -2585,7 +2614,7 @@
})(jQuery, window);
/*! Widget: resizable - updated 1/28/2017 (v2.28.5) */
/*! Widget: resizable - updated 4/18/2017 (v2.28.8) */
/*jshint browser:true, jquery:true, unused:false */
;(function ($, window) {
'use strict';
@ -2750,6 +2779,10 @@
tableHeight += $this.filter('[style*="height"]').length ? $this.height() : $this.children('table').height();
});
}
if ( !wo.resizable_includeFooter && c.$table.children('tfoot').length ) {
tableHeight -= c.$table.children('tfoot').height();
}
// subtract out table left position from resizable handles. Fixes #864
startPosition = c.$table.position().left;
$handles.each( function() {
@ -2920,10 +2953,10 @@
options: {
resizable : true, // save column widths to storage
resizable_addLastColumn : false,
resizable_includeFooter: true,
resizable_widths : [],
resizable_throttle : false, // set to true (5ms) or any number 0-10 range
resizable_targetLast : false,
resizable_fullWidth : null
resizable_targetLast : false
},
init: function(table, thisWidget, c, wo) {
ts.resizable.init( c, wo );

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! Parser: input & select - updated 11/26/2016 (v2.28.0) */
!function(a){"use strict";a.tablesorter.addParser({id:"inputs",is:function(){return!1},format:function(b,c,d){var e=a(d).find("input");return e.length?e.val():b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"inputs-numeric",is:function(){return!1},format:function(b,c,d){var e=a(d).find("input"),f=e.length?e.val():b,g=a.tablesorter.formatFloat((f||"").replace(/[^\w,. \-()]/g,""),c);return b&&"number"==typeof g?g:b?a.trim(b&&c.config.ignoreCase?b.toLocaleLowerCase():b):b},parsed:!0,type:"numeric"}),a.tablesorter.addParser({id:"checkbox",is:function(){return!1},format:function(b,c,d){var e=a(d),f=c.config.widgetOptions,g=f.group_checkbox?f.group_checkbox:["checked","unchecked"],h=e.find('input[type="checkbox"]'),i=h.length?h[0].checked:"";return h.length?g[i?0:1]:b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"select",is:function(){return!1},format:function(b,c,d){var e=a(d).find("select");return e.length?e.val():b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"select-text",is:function(){return!1},format:function(b,c,d){var e=a(d).find("select");return e.length?e.find("option:selected").text()||"":b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"textarea",is:function(){return!1},format:function(b,c,d){var e=a(d).find("textarea");return e.length?e.val():b},parsed:!0,type:"text"}),a.tablesorter.defaults.checkboxClass="",a.tablesorter.defaults.checkboxVisible="",a(function(){if(a.fn.on){var b=function(a,b,c,d){a.toggleClass(b+"-"+c,d),(a[0].className||"").match(b+"-")?a.addClass(b):a.removeClass(b)},c=function(b,c){var d=window.navigator.userAgent,e=b.children("tbody").children(":visible"),f=e.length;b.children("thead").find('input[type="checkbox"]').each(function(){var b=a(this).closest("td, th").attr("data-column"),g=e.filter("."+c+"-"+b).length,h=g===f&&f>0;0===g||h?(this.checked=h,this.indeterminate=!1):(this.checked=!(d.indexOf("Trident/")>-1||d.indexOf("Edge/")>-1),this.indeterminate=!0)})};a("table").on("tablesorter-initialized updateComplete",function(){this.tablesorterBusy=!1;var d=".parser-forms";a(this).children("tbody").off(d).on("mouseleave"+d,function(b){"TBODY"===b.target.nodeName&&a(":focus").blur()}).on("focus"+d,"select, input:not([type=checkbox]), textarea",function(){a(this).data("ts-original-value",this.value)}).on("blur"+d,"input:not([type=checkbox]), textarea",function(){this.value=a(this).data("ts-original-value")}).on("change keyup ".split(" ").join(d+" "),"select, input, textarea",function(d){if(27===d.which&&("INPUT"!==this.nodeName||"checkbox"!==this.type))return void(this.value=a(this).data("ts-original-value"));if("change"===d.type||"keyup"===d.type&&13===d.which&&("INPUT"===d.target.nodeName||"TEXTAREA"===d.target.nodeName&&d.altKey)){var e,f=a(d.target),g="checkbox"===d.target.type,h=f.closest("td"),i=h.closest("table"),j=h[0].cellIndex,k=i[0].config||!1,l=i.length&&i[0].tablesorterBusy,m=k&&k.$headerIndexed&&k.$headerIndexed[j]||[],n=g?d.target.checked:f.val();if(a.isEmptyObject(k)||l!==!1)return;if(g&&(e=k.checkboxClass||"checked",b(h.closest("tr"),e,j,n),c(i,e)),m.length&&(m.hasClass("parser-false")||m.hasClass("sorter-false")&&m.hasClass("filter-false"))||"change"===d.type&&k.table.isUpdating)return;(k&&n!==f.data("ts-original-value")||g)&&(f.data("ts-original-value",n),i[0].tablesorterBusy=!0,a.tablesorter.updateCell(k,h,void 0,function(){i[0].tablesorterBusy=!1}))}}),a(this).children("thead").find('input[type="checkbox"]')&&a(this).off(d).on("tablesorter-ready"+d,function(){var b,d=a(this),e=d.length&&d[0].config;a.isEmptyObject(e)||(this.tablesorterBusy=!0,b=e&&e.checkboxClass||"checked",c(d,b),this.tablesorterBusy=!1)}).children("thead").off(d).on("click.parser-forms change"+d,'input[type="checkbox"]',function(d){var e,f,g,h,i,j=a(this),k=j.closest("table"),l=k.length&&k[0].config,m=this.checked;return!(!k.length||!l||k[0].tablesorterBusy)&&(f=parseInt(j.closest("td, th").attr("data-column"),10),h="checkbox"===l.parsers[f].id,e=k.length&&l.checkboxVisible,k[0].tablesorterBusy=!0,g=k.children("tbody").children("tr"+(void 0===e||e===!0?":visible":"")).children(":nth-child("+(f+1)+")").find('input[type="checkbox"]').prop("checked",m),i=l.checkboxClass||"checked",g.each(function(){b(a(this).closest("tr"),i,f,m)}),c(k,i),h?a.tablesorter.update(l,void 0,function(){k[0].tablesorterBusy=!1}):k[0].tablesorterBusy=!1,!0)})})}})}(jQuery);
!function(a){"use strict";a.tablesorter.addParser({id:"inputs",is:function(){return!1},format:function(b,c,d){var e=a(d).find("input");return e.length?e.val():b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"inputs-numeric",is:function(){return!1},format:function(b,c,d){var e=a(d).find("input"),f=e.length?e.val():b,g=a.tablesorter.formatFloat((f||"").replace(/[^\w,. \-()]/g,""),c);return b&&"number"==typeof g?g:b?a.trim(b&&c.config.ignoreCase?b.toLocaleLowerCase():b):b},parsed:!0,type:"numeric"}),a.tablesorter.addParser({id:"checkbox",is:function(){return!1},format:function(b,c,d){var e=a(d),f=c.config.widgetOptions,g=f.group_checkbox?f.group_checkbox:["checked","unchecked"],h=e.find('input[type="checkbox"]'),i=h.length?h[0].checked:"";return h.length?g[i?0:1]:b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"select",is:function(){return!1},format:function(b,c,d){var e=a(d).find("select");return e.length?e.val():b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"select-text",is:function(){return!1},format:function(b,c,d){var e=a(d).find("select");return e.length?e.find("option:selected").text()||"":b},parsed:!0,type:"text"}),a.tablesorter.addParser({id:"textarea",is:function(){return!1},format:function(b,c,d){var e=a(d).find("textarea");return e.length?e.val():b},parsed:!0,type:"text"}),a.tablesorter.defaults.checkboxClass="",a.tablesorter.defaults.checkboxVisible="",a(function(){if(a.fn.on){var b=function(a,b,c,d){a.toggleClass(b+"-"+c,d),(a[0].className||"").match(b+"-")?a.addClass(b):a.removeClass(b)},c=function(b,c){var d=window.navigator.userAgent,e=b.children("tbody").children(":visible"),f=e.length;b.children("thead").find('input[type="checkbox"]').each(function(){var b=a(this).closest("td, th").attr("data-column"),g=e.filter("."+c+"-"+b).length,h=g===f&&f>0;0===g||h?(this.checked=h,this.indeterminate=!1):(this.checked=!(d.indexOf("Trident/")>-1||d.indexOf("Edge/")>-1),this.indeterminate=!0)})};a("table").on("tablesorter-initialized updateComplete",function(){this.tablesorterBusy=!1;var d=".parser-forms";a(this).children("tbody").off(d).on("mouseleave"+d,function(b){"TBODY"===b.target.nodeName&&a(":focus").blur()}).on("focus"+d,"select, input:not([type=checkbox]), textarea",function(){a(this).data("ts-original-value",this.value)}).on("blur"+d,"input:not([type=checkbox]), textarea",function(){this.value=a(this).data("ts-original-value")}).on("change keyup ".split(" ").join(d+" "),"select, input, textarea",function(d){if(27===d.which&&("INPUT"!==this.nodeName||"checkbox"!==this.type))return void(this.value=a(this).data("ts-original-value"));if("change"===d.type||"keyup"===d.type&&13===d.which&&("INPUT"===d.target.nodeName||"TEXTAREA"===d.target.nodeName&&d.altKey)){var e,f=a(d.target),g="checkbox"===d.target.type,h=f.closest("td"),i=h.closest("table"),j=h[0].cellIndex,k=i[0].config||!1,l=i.length&&i[0].tablesorterBusy,m=k&&k.$headerIndexed&&k.$headerIndexed[j]||[],n=g?d.target.checked:f.val();if(a.isEmptyObject(k)||!1!==l)return;if(g&&(e=k.checkboxClass||"checked",b(h.closest("tr"),e,j,n),c(i,e)),m.length&&(m.hasClass("parser-false")||m.hasClass("sorter-false")&&m.hasClass("filter-false"))||"change"===d.type&&k.table.isUpdating)return;(k&&n!==f.data("ts-original-value")||g)&&(f.data("ts-original-value",n),i[0].tablesorterBusy=!0,a.tablesorter.updateCell(k,h,void 0,function(){i[0].tablesorterBusy=!1}))}}),a(this).children("thead").find('input[type="checkbox"]')&&a(this).off(d).on("tablesorter-ready"+d,function(){var b,d=a(this),e=d.length&&d[0].config;a.isEmptyObject(e)||(this.tablesorterBusy=!0,b=e&&e.checkboxClass||"checked",c(d,b),this.tablesorterBusy=!1)}).children("thead").off(d).on("click.parser-forms change"+d,'input[type="checkbox"]',function(d){var e,f,g,h,i,j=a(this),k=j.closest("table"),l=k.length&&k[0].config,m=this.checked;return!(!k.length||!l||k[0].tablesorterBusy)&&(f=parseInt(j.closest("td, th").attr("data-column"),10),h="checkbox"===l.parsers[f].id,e=k.length&&l.checkboxVisible,k[0].tablesorterBusy=!0,g=k.children("tbody").children("tr"+(void 0===e||!0===e?":visible":"")).children(":nth-child("+(f+1)+")").find('input[type="checkbox"]').prop("checked",m),i=l.checkboxClass||"checked",g.each(function(){b(a(this).closest("tr"),i,f,m)}),c(k,i),h?a.tablesorter.update(l,void 0,function(){k[0].tablesorterBusy=!1}):k[0].tablesorterBusy=!1,!0)})})}})}(jQuery);

View File

@ -1,5 +1,5 @@
/*! Parser: network - updated 5/17/2015 (v2.22.0) */
!function(a){"use strict";var b,c,d=a.tablesorter;/*! IPv6 Address parser (WIP) */
a.extend(d.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}),d.addParser({id:"ipv6Address",is:function(a){return d.regex.ipv6Validate.test(a)},format:function(a,b){var c,e,f,g,h,i=!!b&&("boolean"==typeof b?b:b&&b.config.ipv6HexFormat||!1),j="",k="";if(a=a.replace(/\s*/g,""),d.regex.ipv4Validate.test(a)){for(g=a.match(d.regex.ipv4Extract),e="",c=1;c<g.length;c++)e+=("00"+parseInt(g[c],10).toString(16)).slice(-2)+(2===c?":":"");a=a.replace(d.regex.ipv4Extract,e)}if(a.indexOf("::")==-1)j=a;else{for(f=a.split("::"),h=0,c=0;c<f.length;c++)h+=f[c].split(":").length;for(j+=f[0]+":",c=0;c<8-h;c++)j+="0000:";j+=f[1]}for(g=j.split(":"),c=0;c<8;c++)g[c]=i?("0000"+g[c]).slice(-4):("00000"+(parseInt(g[c],16)||0)).slice(-5),k+=7!=c?g[c]+":":g[c];return i?k:k.replace(/:/g,"")},type:"numeric"}),c=function(a){return/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(a)},b=function(a,b){var c,e=a?a.split("."):"",f="",g=e.length;for(c=0;c<g;c++)f+=("000"+e[c]).slice(-3);return a?d.formatFloat(f,b):a},/*! Parser: ipv4Address (a.k.a. ipAddress) */
a.extend(d.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}),d.addParser({id:"ipv6Address",is:function(a){return d.regex.ipv6Validate.test(a)},format:function(a,b){var c,e,f,g,h,i=!!b&&("boolean"==typeof b?b:b&&b.config.ipv6HexFormat||!1),j="",k="";if(a=a.replace(/\s*/g,""),d.regex.ipv4Validate.test(a)){for(g=a.match(d.regex.ipv4Extract),e="",c=1;c<g.length;c++)e+=("00"+parseInt(g[c],10).toString(16)).slice(-2)+(2===c?":":"");a=a.replace(d.regex.ipv4Extract,e)}if(-1==a.indexOf("::"))j=a;else{for(f=a.split("::"),h=0,c=0;c<f.length;c++)h+=f[c].split(":").length;for(j+=f[0]+":",c=0;c<8-h;c++)j+="0000:";j+=f[1]}for(g=j.split(":"),c=0;c<8;c++)g[c]=i?("0000"+g[c]).slice(-4):("00000"+(parseInt(g[c],16)||0)).slice(-5),k+=7!=c?g[c]+":":g[c];return i?k:k.replace(/:/g,"")},type:"numeric"}),c=function(a){return/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/.test(a)},b=function(a,b){var c,e=a?a.split("."):"",f="",g=e.length;for(c=0;c<g;c++)f+=("000"+e[c]).slice(-3);return a?d.formatFloat(f,b):a},/*! Parser: ipv4Address (a.k.a. ipAddress) */
d.addParser({id:"ipAddress",is:c,format:b,type:"numeric"}),d.addParser({id:"ipv4Address",is:c,format:b,type:"numeric"}),/*! Parser: MAC address */
d.addParser({id:"MAC",is:function(){return!1},format:function(a){var b,c,d="",e=(a||"").replace(/[:.-]/g,"").match(/\w{2}/g);if(e){for(c=e.length,b=0;b<c;b++)d+=("000"+parseInt(e[b],16)).slice(-3);return d}return a},type:"numeric"})}(jQuery);

View File

@ -1 +1 @@
!function(a){"use strict";var b=a.tablesorter,c=[],d=[],e=[],f=[],g=[],h=[],i=[],j=[],k=b.chart={nonDigit:/[^\d,.\-()]/g,init:function(a,b){a.$table.off(b.chart_event).on(b.chart_event,function(){if(this.hasInitialized){var a=this.config;k.getCols(a,a.widgetOptions),k.getData(a,a.widgetOptions)}})},getCols:function(d,e){var f;for(c=[],h=[],j=[],f=0;f<d.columns;f++)e.chart_useSelector&&b.hasWidget(d.table,"columnSelector")&&!d.selector.auto?(d.selector.states[f]&&a.inArray(f,e.chart_ignoreColumns)<0||f===e.chart_labelCol||f===e.chart_sort[0][0])&&c.push(f):(a.inArray(f,e.chart_ignoreColumns)<0||f===e.chart_labelCol||f===e.chart_sort[0][0])&&c.push(f)},getData:function(b,c){k.getHeaders(b,c),k.getRows(b,c),f=[d],a.each(e,function(a,b){f.push(b)}),b.chart={data:f,categories:g,series:h,category:i,dataset:j}},getHeaders:function(b,e){var f;d=[],h=[],j=[],d.push(b.headerContent[e.chart_labelCol]),a.each(c,function(a,c){if(c===e.chart_labelCol)return!0;f=b.headerContent[c],d.push(f),h.push({name:f,data:[]}),j.push({seriesname:f,data:[]})})},getRows:function(c,d){var f=c.cache[0].normalized,l=[];e=[],g=[],i=[],a.each(f,function(b,e){var f,g,h=e[c.columns].$row,i=h.children("th,td"),j=[];if(/v/i.test(d.chart_incRows)&&h.is(":visible")||/f/i.test(d.chart_incRows)&&!h.hasClass(d.filter_filteredRow||"filtered")||!/(v|f)/i.test(d.chart_incRows)){for(f=0;f<c.columns;f++)a.inArray(b,d.chart_parsed)>=0?j.push(e[f]):(g=i[f].getAttribute(c.textAttribute)||i[f].textContent||i.eq(f).text(),j.push(a.trim(g)));l.push(j)}}),l.sort(function(a,c){return 1===d.chart_sort[0][1]?b.sortNatural(c[d.chart_sort[0][0]],a[d.chart_sort[0][0]]):b.sortNatural(a[d.chart_sort[0][0]],c[d.chart_sort[0][0]])}),a.each(l,function(f,l){var m,n=0,o=[],p=l[d.chart_labelCol];o.push(""+p),a.each(l,function(e,f){var l;if(e===d.chart_labelCol)return g.push(f),i.push({label:f}),!0;m=!1,d.chart_useSelector&&b.hasWidget(c.table,"columnSelector")&&!c.selector.auto?c.selector.states[e]&&a.inArray(e,d.chart_ignoreColumns)<0&&(m=""+f):a.inArray(e,d.chart_ignoreColumns)<0&&(m=""+f),m!==!1&&(/s/i.test(""+d.chart_layout[e])?(o.push(m),h[n].data.push(m),j[n].data.push(m)):(l=b.formatFloat(m.replace(k.nonDigit,""),c.table),l=isNaN(l)?m:l,o.push(l),h[n].data.push(l),j[n].data.push({value:l})),n++)}),e.push(o)})},remove:function(a,b){a.$table.off(b.chart_event)}};b.addWidget({id:"chart",options:{chart_incRows:"filtered",chart_useSelector:!1,chart_ignoreColumns:[],chart_parsed:[],chart_layout:{0:"string"},chart_labelCol:0,chart_sort:[[0,0]],chart_event:"chartData"},init:function(a,b,c,d){k.init(c,d)},remove:function(a,b,c){k.remove(b,c)}})}(jQuery);
!function(a){"use strict";var b=a.tablesorter,c=[],d=[],e=[],f=[],g=[],h=[],i=[],j=[],k=b.chart={nonDigit:/[^\d,.\-()]/g,init:function(a,b){a.$table.off(b.chart_event).on(b.chart_event,function(){if(this.hasInitialized){var a=this.config;k.getCols(a,a.widgetOptions),k.getData(a,a.widgetOptions)}})},getCols:function(d,e){var f;for(c=[],h=[],j=[],f=0;f<d.columns;f++)e.chart_useSelector&&b.hasWidget(d.table,"columnSelector")&&!d.selector.auto?(d.selector.states[f]&&a.inArray(f,e.chart_ignoreColumns)<0||f===e.chart_labelCol||f===e.chart_sort[0][0])&&c.push(f):(a.inArray(f,e.chart_ignoreColumns)<0||f===e.chart_labelCol||f===e.chart_sort[0][0])&&c.push(f)},getData:function(b,c){k.getHeaders(b,c),k.getRows(b,c),f=[d],a.each(e,function(a,b){f.push(b)}),b.chart={data:f,categories:g,series:h,category:i,dataset:j}},getHeaders:function(b,e){var f;d=[],h=[],j=[],d.push(b.headerContent[e.chart_labelCol]),a.each(c,function(a,c){if(c===e.chart_labelCol)return!0;f=b.headerContent[c],d.push(f),h.push({name:f,data:[]}),j.push({seriesname:f,data:[]})})},getRows:function(c,d){var f=c.cache[0].normalized,l=[];e=[],g=[],i=[],a.each(f,function(b,e){var f,g,h=e[c.columns].$row,i=h.children("th,td"),j=[];if(/v/i.test(d.chart_incRows)&&h.is(":visible")||/f/i.test(d.chart_incRows)&&!h.hasClass(d.filter_filteredRow||"filtered")||!/(v|f)/i.test(d.chart_incRows)){for(f=0;f<c.columns;f++)a.inArray(b,d.chart_parsed)>=0?j.push(e[f]):(g=i[f].getAttribute(c.textAttribute)||i[f].textContent||i.eq(f).text(),j.push(a.trim(g)));l.push(j)}}),l.sort(function(a,c){return 1===d.chart_sort[0][1]?b.sortNatural(c[d.chart_sort[0][0]],a[d.chart_sort[0][0]]):b.sortNatural(a[d.chart_sort[0][0]],c[d.chart_sort[0][0]])}),a.each(l,function(f,l){var m,n=0,o=[],p=l[d.chart_labelCol];o.push(""+p),a.each(l,function(e,f){var l;if(e===d.chart_labelCol)return g.push(f),i.push({label:f}),!0;m=!1,d.chart_useSelector&&b.hasWidget(c.table,"columnSelector")&&!c.selector.auto?c.selector.states[e]&&a.inArray(e,d.chart_ignoreColumns)<0&&(m=""+f):a.inArray(e,d.chart_ignoreColumns)<0&&(m=""+f),!1!==m&&(/s/i.test(""+d.chart_layout[e])?(o.push(m),h[n].data.push(m),j[n].data.push(m)):(l=b.formatFloat(m.replace(k.nonDigit,""),c.table),l=isNaN(l)?m:l,o.push(l),h[n].data.push(l),j[n].data.push({value:l})),n++)}),e.push(o)})},remove:function(a,b){a.$table.off(b.chart_event)}};b.addWidget({id:"chart",options:{chart_incRows:"filtered",chart_useSelector:!1,chart_ignoreColumns:[],chart_parsed:[],chart_layout:{0:"string"},chart_labelCol:0,chart_sort:[[0,0]],chart_event:"chartData"},init:function(a,b,c,d){k.init(c,d)},remove:function(a,b,c){k.remove(b,c)}})}(jQuery);

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! Widget: columns */
!function(a){"use strict";var b=a.tablesorter||{};b.addWidget({id:"columns",priority:30,options:{columns:["primary","secondary","tertiary"]},format:function(c,d,e){var f,g,h,i,j,k,l,m,n=d.$table,o=d.$tbodies,p=d.sortList,q=p.length,r=e&&e.columns||["primary","secondary","tertiary"],s=r.length-1;for(l=r.join(" "),g=0;g<o.length;g++)f=b.processTbody(c,o.eq(g),!0),h=f.children("tr"),h.each(function(){if(j=a(this),"none"!==this.style.display&&(k=j.children().removeClass(l),p&&p[0]&&(k.eq(p[0][0]).addClass(r[0]),q>1)))for(m=1;m<q;m++)k.eq(p[m][0]).addClass(r[m]||r[s])}),b.processTbody(c,f,!1);if(i=e.columns_thead!==!1?["thead tr"]:[],e.columns_tfoot!==!1&&i.push("tfoot tr"),i.length&&(h=n.find(i.join(",")).children().removeClass(l),q))for(m=0;m<q;m++)h.filter('[data-column="'+p[m][0]+'"]').addClass(r[m]||r[s])},remove:function(c,d,e){var f,g,h=d.$tbodies,i=(e.columns||["primary","secondary","tertiary"]).join(" ");for(d.$headers.removeClass(i),d.$table.children("tfoot").children("tr").children("th, td").removeClass(i),f=0;f<h.length;f++)g=b.processTbody(c,h.eq(f),!0),g.children("tr").each(function(){a(this).children().removeClass(i)}),b.processTbody(c,g,!1)}})}(jQuery);
!function(a){"use strict";var b=a.tablesorter||{};b.addWidget({id:"columns",priority:30,options:{columns:["primary","secondary","tertiary"]},format:function(c,d,e){var f,g,h,i,j,k,l,m,n=d.$table,o=d.$tbodies,p=d.sortList,q=p.length,r=e&&e.columns||["primary","secondary","tertiary"],s=r.length-1;for(l=r.join(" "),g=0;g<o.length;g++)f=b.processTbody(c,o.eq(g),!0),h=f.children("tr"),h.each(function(){if(j=a(this),"none"!==this.style.display&&(k=j.children().removeClass(l),p&&p[0]&&(k.eq(p[0][0]).addClass(r[0]),q>1)))for(m=1;m<q;m++)k.eq(p[m][0]).addClass(r[m]||r[s])}),b.processTbody(c,f,!1);if(i=!1!==e.columns_thead?["thead tr"]:[],!1!==e.columns_tfoot&&i.push("tfoot tr"),i.length&&(h=n.find(i.join(",")).children().removeClass(l),q))for(m=0;m<q;m++)h.filter('[data-column="'+p[m][0]+'"]').addClass(r[m]||r[s])},remove:function(c,d,e){var f,g,h=d.$tbodies,i=(e.columns||["primary","secondary","tertiary"]).join(" ");for(d.$headers.removeClass(i),d.$table.children("tfoot").children("tr").children("th, td").removeClass(i),f=0;f<h.length;f++)g=b.processTbody(c,h.eq(f),!0),g.children("tr").each(function(){a(this).children().removeClass(i)}),b.processTbody(c,g,!1)}})}(jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -27,4 +27,4 @@ function(a,b,c,d){var e=a(b);a.fn.lazyload=function(d){function f(){var b=0;h.ea
* Version: 1.9.7
*
*/
return d&&(void 0!==d.failurelimit&&(d.failure_limit=d.failurelimit,delete d.failurelimit),void 0!==d.effectspeed&&(d.effect_speed=d.effectspeed,delete d.effectspeed),a.extend(i,d)),g=void 0===i.container||i.container===b?e:a(i.container),0===i.event.indexOf("scroll")&&g.bind(i.event,function(){return f()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,void 0!==c.attr("src")&&c.attr("src")!==!1||c.is("img")&&c.attr("src",i.placeholder),c.one("appear",function(){if(!this.loaded){if(i.appear){var d=h.length;i.appear.call(b,d,i)}a("<img />").bind("load",function(){var d=c.attr("data-"+i.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[i.effect](i.effect_speed),b.loaded=!0;var e=a.grep(h,function(a){return!a.loaded});if(h=a(e),i.load){var f=h.length;i.load.call(b,f,i)}}).attr("src",c.attr("data-"+i.data_attribute))}}),0!==i.event.indexOf("scroll")&&c.bind(i.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){f()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&h.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){f()}),this},a.belowthefold=function(c,d){return(void 0===d.container||d.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(d.container).offset().top+a(d.container).height())<=a(c).offset().top-d.threshold},a.rightoffold=function(c,d){return(void 0===d.container||d.container===b?e.width()+e.scrollLeft():a(d.container).offset().left+a(d.container).width())<=a(c).offset().left-d.threshold},a.abovethetop=function(c,d){return(void 0===d.container||d.container===b?e.scrollTop():a(d.container).offset().top)>=a(c).offset().top+d.threshold+a(c).height()},a.leftofbegin=function(c,d){return(void 0===d.container||d.container===b?e.scrollLeft():a(d.container).offset().left)>=a(c).offset().left+d.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document);
return d&&(void 0!==d.failurelimit&&(d.failure_limit=d.failurelimit,delete d.failurelimit),void 0!==d.effectspeed&&(d.effect_speed=d.effectspeed,delete d.effectspeed),a.extend(i,d)),g=void 0===i.container||i.container===b?e:a(i.container),0===i.event.indexOf("scroll")&&g.bind(i.event,function(){return f()}),this.each(function(){var b=this,c=a(b);b.loaded=!1,void 0!==c.attr("src")&&!1!==c.attr("src")||c.is("img")&&c.attr("src",i.placeholder),c.one("appear",function(){if(!this.loaded){if(i.appear){var d=h.length;i.appear.call(b,d,i)}a("<img />").bind("load",function(){var d=c.attr("data-"+i.data_attribute);c.hide(),c.is("img")?c.attr("src",d):c.css("background-image","url('"+d+"')"),c[i.effect](i.effect_speed),b.loaded=!0;var e=a.grep(h,function(a){return!a.loaded});if(h=a(e),i.load){var f=h.length;i.load.call(b,f,i)}}).attr("src",c.attr("data-"+i.data_attribute))}}),0!==i.event.indexOf("scroll")&&c.bind(i.event,function(){b.loaded||c.trigger("appear")})}),e.bind("resize",function(){f()}),/(?:iphone|ipod|ipad).*os 5/gi.test(navigator.appVersion)&&e.bind("pageshow",function(b){b.originalEvent&&b.originalEvent.persisted&&h.each(function(){a(this).trigger("appear")})}),a(c).ready(function(){f()}),this},a.belowthefold=function(c,d){return(void 0===d.container||d.container===b?(b.innerHeight?b.innerHeight:e.height())+e.scrollTop():a(d.container).offset().top+a(d.container).height())<=a(c).offset().top-d.threshold},a.rightoffold=function(c,d){return(void 0===d.container||d.container===b?e.width()+e.scrollLeft():a(d.container).offset().left+a(d.container).width())<=a(c).offset().left-d.threshold},a.abovethetop=function(c,d){return(void 0===d.container||d.container===b?e.scrollTop():a(d.container).offset().top)>=a(c).offset().top+d.threshold+a(c).height()},a.leftofbegin=function(c,d){return(void 0===d.container||d.container===b?e.scrollLeft():a(d.container).offset().left)>=a(c).offset().left+d.threshold+a(c).width()},a.inviewport=function(b,c){return!(a.rightoffold(b,c)||a.leftofbegin(b,c)||a.belowthefold(b,c)||a.abovethetop(b,c))},a.extend(a.expr[":"],{"below-the-fold":function(b){return a.belowthefold(b,{threshold:0})},"above-the-top":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-screen":function(b){return a.rightoffold(b,{threshold:0})},"left-of-screen":function(b){return!a.rightoffold(b,{threshold:0})},"in-viewport":function(b){return a.inviewport(b,{threshold:0})},"above-the-fold":function(b){return!a.belowthefold(b,{threshold:0})},"right-of-fold":function(b){return a.rightoffold(b,{threshold:0})},"left-of-fold":function(b){return!a.rightoffold(b,{threshold:0})}})}(jQuery,window,document);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! Widget: saveSort - updated 10/31/2015 (v2.24.0) */
!function(a){"use strict";var b=a.tablesorter||{};b.addWidget({id:"saveSort",priority:20,options:{saveSort:!0},init:function(a,b,c,d){b.format(a,c,d,!0)},format:function(c,d,e,f){var g,h,i=d.$table,j=e.saveSort!==!1,k={sortList:d.sortList};d.debug&&(h=new Date),i.hasClass("hasSaveSort")?j&&c.hasInitialized&&b.storage&&(b.storage(c,"tablesorter-savesort",k),d.debug&&console.log("saveSort widget: Saving last sort: "+d.sortList+b.benchmark(h))):(i.addClass("hasSaveSort"),k="",b.storage&&(g=b.storage(c,"tablesorter-savesort"),k=g&&g.hasOwnProperty("sortList")&&a.isArray(g.sortList)?g.sortList:"",d.debug&&console.log('saveSort: Last sort loaded: "'+k+'"'+b.benchmark(h)),i.bind("saveSortReset",function(a){a.stopPropagation(),b.storage(c,"tablesorter-savesort","")})),f&&k&&k.length>0?d.sortList=k:c.hasInitialized&&k&&k.length>0&&b.sortOn(d,k))},remove:function(a,c){c.$table.removeClass("hasSaveSort"),b.storage&&b.storage(a,"tablesorter-savesort","")}})}(jQuery);
!function(a){"use strict";var b=a.tablesorter||{};b.addWidget({id:"saveSort",priority:20,options:{saveSort:!0},init:function(a,b,c,d){b.format(a,c,d,!0)},format:function(c,d,e,f){var g,h,i=d.$table,j=!1!==e.saveSort,k={sortList:d.sortList};d.debug&&(h=new Date),i.hasClass("hasSaveSort")?j&&c.hasInitialized&&b.storage&&(b.storage(c,"tablesorter-savesort",k),d.debug&&console.log("saveSort widget: Saving last sort: "+d.sortList+b.benchmark(h))):(i.addClass("hasSaveSort"),k="",b.storage&&(g=b.storage(c,"tablesorter-savesort"),k=g&&g.hasOwnProperty("sortList")&&a.isArray(g.sortList)?g.sortList:"",d.debug&&console.log('saveSort: Last sort loaded: "'+k+'"'+b.benchmark(h)),i.bind("saveSortReset",function(a){a.stopPropagation(),b.storage(c,"tablesorter-savesort","")})),f&&k&&k.length>0?d.sortList=k:c.hasInitialized&&k&&k.length>0&&b.sortOn(d,k))},remove:function(a,c){c.$table.removeClass("hasSaveSort"),b.storage&&b.storage(a,"tablesorter-savesort","")}})}(jQuery);

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! Widget: sort2Hash (BETA) - updated 4/2/2017 (v2.28.6) */
!function(a){"use strict";var b=a.tablesorter||{},c=b.sort2Hash={init:function(d,e){var f,g,h,i,j=d.table,k=d.pager,l=b.hasWidget(j,"saveSort"),m=c.decodeHash(d,e,"sort");(m&&!l||m&&l&&e.sort2Hash_overrideSaveSort)&&c.convertString2Sort(d,e,m),b.hasWidget(d.table,"pager")&&(g=parseInt(c.decodeHash(d,e,"page"),10),h=k.page=g<0?0:g>k.totalPages?k.totalPages-1:g,i=k.size=parseInt(c.decodeHash(d,e,"size"),10)),b.hasWidget(j,"filter")&&(f=c.decodeHash(d,e,"filter"))&&(f=f.split(e.sort2Hash_separator),d.$table.one("tablesorter-ready",function(){setTimeout(function(){d.$table.one("filterEnd",function(){a(this).triggerHandler("pageAndSize",[h,i])}),a.tablesorter.setFilters(j,f,!0)},100)})),f||d.$table.one("tablesorter-ready",function(){d.$table.triggerHandler("pageAndSize",[h,i])}),d.$table.on("sortEnd.sort2hash filterEnd.sort2hash pagerComplete.sort2Hash",function(){this.hasInitialized&&c.setHash(this.config,this.config.widgetOptions)})},getTableId:function(b,c){return c.sort2Hash_tableId||b.table.id||"table"+a("table").index(b.$table)},regexEscape:function(a){return a.replace(/([\.\^\$\*\+\-\?\(\)\[\]\{\}\\\|])/g,"\\$1")},convertString2Sort:function(a,b,d){for(var e,f,g,h,i,j,k=d.split(b.sort2Hash_separator),l=0,m=k.length,n=[];l<m;){if(f=k[l++],h=parseInt(f,10),isNaN(h)||h>a.columns)for(e=new RegExp("("+c.regexEscape(f)+")","i"),i=0;i<a.columns;i++)j=a.$headerIndexed[i],e.test(j.attr(b.sort2Hash_headerTextAttr))&&(f=i,i=a.columns);g=k[l++],void 0!==f&&void 0!==g&&(isNaN(g)&&(g=g.indexOf(b.sort2Hash_directionText[1])>-1?1:0),n.push([f,g]))}n.length&&(a.sortList=n)},convertSort2String:function(b,c){var d,e,f,g,h=[],i=b.sortList||[],j=i.length;for(d=0;d<j;d++)f=i[d][0],e=a.trim(b.$headerIndexed[f].attr(c.sort2Hash_headerTextAttr)),h.push(""!==e?encodeURIComponent(e):f),g=c.sort2Hash_directionText[i[d][1]],h.push(g);return h.join(c.sort2Hash_separator)},convertFilter2String:function(b,c){var d,e,f,g,h=[],i=b.sortList||[],j=i.length;for(d=0;d<j;d++)f=i[d][0],e=a.trim(b.$headerIndexed[f].attr(c.sort2Hash_headerTextAttr)),f=void 0!==e?encodeURIComponent(e):f,h.push(f),g=c.sort2Hash_directionText[i[d][1]],h.push(g);return h.join(c.sort2Hash_separator)},getParam:function(a,b,d){b||(b=window.location.hash);var e=new RegExp("[\\?&]"+c.regexEscape(a)+"=([^&#]*)"),f=e.exec(b);return d?e:null===f?"":decodeURIComponent(f[1])},removeParam:function(a,b){b||(b=window.location.hash);var d,e=c.getParam(a,b,!0),f=[],g=b.split("&"),h=g.length;for(d=0;d<h;d++)e.test("&"+g[d])||f.push(g[d]);return f.length?f.join("&"):""},encodeHash:function(a,b,d,e,f){var g=!1,h=c.getTableId(a,b);return"function"==typeof b.sort2Hash_encodeHash&&(g=b.sort2Hash_encodeHash(a,h,d,e,f||e)),g===!1&&(g="&"+d+"["+h+"]="+e),g},decodeHash:function(a,b,d){var e=!1,f=c.getTableId(a,b);return"function"==typeof b.sort2Hash_decodeHash&&(e=b.sort2Hash_decodeHash(a,f,d)),e===!1&&(e=c.getParam(d+"["+f+"]")),e||""},cleanHash:function(a,b,d,e){var f=!1,g=c.getTableId(a,b);return"function"==typeof b.sort2Hash_cleanHash&&(f=b.sort2Hash_cleanHash(a,g,d,e)),f===!1&&(f=c.removeParam(d+"["+g+"]",e)),f||""},setHash:function(d,e){var f="",g=window.location.hash,h=b.hasWidget(d.table,"pager"),i=b.hasWidget(d.table,"filter"),j=c.convertSort2String(d,e),k=i&&""!==d.lastSearch.join("")?d.lastSearch:[],l=encodeURIComponent(k.join(d.widgetOptions.sort2Hash_separator)),m={sort:j?c.encodeHash(d,e,"sort",j,d.sortList):"",page:h?c.encodeHash(d,e,"page",d.pager.page+1):"",size:h?c.encodeHash(d,e,"size",d.pager.size):"",filter:l?c.encodeHash(d,e,"filter",l,k):""};a.each(m,function(a,b){g=c.cleanHash(d,e,a,g),f+=b}),window.location.hash=((window.location.hash||"").replace("#","").length?g:e.sort2Hash_hash)+f}};b.addWidget({id:"sort2Hash",priority:60,options:{sort2Hash_hash:"#",sort2Hash_separator:"-",sort2Hash_headerTextAttr:"data-header",sort2Hash_directionText:[0,1],sort2Hash_overrideSaveSort:!1,sort2Hash_tableId:null,sort2Hash_encodeHash:null,sort2Hash_decodeHash:null,sort2Hash_cleanHash:null},init:function(a,b,d,e){c.init(d,e)},remove:function(a,b){b.$table.off(".sort2hash")}})}(jQuery);
!function(a){"use strict";var b=a.tablesorter||{},c=b.sort2Hash={init:function(d,e){var f,g,h,i,j=d.table,k=d.pager,l=b.hasWidget(j,"saveSort"),m=c.decodeHash(d,e,"sort");(m&&!l||m&&l&&e.sort2Hash_overrideSaveSort)&&c.convertString2Sort(d,e,m),b.hasWidget(d.table,"pager")&&(g=parseInt(c.decodeHash(d,e,"page"),10),h=k.page=g<0?0:g>k.totalPages?k.totalPages-1:g,i=k.size=parseInt(c.decodeHash(d,e,"size"),10)),b.hasWidget(j,"filter")&&(f=c.decodeHash(d,e,"filter"))&&(f=f.split(e.sort2Hash_separator),d.$table.one("tablesorter-ready",function(){setTimeout(function(){d.$table.one("filterEnd",function(){a(this).triggerHandler("pageAndSize",[h,i])}),a.tablesorter.setFilters(j,f,!0)},100)})),f||d.$table.one("tablesorter-ready",function(){d.$table.triggerHandler("pageAndSize",[h,i])}),d.$table.on("sortEnd.sort2hash filterEnd.sort2hash pagerComplete.sort2Hash",function(){this.hasInitialized&&c.setHash(this.config,this.config.widgetOptions)})},getTableId:function(b,c){return c.sort2Hash_tableId||b.table.id||"table"+a("table").index(b.$table)},regexEscape:function(a){return a.replace(/([\.\^\$\*\+\-\?\(\)\[\]\{\}\\\|])/g,"\\$1")},convertString2Sort:function(a,b,d){for(var e,f,g,h,i,j,k=d.split(b.sort2Hash_separator),l=0,m=k.length,n=[];l<m;){if(f=k[l++],h=parseInt(f,10),isNaN(h)||h>a.columns)for(e=new RegExp("("+c.regexEscape(f)+")","i"),i=0;i<a.columns;i++)j=a.$headerIndexed[i],e.test(j.attr(b.sort2Hash_headerTextAttr))&&(f=i,i=a.columns);g=k[l++],void 0!==f&&void 0!==g&&(isNaN(g)&&(g=g.indexOf(b.sort2Hash_directionText[1])>-1?1:0),n.push([f,g]))}n.length&&(a.sortList=n)},convertSort2String:function(b,c){var d,e,f,g,h=[],i=b.sortList||[],j=i.length;for(d=0;d<j;d++)f=i[d][0],e=a.trim(b.$headerIndexed[f].attr(c.sort2Hash_headerTextAttr)),h.push(""!==e?encodeURIComponent(e):f),g=c.sort2Hash_directionText[i[d][1]],h.push(g);return h.join(c.sort2Hash_separator)},convertFilter2String:function(b,c){var d,e,f,g,h=[],i=b.sortList||[],j=i.length;for(d=0;d<j;d++)f=i[d][0],e=a.trim(b.$headerIndexed[f].attr(c.sort2Hash_headerTextAttr)),f=void 0!==e?encodeURIComponent(e):f,h.push(f),g=c.sort2Hash_directionText[i[d][1]],h.push(g);return h.join(c.sort2Hash_separator)},getParam:function(a,b,d){b||(b=window.location.hash);var e=new RegExp("[\\?&]"+c.regexEscape(a)+"=([^&#]*)"),f=e.exec(b);return d?e:null===f?"":decodeURIComponent(f[1])},removeParam:function(a,b){b||(b=window.location.hash);var d,e=c.getParam(a,b,!0),f=[],g=b.split("&"),h=g.length;for(d=0;d<h;d++)e.test("&"+g[d])||f.push(g[d]);return f.length?f.join("&"):""},encodeHash:function(a,b,d,e,f){var g=!1,h=c.getTableId(a,b);return"function"==typeof b.sort2Hash_encodeHash&&(g=b.sort2Hash_encodeHash(a,h,d,e,f||e)),!1===g&&(g="&"+d+"["+h+"]="+e),g},decodeHash:function(a,b,d){var e=!1,f=c.getTableId(a,b);return"function"==typeof b.sort2Hash_decodeHash&&(e=b.sort2Hash_decodeHash(a,f,d)),!1===e&&(e=c.getParam(d+"["+f+"]")),e||""},cleanHash:function(a,b,d,e){var f=!1,g=c.getTableId(a,b);return"function"==typeof b.sort2Hash_cleanHash&&(f=b.sort2Hash_cleanHash(a,g,d,e)),!1===f&&(f=c.removeParam(d+"["+g+"]",e)),f||""},setHash:function(d,e){var f="",g=window.location.hash,h=b.hasWidget(d.table,"pager"),i=b.hasWidget(d.table,"filter"),j=c.convertSort2String(d,e),k=i&&""!==d.lastSearch.join("")?d.lastSearch:[],l=encodeURIComponent(k.join(d.widgetOptions.sort2Hash_separator)),m={sort:j?c.encodeHash(d,e,"sort",j,d.sortList):"",page:h?c.encodeHash(d,e,"page",d.pager.page+1):"",size:h?c.encodeHash(d,e,"size",d.pager.size):"",filter:l?c.encodeHash(d,e,"filter",l,k):""};a.each(m,function(a,b){g=c.cleanHash(d,e,a,g),f+=b}),window.location.hash=((window.location.hash||"").replace("#","").length?g:e.sort2Hash_hash)+f}};b.addWidget({id:"sort2Hash",priority:60,options:{sort2Hash_hash:"#",sort2Hash_separator:"-",sort2Hash_headerTextAttr:"data-header",sort2Hash_directionText:[0,1],sort2Hash_overrideSaveSort:!1,sort2Hash_tableId:null,sort2Hash_encodeHash:null,sort2Hash_decodeHash:null,sort2Hash_cleanHash:null},init:function(a,b,d,e){c.init(d,e)},remove:function(a,b){b.$table.off(".sort2hash")}})}(jQuery);

View File

@ -3,4 +3,4 @@
* by Rob Garrison
* Contributors: Chris Rogers
*/
!function(a){"use strict";var b=a.tablesorter;b.sortTbodies={init:function(c,d){var e,f,g,h,i,j=c.namespace+"sortTbody",k=c.$table.children("tbody"),l=k.length;for(d.sortTbody_original_serverSideSorting=c.serverSideSorting,d.sortTbody_original_cssInfoBlock=c.cssInfoBlock,c.cssInfoBlock=d.sortTbody_noSort,b.sortTbodies.setTbodies(c,d),e=0;e<l;e++)k.eq(e).attr("data-ts-original-order",e);for(c.$table.unbind("sortBegin updateComplete ".split(" ").join(j+" ")).bind("sortBegin"+j,function(){b.sortTbodies.sorter(c)}).bind("updateComplete"+j,function(){b.sortTbodies.setTbodies(c,d),b.updateCache(c,null,c.$tbodies)}).bind("sortEnd",function(){var b=d.sortTbody_primaryRow;d.sortTbody_lockHead&&b&&c.$table.find(b).each(function(){a(this).parents("tbody").prepend(this)})}),(a.isEmptyObject(c.parsers)||c.$tbodies.length!==k.length)&&(b.sortTbodies.setTbodies(c,d),b.updateCache(c,null,c.$tbodies)),i=k.children("tr"),l=i.length,e=0;e<c.columns;e++){if(h=0,"numeric"===c.parsers[e].type)for(f=0;f<l;f++)g=b.getParsedText(c,i.eq(f).children()[e],e),h=Math.max(Math.abs(g)||0,h);c.$headerIndexed[e].attr("data-ts-col-max-value",h)}},setTbodies:function(a,b){a.$tbodies=a.$table.children("tbody").not("."+b.sortTbody_noSort)},sorter:function(c){var d=c.$table,e=c.widgetOptions;if(e.sortTbody_busy!==!0){e.sortTbody_busy=!0;var f=d.children("tbody").not("."+e.sortTbody_noSort),g=e.sortTbody_primaryRow||"tr:eq(0)",h=c.sortList||[],i=h.length;i&&(c.serverSideSorting=!e.sortTbody_sortRows,f.sort(function(d,e){var f,j,k,l,m,n,o,p,q,r,s,t,u=c.table,v=c.parsers,w=c.textSorter||"",x=a(d),y=a(e),z=x.find(g).children("td, th"),A=y.find(g).children("td, th");for(f=0;f<i;f++){if(o=h[f][0],p=h[f][1],k=0===p,j=b.getElementText(c,z.eq(o),o),q=v[o].format(j,u,z[o],o),j=b.getElementText(c,A.eq(o),o),r=v[o].format(j,u,A[o],o),c.sortStable&&q===r&&1===i)return x.attr("data-ts-original-order")-y.attr("data-ts-original-order");if(l=/n/i.test(v&&v[o]?v[o].type||"":""),l&&c.strings[o]?(m=c.$headerIndexed[o].attr("data-ts-col-max-value")||1.79e308,l="boolean"==typeof b.string[c.strings[o]]?(k?1:-1)*(b.string[c.strings[o]]?-1:1):c.strings[o]?b.string[c.strings[o]]||0:0,n=c.numberSorter?c.numberSorter(q,r,k,m,u):b["sortNumeric"+(k?"Asc":"Desc")](q,r,l,m,o,c)):(s=k?q:r,t=k?r:q,n="function"==typeof w?w(s,t,k,o,u):"object"==typeof w&&w.hasOwnProperty(o)?w[o](s,t,k,o,u):b["sortNatural"+(k?"Asc":"Desc")](q,r,o,c)),n)return n}return x.attr("data-ts-original-order")-y.attr("data-ts-original-order")}),b.sortTbodies.restoreTbodies(c,e,f),e.sortTbody_busy=!1)}},restoreTbodies:function(a,b,c){var d,e,f,g,h,i,j,k=a.$table,l=!0,m=0;if(k.hide(),c.appendTo(k),e=k.children("tbody"),g=e.length,d=e.filter("."+b.sortTbody_noSort).appendTo(k),h=d.length)for(;l&&m<h;){for(l=!1,i=0;i<h;i++)j=parseInt(d.eq(i).attr("data-ts-original-order"),10),(j=j>=g?g:j<0?0:j)!==d.eq(i).index()&&(l=!0,f=d.eq(i).detach(),j>=g?f.appendTo(k):0===j?f.prependTo(k):f.insertBefore(k.children("tbody:eq("+j+")")));m++}k.show()}},b.addWidget({id:"sortTbody",priority:40,options:{sortTbody_lockHead:!1,sortTbody_primaryRow:null,sortTbody_sortRows:!1,sortTbody_noSort:"tablesorter-no-sort-tbody"},init:function(a,c,d,e){b.sortTbodies.init(d,e)},remove:function(a,b,c,d){b.$table.unbind("sortBegin updateComplete ".split(" ").join(b.namespace+"sortTbody ")),b.serverSideSorting=c.sortTbody_original_serverSideSorting,b.cssInfoBlock=c.sortTbody_original_cssInfoBlock}})}(jQuery);
!function(a){"use strict";var b=a.tablesorter;b.sortTbodies={init:function(c,d){var e,f,g,h,i,j=c.namespace+"sortTbody",k=c.$table.children("tbody"),l=k.length;for(d.sortTbody_original_serverSideSorting=c.serverSideSorting,d.sortTbody_original_cssInfoBlock=c.cssInfoBlock,c.cssInfoBlock=d.sortTbody_noSort,b.sortTbodies.setTbodies(c,d),e=0;e<l;e++)k.eq(e).attr("data-ts-original-order",e);for(c.$table.unbind("sortBegin updateComplete ".split(" ").join(j+" ")).bind("sortBegin"+j,function(){b.sortTbodies.sorter(c)}).bind("updateComplete"+j,function(){b.sortTbodies.setTbodies(c,d),b.updateCache(c,null,c.$tbodies)}).bind("sortEnd",function(){var b=d.sortTbody_primaryRow;d.sortTbody_lockHead&&b&&c.$table.find(b).each(function(){a(this).parents("tbody").prepend(this)})}),(a.isEmptyObject(c.parsers)||c.$tbodies.length!==k.length)&&(b.sortTbodies.setTbodies(c,d),b.updateCache(c,null,c.$tbodies)),i=k.children("tr"),l=i.length,e=0;e<c.columns;e++){if(h=0,"numeric"===c.parsers[e].type)for(f=0;f<l;f++)g=b.getParsedText(c,i.eq(f).children()[e],e),h=Math.max(Math.abs(g)||0,h);c.$headerIndexed[e].attr("data-ts-col-max-value",h)}},setTbodies:function(a,b){a.$tbodies=a.$table.children("tbody").not("."+b.sortTbody_noSort)},sorter:function(c){var d=c.$table,e=c.widgetOptions;if(!0!==e.sortTbody_busy){e.sortTbody_busy=!0;var f=d.children("tbody").not("."+e.sortTbody_noSort),g=e.sortTbody_primaryRow||"tr:eq(0)",h=c.sortList||[],i=h.length;i&&(c.serverSideSorting=!e.sortTbody_sortRows,f.sort(function(d,e){var f,j,k,l,m,n,o,p,q,r,s,t,u=c.table,v=c.parsers,w=c.textSorter||"",x=a(d),y=a(e),z=x.find(g).children("td, th"),A=y.find(g).children("td, th");for(f=0;f<i;f++){if(o=h[f][0],p=h[f][1],k=0===p,j=b.getElementText(c,z.eq(o),o),q=v[o].format(j,u,z[o],o),j=b.getElementText(c,A.eq(o),o),r=v[o].format(j,u,A[o],o),c.sortStable&&q===r&&1===i)return x.attr("data-ts-original-order")-y.attr("data-ts-original-order");if(l=/n/i.test(v&&v[o]?v[o].type||"":""),l&&c.strings[o]?(m=c.$headerIndexed[o].attr("data-ts-col-max-value")||1.79e308,l="boolean"==typeof b.string[c.strings[o]]?(k?1:-1)*(b.string[c.strings[o]]?-1:1):c.strings[o]?b.string[c.strings[o]]||0:0,n=c.numberSorter?c.numberSorter(q,r,k,m,u):b["sortNumeric"+(k?"Asc":"Desc")](q,r,l,m,o,c)):(s=k?q:r,t=k?r:q,n="function"==typeof w?w(s,t,k,o,u):"object"==typeof w&&w.hasOwnProperty(o)?w[o](s,t,k,o,u):b["sortNatural"+(k?"Asc":"Desc")](q,r,o,c)),n)return n}return x.attr("data-ts-original-order")-y.attr("data-ts-original-order")}),b.sortTbodies.restoreTbodies(c,e,f),e.sortTbody_busy=!1)}},restoreTbodies:function(a,b,c){var d,e,f,g,h,i,j,k=a.$table,l=!0,m=0;if(k.hide(),c.appendTo(k),e=k.children("tbody"),g=e.length,d=e.filter("."+b.sortTbody_noSort).appendTo(k),h=d.length)for(;l&&m<h;){for(l=!1,i=0;i<h;i++)j=parseInt(d.eq(i).attr("data-ts-original-order"),10),(j=j>=g?g:j<0?0:j)!==d.eq(i).index()&&(l=!0,f=d.eq(i).detach(),j>=g?f.appendTo(k):0===j?f.prependTo(k):f.insertBefore(k.children("tbody:eq("+j+")")));m++}k.show()}},b.addWidget({id:"sortTbody",priority:40,options:{sortTbody_lockHead:!1,sortTbody_primaryRow:null,sortTbody_sortRows:!1,sortTbody_noSort:"tablesorter-no-sort-tbody"},init:function(a,c,d,e){b.sortTbodies.init(d,e)},remove:function(a,b,c,d){b.$table.unbind("sortBegin updateComplete ".split(" ").join(b.namespace+"sortTbody ")),b.serverSideSorting=c.sortTbody_original_serverSideSorting,b.cssInfoBlock=c.sortTbody_original_cssInfoBlock}})}(jQuery);

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! Widget: storage - updated 11/26/2016 (v2.28.0) */
!function(a,b,c){"use strict";var d=a.tablesorter||{};d.storage=function(e,f,g,h){e=a(e)[0];var i,j,k,l=!1,m={},n=e.config,o=n&&n.widgetOptions,p=h&&h.useSessionStorage||o&&o.storage_useSessionStorage?"sessionStorage":"localStorage",q=a(e),r=h&&h.id||q.attr(h&&h.group||o&&o.storage_group||"data-table-group")||o&&o.storage_tableId||e.id||a(".tablesorter").index(q),s=h&&h.url||q.attr(h&&h.page||o&&o.storage_page||"data-table-page")||o&&o.storage_fixedUrl||n&&n.fixedUrl||b.location.pathname;if(a.extend(!0,d.defaults,{fixedUrl:"",widgetOptions:{storage_fixedUrl:"",storage_group:"",storage_page:"",storage_tableId:"",storage_useSessionStorage:""}}),p in b)try{b[p].setItem("_tmptest","temp"),l=!0,b[p].removeItem("_tmptest")}catch(a){n&&n.debug&&console.warn(p+" is not supported in this browser")}if(a.parseJSON&&(l?m=a.parseJSON(b[p][f]||"null")||{}:(j=c.cookie.split(/[;\s|=]/),i=a.inArray(f,j)+1,m=0!==i?a.parseJSON(j[i]||"null")||{}:{})),void 0===g||!b.JSON||!JSON.hasOwnProperty("stringify"))return m&&m[s]?m[s][r]:"";m[s]||(m[s]={}),m[s][r]=g,l?b[p][f]=JSON.stringify(m):(k=new Date,k.setTime(k.getTime()+31536e6),c.cookie=f+"="+JSON.stringify(m).replace(/\"/g,'"')+"; expires="+k.toGMTString()+"; path=/")}}(jQuery,window,document);
/*! Widget: storage - updated 4/18/2017 (v2.28.8) */
!function(a,b,c){"use strict";var d=a.tablesorter||{};a.extend(!0,d.defaults,{fixedUrl:"",widgetOptions:{storage_fixedUrl:"",storage_group:"",storage_page:"",storage_storageType:"",storage_tableId:"",storage_useSessionStorage:""}}),d.storage=function(d,e,f,g){d=a(d)[0];var h,i,j,k=!1,l={},m=d.config,n=m&&m.widgetOptions,o=(g&&g.storageType||n&&n.storage_storageType).toString().charAt(0).toLowerCase(),p=o?"":g&&g.useSessionStorage||n&&n.storage_useSessionStorage,q=a(d),r=g&&g.id||q.attr(g&&g.group||n&&n.storage_group||"data-table-group")||n&&n.storage_tableId||d.id||a(".tablesorter").index(q),s=g&&g.url||q.attr(g&&g.page||n&&n.storage_page||"data-table-page")||n&&n.storage_fixedUrl||m&&m.fixedUrl||b.location.pathname;if("c"!==o&&(o="s"===o||p?"sessionStorage":"localStorage")in b)try{b[o].setItem("_tmptest","temp"),k=!0,b[o].removeItem("_tmptest")}catch(a){m&&m.debug&&console.warn(o+" is not supported in this browser")}if(m.debug&&console.log("Storage widget using",k?o:"cookies"),a.parseJSON&&(k?l=a.parseJSON(b[o][e]||"null")||{}:(i=c.cookie.split(/[;\s|=]/),h=a.inArray(e,i)+1,l=0!==h?a.parseJSON(i[h]||"null")||{}:{})),void 0===f||!b.JSON||!JSON.hasOwnProperty("stringify"))return l&&l[s]?l[s][r]:"";l[s]||(l[s]={}),l[s][r]=f,k?b[o][e]=JSON.stringify(l):(j=new Date,j.setTime(j.getTime()+31536e6),c.cookie=e+"="+JSON.stringify(l).replace(/\"/g,'"')+"; expires="+j.toGMTString()+"; path=/")}}(jQuery,window,document);

View File

@ -1 +1 @@
!function(a){"use strict";var b,c,d,e=a.tablesorter,f=!1,g=e.view={copyCaption:function(b,c){g.removeCaption(b,c),b.$table.find("caption").length>0&&a(c.view_caption).text(b.$table.find("caption").text())},removeCaption:function(b,c){a(c.view_caption).empty()},buildToolBar:function(b,c){g.removeToolBar(b,c),g.copyCaption(b,c);var d=a(c.view_toolbar);a.each(c.view_layouts,function(b,e){var f=c.view_switcher_class;b==c.view_layout&&(f+=" active");var g=a("<a>",{href:"#",class:f,"data-view-type":b,title:e.title});g.append(a("<i>",{class:e.icon})),d.append(g)}),d.find("."+c.view_switcher_class).on("click",function(e){if(e.preventDefault(),a(this).hasClass("active"))return!1;d.find("."+c.view_switcher_class).removeClass("active"),a(this).addClass("active"),c.view_layout=a(this).attr("data-view-type"),c.view_layouts[c.view_layout].raw===!0?(g.remove(b,c),g.buildToolBar(b,c)):(f===!1&&g.hideTable(b,c),g.buildView(b,c))})},removeToolBar:function(b,c){a(c.view_toolbar).empty(),g.removeCaption(b,c)},buildView:function(b,c){g.removeView(b,c);var d=c.view_layouts[c.view_layout],f=a(d.container,{class:c.view_layout});e.getColumnText(b.$table,0,function(b){var c=d.tmpl;a.each(a(b.$row).find("td"),function(b,d){var e={},f="{col"+b+"}";a.each(d.attributes,function(a,b){e[b.nodeName]=b.nodeValue});var g=a(d).html(),h=a("<span />").append(a("<span/>",e).append(g));c=c.replace(new RegExp(f,"g"),h.html()),f="{col"+b+":raw}",c=c.replace(new RegExp(f,"g"),a(d).text())});var e=a(c);a.each(b.$row[0].attributes,function(a,b){"class"==b.nodeName?e.attr(b.nodeName,e.attr(b.nodeName)+" "+b.nodeValue):e.attr(b.nodeName,b.nodeValue)}),f.append(e)}),a(c.view_container).append(f),b.$table.triggerHandler("viewComplete")},removeView:function(b,c){a(c.view_container).empty()},hideTable:function(a,e){b=a.$table.css("position"),c=a.$table.css("bottom"),d=a.$table.css("left"),a.$table.css({position:"absolute",top:"-10000px",left:"-10000px"}),f=!0},init:function(a,b){b.view_layout!==!1&&void 0!==b.view_layouts[b.view_layout]&&(f===!1&&g.hideTable(a,b),a.$table.on("tablesorter-ready",function(){g.buildToolBar(a,b),g.buildView(a,b)}))},remove:function(a,e){g.removeToolBar(a,e),g.removeView(a,e),a.$table.css({position:b,top:c,left:d}),f=!1}};e.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(a,b,c,d){g.init(c,d)},remove:function(a,b,c){g.remove(b,c)}})}(jQuery);
!function(a){"use strict";var b,c,d,e=a.tablesorter,f=!1,g=e.view={copyCaption:function(b,c){g.removeCaption(b,c),b.$table.find("caption").length>0&&a(c.view_caption).text(b.$table.find("caption").text())},removeCaption:function(b,c){a(c.view_caption).empty()},buildToolBar:function(b,c){g.removeToolBar(b,c),g.copyCaption(b,c);var d=a(c.view_toolbar);a.each(c.view_layouts,function(b,e){var f=c.view_switcher_class;b==c.view_layout&&(f+=" active");var g=a("<a>",{href:"#",class:f,"data-view-type":b,title:e.title});g.append(a("<i>",{class:e.icon})),d.append(g)}),d.find("."+c.view_switcher_class).on("click",function(e){if(e.preventDefault(),a(this).hasClass("active"))return!1;d.find("."+c.view_switcher_class).removeClass("active"),a(this).addClass("active"),c.view_layout=a(this).attr("data-view-type"),!0===c.view_layouts[c.view_layout].raw?(g.remove(b,c),g.buildToolBar(b,c)):(!1===f&&g.hideTable(b,c),g.buildView(b,c))})},removeToolBar:function(b,c){a(c.view_toolbar).empty(),g.removeCaption(b,c)},buildView:function(b,c){g.removeView(b,c);var d=c.view_layouts[c.view_layout],f=a(d.container,{class:c.view_layout});e.getColumnText(b.$table,0,function(b){var c=d.tmpl;a.each(a(b.$row).find("td"),function(b,d){var e={},f="{col"+b+"}";a.each(d.attributes,function(a,b){e[b.nodeName]=b.nodeValue});var g=a(d).html(),h=a("<span />").append(a("<span/>",e).append(g));c=c.replace(new RegExp(f,"g"),h.html()),f="{col"+b+":raw}",c=c.replace(new RegExp(f,"g"),a(d).text())});var e=a(c);a.each(b.$row[0].attributes,function(a,b){"class"==b.nodeName?e.attr(b.nodeName,e.attr(b.nodeName)+" "+b.nodeValue):e.attr(b.nodeName,b.nodeValue)}),f.append(e)}),a(c.view_container).append(f),b.$table.triggerHandler("viewComplete")},removeView:function(b,c){a(c.view_container).empty()},hideTable:function(a,e){b=a.$table.css("position"),c=a.$table.css("bottom"),d=a.$table.css("left"),a.$table.css({position:"absolute",top:"-10000px",left:"-10000px"}),f=!0},init:function(a,b){!1!==b.view_layout&&void 0!==b.view_layouts[b.view_layout]&&(!1===f&&g.hideTable(a,b),a.$table.on("tablesorter-ready",function(){g.buildToolBar(a,b),g.buildView(a,b)}))},remove:function(a,e){g.removeToolBar(a,e),g.removeView(a,e),a.$table.css({position:b,top:c,left:d}),f=!1}};e.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(a,b,c,d){g.init(c,d)},remove:function(a,b,c){g.remove(b,c)}})}(jQuery);

View File

@ -60,7 +60,8 @@
// initialize zebra striping and resizable widgets on the table
widgets: [ 'zebra', 'resizable', 'stickyHeaders' ],
widgetOptions: {
storage_useSessionStorage : true,
// storage_useSessionStorage : true, deprecated in v2.28.8
storage_storageType: 's', // use first letter (s)ession
resizable_addLastColumn : true
}
});
@ -110,6 +111,7 @@
<li><span class="label label-info">IMPORTANT</span> The resizable will not work properly if the <a href="index.html#widthfixed"><code>widthFixed</code></a> option is set to <code>true</code>. Make sure it is set to <code>false</code> (default setting).</li>
<li><del><span class="label label-info">IMPORTANT</span> The resize div ends up with a zero height if the header cell is empty. Please include at least a <code>&amp;nbsp;</code> in the cell to allow it to render properly (<a href="https://github.com/Mottie/tablesorter/issues/844" title="Thanks gigib82!">ref</a>)</del>. No longer necessary as the resizable widget no longer adds elements inside the table header cells.<br><br></li>
<li>In <span class="version">v2.28.8</span>, added the <a class="intlink" href="#resizable-include-footer"><code>resizable_includeFooter</code></a> option.</li>
<li>In <span class="version">v2.28.5</span>,
<ul>
<li>A <a class="intlink" href="#events"><code>resizableUpdate</code></a> event can be triggered on the table to update the resizable handles.</li>
@ -180,6 +182,17 @@
</td>
</tr>
<tr id="resizable-include-footer">
<td><a href="#" class="permalink">resizable_includeFooter</a></td>
<td>true</td>
<td>When <code>true</code>, the resizable handle will extend into the table footer (<span class="version">v2.28.8</span>).
<div class="collapsible">
<p>When <code>true</code>, this option includes the entire height of the table footer. If the table does not include a footer, the resize handle will stop at the last row.</p>
<p>If <code>false</code>, the resizable handle will not extend into the table footer.</p>
</div>
</td>
</tr>
<tr id="resizable-widths">
<td><a href="#" class="permalink">resizable_widths</a></td>
<td>[ ]</td>
@ -262,6 +275,16 @@ $( 'table' ).trigger( 'resizableUpdate' );</pre>
<th>Date</th>
</tr>
</thead>
<tfoot>
<tr>
<th>First Name</th>
<th>Last Name</th>
<th>Age</th>
<th>Total</th>
<th>Discount</th>
<th>Date</th>
</tr>
</tfoot>
<tbody>
<tr><td>Peter</td><td>Parker</td><td>28</td><td>$9.99</td><td>20%</td><td>Jul 6, 2006 8:14 AM</td></tr>
<tr><td>John</td><td>Hood</td><td>33</td><td>$19.99</td><td>25%</td><td>Dec 10, 2002 5:14 AM</td></tr>

View File

@ -465,7 +465,7 @@
<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><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">&dagger;</span> Filter widget (<span class="version updated">v2.28.7</span>):
<li><span class="results">&dagger;</span> Filter widget (<span class="version updated">v2.28.8</span>):
<ul>
<li><a href="example-widget-filter.html">basic</a> (v2.0.18; <span class="version updated">v2.26.6</span>).</li>
<li><a href="example-widget-filter-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>
@ -496,18 +496,18 @@
<br><br>
</li>
<li>Pager plugin (<a href="example-pager.html">basic</a> &amp; <a href="example-pager-ajax.html">ajax</a> demos; <span class="version updated">v2.28.6</span>).</li>
<li>Pager plugin (<a href="example-pager.html">basic</a> &amp; <a href="example-pager-ajax.html">ajax</a> demos; <span class="version updated">v2.28.8</span>).</li>
<li>
Pager widget (<a href="example-widget-pager.html">basic</a> &amp; <a href="example-widget-pager-ajax.html">ajax</a> demos) (<span class="version">v2.12</span>; <span class="version updated">v2.28.6</span>).<br>
Pager widget (<a href="example-widget-pager.html">basic</a> &amp; <a href="example-widget-pager-ajax.html">ajax</a> demos) (<span class="version">v2.12</span>; <span class="version updated">v2.28.8</span>).<br>
<br>
</li>
<li><a href="example-widget-print.html">Print widget</a> (<span class="version">v2.16.4</span>; <span class="version updated">v2.25.8</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><span class="results">&dagger;</span> <a href="example-widget-resizable.html">Resizable columns widget</a> (v2.0.23.1; <span class="version updated">v2.28.5</span>).</li>
<li><span class="results">&dagger;</span> <a href="example-widget-resizable.html">Resizable columns widget</a> (v2.0.23.1; <span class="version updated">v2.28.8</span>).</li>
<li><span class="results">&dagger;</span> <a href="example-widget-savesort.html">Save sort widget</a> (v2.0.27; <span class="version updated">v2.24.0</span>).</li>
<li><a href="example-widget-scroller.html">Scroller widget</a> (<span class="version">v2.9</span>; <span class="version updated">v2.28.5</span>).</li>
<li><a href="example-widget-scroller.html">Scroller widget</a> (<span class="version">v2.9</span>; <span class="version updated">v2.28.8</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.28.6</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><a href="example-widget-static-row.html">Static row widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.24.0</span>).</li>
@ -515,6 +515,8 @@
<li><span class="results">&dagger;</span> <a href="example-widget-sticky-header.html">Sticky header widget</a> (v2.0.21.1; <span class="version updated">v2.28.4</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.19.1</span>).</li>
<li><span class="results">&dagger;</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="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">&dagger;</span> UITheme widget (<span class="version">v2.0.9</span>; <span class="version updated">v2.27.0</span>):
@ -2051,6 +2053,10 @@ $(function(){
// will be included in the last column of the table
resizable_addLastColumn: false,
// If this option is set to true, the resizable handle will extend
// into the table footer
resizable_includeFooter: true,
// Set this option to the starting & reset header widths
resizable_widths: [],
@ -2108,7 +2114,10 @@ $(function(){
stickyHeaders_zIndex: 2,
// *** STORAGE WIDGET ***
// allows switching between using local & session storage
// set storage type; this overrides any storage_useSessionStorage setting
// use the first letter of (l)ocal, (s)ession or (c)ookie
storage_storageType: '',
// DEPRECATED: allows switching between using local & session storage
storage_useSessionStorage: false,
// alternate table id (set if grouping multiple tables together)
storage_tableId: '',
@ -3854,6 +3863,19 @@ $('table').trigger('search', false);</pre></div>
<td><a href="example-widget-resizable.html">Example</a></td>
</tr>
<tr id="widget-resizable-includefooter">
<td><a href="#" class="permalink">resizable_includeFooter</a></td>
<td>Boolean</td>
<td>true</td>
<td>Resizable widget: If this option is set to <code>true</code>, the resizable handle will extend into the table footer (<span class="version">v2.28.8</span>).
<div class="collapsible">
<p>When <code>true</code>, this option includes the entire height of the table footer. If the table does not include a footer, the resize handle will stop at the last row.</p>
<p>If <code>false</code>, the resizable handle will not extend into the table footer.</p>
</div>
</td>
<td></td>
</tr>
<tr id="widget-resizable-widths">
<td><a href="#" class="permalink">resizable_widths</a></td>
<td>Array</td>
@ -3904,7 +3926,7 @@ $('table').trigger('search', false);</pre></div>
<td></td>
</tr>
<tr id="resizable-target-last">
<tr id="widget-resizable-target-last">
<td><a href="#" class="permalink">resizable_targetLast</a></td>
<td>Boolean</td>
<td>false</td>
@ -3941,13 +3963,42 @@ $('table').trigger('search', false);</pre></div>
<td><a href="example-widget-savesort.html">Example</a></td>
</tr>
<tr id="widget-storage-storage-type">
<td><a href="#" class="permalink">storage_storageType</a></td>
<td>String</td>
<td>&quot;&quot;</td>
<td>
Storage widget: Set this option to the first letter of the desired storage type (<span class="version">v2.28.8</span>).
<div class="collapsible">
<p>If <em>any</em> value is set in this option, the deprecated <a href="#widget-storage-use-session-storage"><code>&quot;storage_useSessionStorage&quot;</code></a> is completely ignored.</p>
<ul>
<li>When set to <code>&quot;s&quot;</code> (session), all saved variables for the table use <code>sessionStorage</code>. This means once the user closes the browser, all saved variables are lost.</li>
<li>When set to <code>&quot;c&quot;</code> (cookie), all saved variables for the table will use cookies.</li>
<li>Any other setting will switch to using the default <code>localStorage</code> type.</li>
</ul>
Use the <a href="#widget-storage-storage-type"><code>&quot;storage_storageType&quot;</code></a> option as follows:
<pre class="prettyprint lang-js">$(function(){
$("table").tablesorter({
widgets: ["saveSort"],
widgetOptions : {
// This sets session storage; only the first letter is required
storage_storageType : "session"
}
});
});</pre></div>
</td>
<td></td>
</tr>
<tr id="widget-storage-use-session-storage">
<td><a href="#" class="permalink">storage_useSessionStorage</a></td>
<td><a href="#" class="permalink alert">storage_useSessionStorage</a></td>
<td>Boolean</td>
<td>false</td>
<td>
Storage widget: If this option is set to <code>false</code>, all saved variables for the table will be within local storage (<span class="version">v2.21.3</span>).
Storage widget: This option was <span class="label label-danger">deprecated</span> in <span class="version updated">v2.28.8</span>.
<div class="collapsible">
<p>In <span class="version">v2.28.8</span>, this option is replaced by the <a href="#widget-storage-storage-type"><code>&quot;storage_storageType&quot;</code></a> option and will be completely ignored if that option has <em>any</em> setting.</p>
<p>If this option is set to <code>false</code>, all saved variables for the table will be within local storage (<span class="version">v2.21.3</span>).</p>
<p>If <code>true</code>, all saved variables for the table will be within the session storage. This means once the user closes the browser, all saved variables are lost.</p>
Use the <a href="#widget-storage-use-session-storage"><code>&quot;storage_useSessionStorage&quot;</code></a> option to switch to session storage as follows:
<pre class="prettyprint lang-js">$(function(){
@ -7889,21 +7940,28 @@ $.tablesorter.addHeaderResizeEvent( table, true );</pre>
<pre class="prettyprint lang-html">&lt;table class=&quot;tablesorter&quot; data-table-page=&quot;mydomain&quot; data-table-group=&quot;financial&quot;&gt;...&lt;/table&gt;)</pre>
To change the default data attributes, use the <code>options</code> to modify them as follows:<pre class="prettyprint lang-js">$.tablesorter.storage( table, key, value, {
// table id/group id
id : 'group1',
id: 'group1',
// this group option sets name of the table attribute with the ID;
// but the value within this data attribute is overridden by the above id option
group: 'data-table-group',
// table pages
url : 'page1',
url: 'page1',
// this page option sets name of the table attribute with the page/url;
// but the value within the data attribute is overridden by the above url option
page: 'data-table-page',
// Option added v2.28.8; use the first letter of (l)ocal, (s)ession or (c)ookie
// to set the desired storage type. Any setting of this option will override
// any setting in the `useSessionStorage` option.
storageType: 'l', // local
// DEPRECATED in v2.28.8; use the `storageType` option.
// Option added v2.21.3; if `true` the storage function will use sessionStorage
// if not defined, the `config.widgetOptions.storage_useSessionStorage` setting is checked
// if no settings are found, it will default to `false`, and use localStorage
useSessionStorage : false
// useSessionStorage: false
});</pre>
The priority of table ID settings is as follows:
<ol>

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 04-04-2017 (v2.28.7)*/
/*! tablesorter (FORK) - updated 04-18-2017 (v2.28.8)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -16,7 +16,7 @@
}
}(function(jQuery) {
/*! TableSorter (FORK) v2.28.7 *//*
/*! TableSorter (FORK) v2.28.8 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -40,7 +40,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.28.7',
version : '2.28.8',
parsers : [],
widgets : [],
@ -1325,7 +1325,7 @@
cell = $cell[ 0 ]; // in case cell is a jQuery object
// tbody may not exist if update is initialized while tbody is removed for processing
if ( $tbodies.length && tbodyIndex >= 0 ) {
row = $tbodies.eq( tbodyIndex ).find( 'tr' ).index( $row );
row = $tbodies.eq( tbodyIndex ).find( 'tr' ).not( '.' + c.cssChildRow ).index( $row );
cache = tbcache.normalized[ row ];
len = $row[ 0 ].cells.length;
if ( len !== c.columns ) {
@ -1346,7 +1346,6 @@
cache[ c.columns ].raw[ icell ] = tmp;
tmp = ts.getParsedText( c, cell, icell, tmp );
cache[ icell ] = tmp; // parsed
cache[ c.columns ].$row = $row;
if ( ( c.parsers[ icell ].type || '' ).toLowerCase() === 'numeric' ) {
// update column max value (ignore sign)
tbcache.colMax[ icell ] = Math.max( Math.abs( tmp ) || 0, tbcache.colMax[ icell ] || 0 );
@ -2827,12 +2826,26 @@
})( jQuery );
/*! Widget: storage - updated 11/26/2016 (v2.28.0) */
/*! Widget: storage - updated 4/18/2017 (v2.28.8) */
/*global JSON:false */
;(function ($, window, document) {
'use strict';
var ts = $.tablesorter || {};
// update defaults for validator; these values must be falsy!
$.extend(true, ts.defaults, {
fixedUrl: '',
widgetOptions: {
storage_fixedUrl: '',
storage_group: '',
storage_page: '',
storage_storageType: '',
storage_tableId: '',
storage_useSessionStorage: ''
}
});
// *** Store data in local storage, with a cookie fallback ***
/* IE7 needs JSON library for JSON.stringify - (http://caniuse.com/#search=json)
if you need it, then include https://github.com/douglascrockford/JSON-js
@ -2859,8 +2872,12 @@
values = {},
c = table.config,
wo = c && c.widgetOptions,
storageType = ( options && options.useSessionStorage ) || ( wo && wo.storage_useSessionStorage ) ?
'sessionStorage' : 'localStorage',
storageType = (
( options && options.storageType ) || ( wo && wo.storage_storageType )
).toString().charAt(0).toLowerCase(),
// deprecating "useSessionStorage"; any storageType setting overrides it
session = storageType ? '' :
( options && options.useSessionStorage ) || ( wo && wo.storage_useSessionStorage ),
$table = $(table),
// id from (1) options ID, (2) table 'data-table-group' attribute, (3) widgetOptions.storage_tableId,
// (4) table ID, then (5) table index
@ -2872,17 +2889,10 @@
url = options && options.url ||
$table.attr(options && options.page || wo && wo.storage_page || 'data-table-page') ||
wo && wo.storage_fixedUrl || c && c.fixedUrl || window.location.pathname;
// update defaults for validator; these values must be falsy!
$.extend(true, ts.defaults, {
fixedUrl: '',
widgetOptions: {
storage_fixedUrl: '',
storage_group: '',
storage_page: '',
storage_tableId: '',
storage_useSessionStorage: ''
}
});
// skip if using cookies
if (storageType !== 'c') {
storageType = (storageType === 's' || session) ? 'sessionStorage' : 'localStorage';
// https://gist.github.com/paulirish/5558557
if (storageType in window) {
try {
@ -2895,6 +2905,10 @@
}
}
}
}
if (c.debug) {
console.log('Storage widget using', hasStorage ? storageType : 'cookies');
}
// *** get value ***
if ($.parseJSON) {
if (hasStorage) {
@ -3204,7 +3218,7 @@
})(jQuery);
/*! Widget: filter - updated 4/4/2017 (v2.28.7) *//*
/*! Widget: filter - updated 4/18/2017 (v2.28.8) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -4091,6 +4105,19 @@
tsf.checkFilters( table, filter, skipFirst );
}
},
equalFilters: function (c, filter1, filter2) {
var indx,
f1 = [],
f2 = [],
len = c.columns + 1; // add one to include anyMatch filter
filter1 = $.isArray(filter1) ? filter1 : [];
filter2 = $.isArray(filter2) ? filter2 : [];
for (indx = 0; indx < len; indx++) {
f1[indx] = filter1[indx] || '';
f2[indx] = filter2[indx] || '';
}
return f1.join(',') === f2.join(',');
},
checkFilters: function( table, filter, skipFirst ) {
var c = table.config,
wo = c.widgetOptions,
@ -4123,7 +4150,7 @@
}
// return if the last search is the same; but filter === false when updating the search
// see example-widget-filter.html filter toggle buttons
if ( c.lastSearch.join(',') === currentFilters.join(',') && filter !== false ) {
if ( tsf.equalFilters(c, c.lastSearch, currentFilters) && filter !== false ) {
return;
} else if ( filter === false ) {
// force filter refresh
@ -4472,7 +4499,7 @@
},
findRows: function( table, filters, currentFilters ) {
if (
table.config.lastSearch.join(',') === ( currentFilters || [] ).join(',') ||
tsf.equalFilters(table.config, table.config.lastSearch, currentFilters) ||
!table.config.widgetOptions.filter_initialized
) {
return;
@ -5017,7 +5044,8 @@
if ( ( getRaw !== true && wo && !wo.filter_columnFilters ) ||
// setFilters called, but last search is exactly the same as the current
// fixes issue #733 & #903 where calling update causes the input values to reset
( $.isArray(setFilters) && setFilters.join(',') === c.lastSearch.join(',') ) ) {
( $.isArray(setFilters) && tsf.equalFilters(c, setFilters, c.lastSearch) )
) {
return $( table ).data( 'lastSearch' ) || [];
}
if ( c ) {
@ -5402,7 +5430,7 @@
})(jQuery, window);
/*! Widget: resizable - updated 1/28/2017 (v2.28.5) */
/*! Widget: resizable - updated 4/18/2017 (v2.28.8) */
/*jshint browser:true, jquery:true, unused:false */
;(function ($, window) {
'use strict';
@ -5567,6 +5595,10 @@
tableHeight += $this.filter('[style*="height"]').length ? $this.height() : $this.children('table').height();
});
}
if ( !wo.resizable_includeFooter && c.$table.children('tfoot').length ) {
tableHeight -= c.$table.children('tfoot').height();
}
// subtract out table left position from resizable handles. Fixes #864
startPosition = c.$table.position().left;
$handles.each( function() {
@ -5737,10 +5769,10 @@
options: {
resizable : true, // save column widths to storage
resizable_addLastColumn : false,
resizable_includeFooter: true,
resizable_widths : [],
resizable_throttle : false, // set to true (5ms) or any number 0-10 range
resizable_targetLast : false,
resizable_fullWidth : null
resizable_targetLast : false
},
init: function(table, thisWidget, c, wo) {
ts.resizable.init( c, wo );

View File

@ -1,4 +1,4 @@
/*! TableSorter (FORK) v2.28.7 *//*
/*! TableSorter (FORK) v2.28.8 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -22,7 +22,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.28.7',
version : '2.28.8',
parsers : [],
widgets : [],
@ -1307,7 +1307,7 @@
cell = $cell[ 0 ]; // in case cell is a jQuery object
// tbody may not exist if update is initialized while tbody is removed for processing
if ( $tbodies.length && tbodyIndex >= 0 ) {
row = $tbodies.eq( tbodyIndex ).find( 'tr' ).index( $row );
row = $tbodies.eq( tbodyIndex ).find( 'tr' ).not( '.' + c.cssChildRow ).index( $row );
cache = tbcache.normalized[ row ];
len = $row[ 0 ].cells.length;
if ( len !== c.columns ) {
@ -1328,7 +1328,6 @@
cache[ c.columns ].raw[ icell ] = tmp;
tmp = ts.getParsedText( c, cell, icell, tmp );
cache[ icell ] = tmp; // parsed
cache[ c.columns ].$row = $row;
if ( ( c.parsers[ icell ].type || '' ).toLowerCase() === 'numeric' ) {
// update column max value (ignore sign)
tbcache.colMax[ icell ] = Math.max( Math.abs( tmp ) || 0, tbcache.colMax[ icell ] || 0 );

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 04-04-2017 (v2.28.7)*/
/*! tablesorter (FORK) - updated 04-18-2017 (v2.28.8)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -16,12 +16,26 @@
}
}(function(jQuery) {
/*! Widget: storage - updated 11/26/2016 (v2.28.0) */
/*! Widget: storage - updated 4/18/2017 (v2.28.8) */
/*global JSON:false */
;(function ($, window, document) {
'use strict';
var ts = $.tablesorter || {};
// update defaults for validator; these values must be falsy!
$.extend(true, ts.defaults, {
fixedUrl: '',
widgetOptions: {
storage_fixedUrl: '',
storage_group: '',
storage_page: '',
storage_storageType: '',
storage_tableId: '',
storage_useSessionStorage: ''
}
});
// *** Store data in local storage, with a cookie fallback ***
/* IE7 needs JSON library for JSON.stringify - (http://caniuse.com/#search=json)
if you need it, then include https://github.com/douglascrockford/JSON-js
@ -48,8 +62,12 @@
values = {},
c = table.config,
wo = c && c.widgetOptions,
storageType = ( options && options.useSessionStorage ) || ( wo && wo.storage_useSessionStorage ) ?
'sessionStorage' : 'localStorage',
storageType = (
( options && options.storageType ) || ( wo && wo.storage_storageType )
).toString().charAt(0).toLowerCase(),
// deprecating "useSessionStorage"; any storageType setting overrides it
session = storageType ? '' :
( options && options.useSessionStorage ) || ( wo && wo.storage_useSessionStorage ),
$table = $(table),
// id from (1) options ID, (2) table 'data-table-group' attribute, (3) widgetOptions.storage_tableId,
// (4) table ID, then (5) table index
@ -61,17 +79,10 @@
url = options && options.url ||
$table.attr(options && options.page || wo && wo.storage_page || 'data-table-page') ||
wo && wo.storage_fixedUrl || c && c.fixedUrl || window.location.pathname;
// update defaults for validator; these values must be falsy!
$.extend(true, ts.defaults, {
fixedUrl: '',
widgetOptions: {
storage_fixedUrl: '',
storage_group: '',
storage_page: '',
storage_tableId: '',
storage_useSessionStorage: ''
}
});
// skip if using cookies
if (storageType !== 'c') {
storageType = (storageType === 's' || session) ? 'sessionStorage' : 'localStorage';
// https://gist.github.com/paulirish/5558557
if (storageType in window) {
try {
@ -84,6 +95,10 @@
}
}
}
}
if (c.debug) {
console.log('Storage widget using', hasStorage ? storageType : 'cookies');
}
// *** get value ***
if ($.parseJSON) {
if (hasStorage) {
@ -393,7 +408,7 @@
})(jQuery);
/*! Widget: filter - updated 4/4/2017 (v2.28.7) *//*
/*! Widget: filter - updated 4/18/2017 (v2.28.8) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -1280,6 +1295,19 @@
tsf.checkFilters( table, filter, skipFirst );
}
},
equalFilters: function (c, filter1, filter2) {
var indx,
f1 = [],
f2 = [],
len = c.columns + 1; // add one to include anyMatch filter
filter1 = $.isArray(filter1) ? filter1 : [];
filter2 = $.isArray(filter2) ? filter2 : [];
for (indx = 0; indx < len; indx++) {
f1[indx] = filter1[indx] || '';
f2[indx] = filter2[indx] || '';
}
return f1.join(',') === f2.join(',');
},
checkFilters: function( table, filter, skipFirst ) {
var c = table.config,
wo = c.widgetOptions,
@ -1312,7 +1340,7 @@
}
// return if the last search is the same; but filter === false when updating the search
// see example-widget-filter.html filter toggle buttons
if ( c.lastSearch.join(',') === currentFilters.join(',') && filter !== false ) {
if ( tsf.equalFilters(c, c.lastSearch, currentFilters) && filter !== false ) {
return;
} else if ( filter === false ) {
// force filter refresh
@ -1661,7 +1689,7 @@
},
findRows: function( table, filters, currentFilters ) {
if (
table.config.lastSearch.join(',') === ( currentFilters || [] ).join(',') ||
tsf.equalFilters(table.config, table.config.lastSearch, currentFilters) ||
!table.config.widgetOptions.filter_initialized
) {
return;
@ -2206,7 +2234,8 @@
if ( ( getRaw !== true && wo && !wo.filter_columnFilters ) ||
// setFilters called, but last search is exactly the same as the current
// fixes issue #733 & #903 where calling update causes the input values to reset
( $.isArray(setFilters) && setFilters.join(',') === c.lastSearch.join(',') ) ) {
( $.isArray(setFilters) && tsf.equalFilters(c, setFilters, c.lastSearch) )
) {
return $( table ).data( 'lastSearch' ) || [];
}
if ( c ) {
@ -2591,7 +2620,7 @@
})(jQuery, window);
/*! Widget: resizable - updated 1/28/2017 (v2.28.5) */
/*! Widget: resizable - updated 4/18/2017 (v2.28.8) */
/*jshint browser:true, jquery:true, unused:false */
;(function ($, window) {
'use strict';
@ -2756,6 +2785,10 @@
tableHeight += $this.filter('[style*="height"]').length ? $this.height() : $this.children('table').height();
});
}
if ( !wo.resizable_includeFooter && c.$table.children('tfoot').length ) {
tableHeight -= c.$table.children('tfoot').height();
}
// subtract out table left position from resizable handles. Fixes #864
startPosition = c.$table.position().left;
$handles.each( function() {
@ -2926,10 +2959,10 @@
options: {
resizable : true, // save column widths to storage
resizable_addLastColumn : false,
resizable_includeFooter: true,
resizable_widths : [],
resizable_throttle : false, // set to true (5ms) or any number 0-10 range
resizable_targetLast : false,
resizable_fullWidth : null
resizable_targetLast : false
},
init: function(table, thisWidget, c, wo) {
ts.resizable.init( c, wo );

View File

@ -1,4 +1,4 @@
/*! Widget: filter - updated 4/4/2017 (v2.28.7) *//*
/*! Widget: filter - updated 4/18/2017 (v2.28.8) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -885,6 +885,19 @@
tsf.checkFilters( table, filter, skipFirst );
}
},
equalFilters: function (c, filter1, filter2) {
var indx,
f1 = [],
f2 = [],
len = c.columns + 1; // add one to include anyMatch filter
filter1 = $.isArray(filter1) ? filter1 : [];
filter2 = $.isArray(filter2) ? filter2 : [];
for (indx = 0; indx < len; indx++) {
f1[indx] = filter1[indx] || '';
f2[indx] = filter2[indx] || '';
}
return f1.join(',') === f2.join(',');
},
checkFilters: function( table, filter, skipFirst ) {
var c = table.config,
wo = c.widgetOptions,
@ -917,7 +930,7 @@
}
// return if the last search is the same; but filter === false when updating the search
// see example-widget-filter.html filter toggle buttons
if ( c.lastSearch.join(',') === currentFilters.join(',') && filter !== false ) {
if ( tsf.equalFilters(c, c.lastSearch, currentFilters) && filter !== false ) {
return;
} else if ( filter === false ) {
// force filter refresh
@ -1266,7 +1279,7 @@
},
findRows: function( table, filters, currentFilters ) {
if (
table.config.lastSearch.join(',') === ( currentFilters || [] ).join(',') ||
tsf.equalFilters(table.config, table.config.lastSearch, currentFilters) ||
!table.config.widgetOptions.filter_initialized
) {
return;
@ -1811,7 +1824,8 @@
if ( ( getRaw !== true && wo && !wo.filter_columnFilters ) ||
// setFilters called, but last search is exactly the same as the current
// fixes issue #733 & #903 where calling update causes the input values to reset
( $.isArray(setFilters) && setFilters.join(',') === c.lastSearch.join(',') ) ) {
( $.isArray(setFilters) && tsf.equalFilters(c, setFilters, c.lastSearch) )
) {
return $( table ).data( 'lastSearch' ) || [];
}
if ( c ) {

View File

@ -1,4 +1,4 @@
/*! Widget: Pager - updated 4/2/2017 (v2.28.6) */
/*! Widget: Pager - updated 4/18/2017 (v2.28.8) */
/* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -249,10 +249,15 @@
.off( namespace )
.on( 'filterInit filterStart '.split( ' ' ).join( namespace + ' ' ), function( e, filters ) {
p.currentFilters = $.isArray( filters ) ? filters : c.$table.data( 'lastSearch' );
var filtersEqual;
if (ts.filter.equalFilters) {
filtersEqual = ts.filter.equalFilters(c, c.lastSearch, p.currentFilters);
} else {
// will miss filter changes of the same value in a different column, see #1363
filtersEqual = ( c.lastSearch || [] ).join( '' ) !== ( p.currentFilters || [] ).join( '' );
}
// don't change page if filters are the same (pager updating, etc)
if ( e.type === 'filterStart' && wo.pager_pageReset !== false &&
( c.lastSearch || [] ).join( ',' ) !== ( p.currentFilters || [] ).join( ',' )
) {
if ( e.type === 'filterStart' && wo.pager_pageReset !== false && !filtersEqual ) {
p.page = wo.pager_pageReset; // fixes #456 & #565
}
})

View File

@ -1,4 +1,4 @@
/*! Widget: resizable - updated 1/28/2017 (v2.28.5) */
/*! Widget: resizable - updated 4/18/2017 (v2.28.8) */
/*jshint browser:true, jquery:true, unused:false */
;(function ($, window) {
'use strict';
@ -163,6 +163,10 @@
tableHeight += $this.filter('[style*="height"]').length ? $this.height() : $this.children('table').height();
});
}
if ( !wo.resizable_includeFooter && c.$table.children('tfoot').length ) {
tableHeight -= c.$table.children('tfoot').height();
}
// subtract out table left position from resizable handles. Fixes #864
startPosition = c.$table.position().left;
$handles.each( function() {
@ -333,10 +337,10 @@
options: {
resizable : true, // save column widths to storage
resizable_addLastColumn : false,
resizable_includeFooter: true,
resizable_widths : [],
resizable_throttle : false, // set to true (5ms) or any number 0-10 range
resizable_targetLast : false,
resizable_fullWidth : null
resizable_targetLast : false
},
init: function(table, thisWidget, c, wo) {
ts.resizable.init( c, wo );

View File

@ -1,4 +1,4 @@
/*! Widget: scroller - updated 1/28/2017 (v2.28.5) *//*
/*! Widget: scroller - updated 4/18/2017 (v2.28.8) *//*
Copyright (C) 2011 T. Connell & Associates, Inc.
Dual-licensed under the MIT and GPL licenses
@ -113,7 +113,7 @@
when height < max height (filtering) */
'.' + tscss.scrollerTable + ' { position: relative; overflow: auto; }' +
'.' + tscss.scrollerTable + ' table.' + tscss.table +
' { border-top: 0; margin-top: 0; margin-bottom: 0; overflow: hidden; }' +
' { border-top: 0; margin-top: 0; margin-bottom: 0; overflow: hidden; max-width: initial; }' +
/* hide footer in original table */
'.' + tscss.scrollerTable + ' tfoot, .' + tscss.scrollerHideElement + ', .' + tscss.scrollerHideColumn +
' { display: none; }' +
@ -365,7 +365,7 @@
resize : function( c, wo ) {
if ( wo.scroller_isBusy ) { return; }
var index, borderWidth, setWidth, $headers, $this, temp,
var index, borderWidth, setWidth, $headers, $this,
tsScroller = ts.scroller,
$container = wo.scroller_$container,
$table = c.$table,
@ -378,7 +378,9 @@
// Hide other scrollers so we can resize
$div = $( 'div.' + tscss.scrollerWrap + '[id!="' + id + '"]' )
.addClass( tscss.scrollerHideElement ),
row = '<tr class="' + tscss.scrollerSpacerRow + ' ' + c.selectorRemove.slice(1) + '">';
temp = 'padding:0;margin:0;border:0;height:0;max-height:0;min-height:0;',
row = '<tr class="' + tscss.scrollerSpacerRow + ' ' + c.selectorRemove.slice(1) +
'" style="' + temp + '">';
wo.scroller_calcWidths = [];
@ -417,22 +419,22 @@
setWidth = $this.width();
}
}
row += '<td data-column="' + index + '" style="padding:0;margin:0;border:0;height:0;max-height:0;' +
'min-height:0;width:' + setWidth + 'px;min-width:' + setWidth + 'px;max-width:' + setWidth + 'px"></td>';
row += '<td data-column="' + index + '" style="' + temp + 'width:' + setWidth +
'px;min-width:' + setWidth + 'px;max-width:' + setWidth + 'px"></td>';
// save current widths
wo.scroller_calcWidths[ index ] = setWidth;
}
row += '</tr>';
c.$tbodies.eq(0).prepend( row ); // tbody
c.$tbodies.eq(0).append( row ); // tbody
$hdr.children( 'thead' ).append( row );
$foot.children( 'tfoot' ).append( row );
// include colgroup or alignment is off
ts.fixColumnWidth( c.table );
row = c.$table.children( 'colgroup' )[0].outerHTML;
$hdr.prepend( row );
$foot.prepend( row );
$hdr.append( row );
$foot.append( row );
temp = $tableWrap.parent().innerWidth() -
( tsScroller.hasScrollBar( $tableWrap ) ? wo.scroller_barSetWidth : 0 );

View File

@ -1,9 +1,23 @@
/*! Widget: storage - updated 11/26/2016 (v2.28.0) */
/*! Widget: storage - updated 4/18/2017 (v2.28.8) */
/*global JSON:false */
;(function ($, window, document) {
'use strict';
var ts = $.tablesorter || {};
// update defaults for validator; these values must be falsy!
$.extend(true, ts.defaults, {
fixedUrl: '',
widgetOptions: {
storage_fixedUrl: '',
storage_group: '',
storage_page: '',
storage_storageType: '',
storage_tableId: '',
storage_useSessionStorage: ''
}
});
// *** Store data in local storage, with a cookie fallback ***
/* IE7 needs JSON library for JSON.stringify - (http://caniuse.com/#search=json)
if you need it, then include https://github.com/douglascrockford/JSON-js
@ -30,8 +44,12 @@
values = {},
c = table.config,
wo = c && c.widgetOptions,
storageType = ( options && options.useSessionStorage ) || ( wo && wo.storage_useSessionStorage ) ?
'sessionStorage' : 'localStorage',
storageType = (
( options && options.storageType ) || ( wo && wo.storage_storageType )
).toString().charAt(0).toLowerCase(),
// deprecating "useSessionStorage"; any storageType setting overrides it
session = storageType ? '' :
( options && options.useSessionStorage ) || ( wo && wo.storage_useSessionStorage ),
$table = $(table),
// id from (1) options ID, (2) table 'data-table-group' attribute, (3) widgetOptions.storage_tableId,
// (4) table ID, then (5) table index
@ -43,17 +61,10 @@
url = options && options.url ||
$table.attr(options && options.page || wo && wo.storage_page || 'data-table-page') ||
wo && wo.storage_fixedUrl || c && c.fixedUrl || window.location.pathname;
// update defaults for validator; these values must be falsy!
$.extend(true, ts.defaults, {
fixedUrl: '',
widgetOptions: {
storage_fixedUrl: '',
storage_group: '',
storage_page: '',
storage_tableId: '',
storage_useSessionStorage: ''
}
});
// skip if using cookies
if (storageType !== 'c') {
storageType = (storageType === 's' || session) ? 'sessionStorage' : 'localStorage';
// https://gist.github.com/paulirish/5558557
if (storageType in window) {
try {
@ -66,6 +77,10 @@
}
}
}
}
if (c.debug) {
console.log('Storage widget using', hasStorage ? storageType : 'cookies');
}
// *** get value ***
if ($.parseJSON) {
if (hasStorage) {

View File

@ -1,7 +1,7 @@
{
"name": "tablesorter",
"title": "tablesorter",
"version": "2.28.7",
"version": "2.28.8",
"description": "tablesorter (FORK) is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.",
"author": {
"name": "Christian Bach",
@ -52,13 +52,13 @@
"devDependencies": {
"grunt": "^1.0.1",
"grunt-cli": "^1.2.0",
"grunt-contrib-clean": "^1.0.0",
"grunt-contrib-clean": "^1.1.0",
"grunt-contrib-concat": "^1.0.1",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-cssmin": "^2.0.0",
"grunt-contrib-cssmin": "^2.1.0",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-qunit": "^1.3.0",
"grunt-contrib-uglify": "^2.2.1",
"grunt-contrib-qunit": "^2.0.0",
"grunt-contrib-uglify": "^2.3.0",
"grunt-contrib-watch": "^1.0.0",
"grunt-htmlhint": "^0.9.13",
"grunt-jscs": "^3.0.1",

View File

@ -1,7 +1,7 @@
{
"name": "tablesorter",
"title": "tablesorter",
"version": "2.28.7",
"version": "2.28.8",
"description": "tablesorter is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.\n\nThis forked version adds lots of new enhancements including: alphanumeric sorting, pager callback functons, multiple widgets providing column styling, ui theme application, sticky headers, column filters and resizer, as well as extended documentation with a lot more demos.",
"author": {
"name": "Christian Bach",

View File

@ -3,10 +3,10 @@
<head>
<meta charset="utf-8">
<title>Tablesorter Testing (WIP)</title>
<link rel="stylesheet" href="testing/qunit-2.1.1.css">
<link rel="stylesheet" href="testing/qunit-2.3.1.css">
<link rel="stylesheet" href="testing/testing.css">
<script src="testing/qunit-2.1.1.js"></script>
<script src="testing/qunit-2.3.1.js"></script>
<script src="docs/js/jquery-latest.min.js"></script>
<script src="js/jquery.tablesorter.js"></script>
<script src="js/widgets/widget-filter.js"></script>

View File

@ -1,12 +1,12 @@
/*!
* QUnit 2.1.1
* QUnit 2.3.1
* https://qunitjs.com/
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2017-01-06T01:52Z
* Date: 2017-04-10T19:56Z
*/
/** Font Family and Sizes */
@ -236,7 +236,7 @@
}
#qunit-tests.hidepass li.running,
#qunit-tests.hidepass li.pass {
#qunit-tests.hidepass li.pass:not(.todo) {
visibility: hidden;
position: absolute;
width: 0;
@ -384,6 +384,7 @@
background-color: #EBECE9;
}
#qunit-tests .qunit-todo-label,
#qunit-tests .qunit-skipped-label {
background-color: #F4FF77;
display: inline-block;
@ -394,6 +395,10 @@
margin: -0.4em 0.4em -0.4em 0;
}
#qunit-tests .qunit-todo-label {
background-color: #EEE;
}
/** Result */
#qunit-testresult {

File diff suppressed because it is too large Load Diff

View File

@ -192,6 +192,25 @@ jQuery(function($){
assert.deepEqual( processFilters( filters, false ), results );
});
QUnit.test( 'Filter comparison', function(assert) {
assert.expect(10);
var undef,
c = { columns: 10 }, // psuedo table.config
compare = this.ts.filter.equalFilters;
assert.equal( compare( c, [], [] ), true, 'two empty arrays' );
assert.equal( compare( c, [], '' ), true, 'empty array + empty string' );
assert.equal( compare( c, '', [] ), true, 'empty string + empty array' );
assert.equal( compare( c, ['', '', ''], [] ), true, 'empty array len 3 vs len 0' );
assert.equal( compare( c, ['1', undef, ''], ['1'] ), true, 'equal but diff len' );
assert.equal( compare( c, [undef, '1', ''], [undef, '1'] ), true, 'equal but diff len' );
assert.equal( compare( c, [] ), true, 'undefined second filter' );
assert.equal( compare( c, ['', undef] ), true, 'undefined second filter' );
assert.equal( compare( c, ['1', '', ''], ['', '1', ''] ), false, 'same value diff position' );
assert.equal( compare( c, [undef, '1', ''], ['', undef, '1'] ), false, 'same value diff position' );
});
QUnit.test( 'Filter searches', function(assert) {
var ts = this.ts,
c = this.c,