Fix lint issues & version bump

This commit is contained in:
Rob Garrison 2016-11-26 19:40:00 -06:00
parent 5a6d0ae3cb
commit 920dd01baa
33 changed files with 300 additions and 110 deletions

View File

@ -102,6 +102,36 @@ If you would like to contribute, please...
View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes).
#### <a name="v2.28.0">Version 2.28.0</a> (11/27/2016)
* Core:
* Return value from `getColumnData` if not an object.
* Include extra headers when adding unsorted class. Fixes [issue #1306](https://github.com/Mottie/tablesorter/issues/1306).
* Add option validator. Fixes [issue #1319](https://github.com/Mottie/tablesorter/issues/1319).
* Maintain original settings on `resetToLoadState`.
* Docs:
* Add missing colon in CSS. Fixes [issue #1307](https://github.com/Mottie/tablesorter/issues/1307).
* Add notes on `sortList` overridding `sortForce` & `sortAppend`. See [issue #1286](https://github.com/Mottie/tablesorter/issues/1286).
* Update sortTbody widget demo showing new option.
* Add zebra widget to sort reset demo.
* Define a triggered "update". Fixes [issue #1317](https://github.com/Mottie/tablesorter/issues/1317).
* Clarify recalculation update method. Fixes [issue #1317](https://github.com/Mottie/tablesorter/issues/1317).
* Explain difference between `#` and `0` in the math mask. Fixes [issue #1320](https://github.com/Mottie/tablesorter/issues/1320).
* Add link to disable thead row example. Fixes [issue #1326](https://github.com/Mottie/tablesorter/issues/1326).
* Filter:
* Restore `filter_searchDelay` function. Fixes [issue #1299](https://github.com/Mottie/tablesorter/issues/1299).
* Grouping:
* Fix insertion of group header before child rows. See [pull #1301](https://github.com/Mottie/tablesorter/pull/1301); thanks [@babaevmm](https://github.com/babaevmm)! Also fixes [issue #1325](https://github.com/Mottie/tablesorter/issues/1325).
* Math:
* Fix prefix/suffix option names & processing. Fixes [issue #1305](https://github.com/Mottie/tablesorter/issues/1305).
* Remove `math_prefix` content prior to parsing cell values.
* Pager:
* Set `ariaDisabled` property to stop MS Edge crash. Fixes [issue #1303](https://github.com/Mottie/tablesorter/issues/1303).
* Restore settings on `resetToLoadState`. Fixes [issue #1311](https://github.com/Mottie/tablesorter/issues/1311).
* Tbodysort:
* Add `sortTbody_lockHead` option. See [pull #1312](https://github.com/Mottie/tablesorter/pull/1312); thanks [@ChrisM-Rogers](https://github.com/ChrisM-Rogers)!
* Add `sortTbody_lockHead` to default options.
#### <a name="v2.27.8">Version 2.27.8</a> (9/28/2016)
* Core: minor code cleanup.
@ -127,24 +157,3 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C
* RepeatHeaders:
* Repeat HTML content instead of only text. See [pull #1282](https://github.com/Mottie/tablesorter/pull/1282); thanks [@Milania1](https://github.com/Milania1)!
* Testing: update jQuery usage.
#### <a name="v2.27.6">Version 2.27.6</a> (9/1/2016)
* Core: `textSorter` option now accepts class names. See [Stackoverflow](http://stackoverflow.com/q/39259954/145346).
* Docs:
* Update `emptyTo` demo. See [issue #1278](https://github.com/Mottie/tablesorter/issues/1278).
* Add `$.tablesorter.defaults` variable.
* Grouping: Add `"group-date-hour"` group type; added to demo.
* Mark:
* Apply marks after pager completes. See [issue #1243](https://github.com/Mottie/tablesorter/issues/1243).
* Add `mark_tsIgnore` option. See [issue #1243](https://github.com/Mottie/tablesorter/issues/1243).
* Parser: Header checkbox remains unchecked when table is hidden. Fixes [issue #1090](https://github.com/Mottie/tablesorter/issues/1090).
* Pager Custom Controls (beta)
* Prevent out-of-range page numbers. Fixes [issue #1276](https://github.com/Mottie/tablesorter/issues/1276).
* Allow settings `ends` and/or `aroundCurrent` to zero. See [issue #1276](https://github.com/Mottie/tablesorter/issues/1276).
* Spacer settings now include wrapper element (a `<span>` by default).
* Keyboard use changes.
* A pager element must now be focused before keyboard keys work.
* Keyboard keys now include left, right, up, down, pageUp, pageDown,
home, or end.
* `pageKeyStep` option added. Number of pages to skip with pageUp or pageDown.

View File

@ -1,6 +1,6 @@
/*!
* tablesorter (FORK) pager plugin
* updated 9/23/2016 (v2.27.7)
* updated 11/26/2016 (v2.28.0)
*/
/*jshint browser:true, jquery:true, unused:false */
;(function($) {
@ -142,8 +142,8 @@
tmp.each(function(){
this.ariaDisabled = first;
});
tmp = p.$container.find(p.cssNext + ',' + p.cssLast)
tmp[ last ? a : r ](d)
tmp = p.$container.find(p.cssNext + ',' + p.cssLast);
tmp[ last ? a : r ](d);
tmp.each(function(){
this.ariaDisabled = last;
});

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 09-28-2016 (v2.27.8)*/
/*! tablesorter (FORK) - updated 11-26-2016 (v2.28.0)*/
/* 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.27.8 *//*
/*! TableSorter (FORK) v2.28.0 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -34,7 +34,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.27.8',
version : '2.28.0',
parsers : [],
widgets : [],
@ -128,7 +128,11 @@
headerList: [],
empties: {},
strings: {},
parsers: []
parsers: [],
// *** parser options for validator; values must be falsy!
globalize: 0,
imgAttr: 0
// removed: widgetZebra: { css: ['even', 'odd'] }
@ -302,6 +306,7 @@
ts.setupParsers( c );
// start total row count at zero
c.totalRows = 0;
ts.validateOptions( c );
// build the cache for the tbody cells
// delayInit will delay building the cache until the user starts a sort
if ( !c.delayInit ) { ts.buildCache( c ); }
@ -435,9 +440,11 @@
e.stopPropagation();
// remove all widgets
ts.removeWidget( this, true, false );
var tmp = $.extend( true, {}, c.originalSettings );
// restore original settings; this clears out current settings, but does not clear
// values saved to storage.
c = $.extend( true, ts.defaults, c.originalSettings );
c = $.extend( true, ts.defaults, tmp );
c.originalSettings = tmp;
this.hasInitialized = false;
// setup the entire table again
ts.setup( this, c );
@ -1080,6 +1087,7 @@
.removeClass( css.join( ' ' ) );
// remove all header information
c.$headers
.add( $( 'thead ' + c.namespace + '_extra_headers' ) )
.removeClass( css.join( ' ' ) )
.addClass( none )
.attr( 'aria-sort', 'none' )
@ -1922,6 +1930,8 @@
widget = ts.getWidgetById( c.widgets[ indx ] );
if ( widget && widget.options ) {
c.widgetOptions = $.extend( true, {}, widget.options, c.widgetOptions );
// add widgetOptions to defaults for option validator
$.extend( true, ts.defaults.widgetOptions, widget.options );
}
}
}
@ -2294,7 +2304,9 @@
},
getColumnData : function( table, obj, indx, getCell, $headers ) {
if ( typeof obj === 'undefined' || obj === null ) { return; }
if ( typeof obj !== 'object' || obj === null ) {
return obj;
}
table = $( table )[ 0 ];
var $header, key,
c = table.config,
@ -2405,6 +2417,34 @@
return str;
},
validateOptions : function( c ) {
var setting, setting2, typ, timer,
// ignore options containing an array
ignore = 'sortForce sortList sortAppend widgets'.split( ' ' ),
orig = c.originalSettings;
if ( orig ) {
if ( c.debug ) {
timer = new Date();
}
for ( setting in orig ) {
typ = typeof ts.defaults[setting];
if ( typ === 'undefined' ) {
console.warn( 'Tablesorter Warning! "table.config.' + setting + '" option not recognized' );
} else if ( typ === 'object' ) {
for ( setting2 in orig[setting] ) {
typ = typeof ts.defaults[setting][setting2];
if ( $.inArray( setting, ignore ) < 0 && typ === 'undefined' ) {
console.warn( 'Tablesorter Warning! "table.config.' + setting + '.' + setting2 + '" option not recognized' );
}
}
}
}
if ( c.debug ) {
console.log( 'validate options time:' + ts.benchmark( timer ) );
}
}
},
// restore headers
restoreHeaders : function( table ) {
var index, $cell,
@ -2765,7 +2805,7 @@
})( jQuery );
/*! Widget: storage - updated 3/1/2016 (v2.25.5) */
/*! Widget: storage - updated 11/26/2016 (v2.28.0) */
/*global JSON:false */
;(function ($, window, document) {
'use strict';
@ -2810,6 +2850,17 @@
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: ''
}
});
// https://gist.github.com/paulirish/5558557
if (storageType in window) {
try {
@ -3131,7 +3182,7 @@
})(jQuery);
/*! Widget: filter - updated 9/23/2016 (v2.27.7) *//*
/*! Widget: filter - updated 11/26/2016 (v2.28.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -3960,11 +4011,15 @@
// include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
var column = parseInt( $( this ).attr( 'data-column' ), 10 ),
liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
wo.filter_liveSearch :
ts.getColumnData( table, wo.filter_liveSearch, column );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( table.config.widgetOptions.filter_initialized &&
( event.which === tskeyCodes.enter || event.type === 'search' ||
( event.type === 'change' || event.type === 'input' ) &&
( event.type === 'change' ||
( event.type === 'input' && liveSearch === true ) ) &&
this.value !== c.lastSearch[column] )
) {
event.preventDefault();

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
}
}(function(jQuery) {
/*! TableSorter (FORK) v2.27.8 *//*
/*! TableSorter (FORK) v2.28.0 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -32,7 +32,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.27.8',
version : '2.28.0',
parsers : [],
widgets : [],
@ -126,7 +126,11 @@
headerList: [],
empties: {},
strings: {},
parsers: []
parsers: [],
// *** parser options for validator; values must be falsy!
globalize: 0,
imgAttr: 0
// removed: widgetZebra: { css: ['even', 'odd'] }
@ -300,6 +304,7 @@
ts.setupParsers( c );
// start total row count at zero
c.totalRows = 0;
ts.validateOptions( c );
// build the cache for the tbody cells
// delayInit will delay building the cache until the user starts a sort
if ( !c.delayInit ) { ts.buildCache( c ); }
@ -433,9 +438,11 @@
e.stopPropagation();
// remove all widgets
ts.removeWidget( this, true, false );
var tmp = $.extend( true, {}, c.originalSettings );
// restore original settings; this clears out current settings, but does not clear
// values saved to storage.
c = $.extend( true, ts.defaults, c.originalSettings );
c = $.extend( true, ts.defaults, tmp );
c.originalSettings = tmp;
this.hasInitialized = false;
// setup the entire table again
ts.setup( this, c );
@ -1078,6 +1085,7 @@
.removeClass( css.join( ' ' ) );
// remove all header information
c.$headers
.add( $( 'thead ' + c.namespace + '_extra_headers' ) )
.removeClass( css.join( ' ' ) )
.addClass( none )
.attr( 'aria-sort', 'none' )
@ -1920,6 +1928,8 @@
widget = ts.getWidgetById( c.widgets[ indx ] );
if ( widget && widget.options ) {
c.widgetOptions = $.extend( true, {}, widget.options, c.widgetOptions );
// add widgetOptions to defaults for option validator
$.extend( true, ts.defaults.widgetOptions, widget.options );
}
}
}
@ -2292,7 +2302,9 @@
},
getColumnData : function( table, obj, indx, getCell, $headers ) {
if ( typeof obj === 'undefined' || obj === null ) { return; }
if ( typeof obj !== 'object' || obj === null ) {
return obj;
}
table = $( table )[ 0 ];
var $header, key,
c = table.config,
@ -2403,6 +2415,34 @@
return str;
},
validateOptions : function( c ) {
var setting, setting2, typ, timer,
// ignore options containing an array
ignore = 'sortForce sortList sortAppend widgets'.split( ' ' ),
orig = c.originalSettings;
if ( orig ) {
if ( c.debug ) {
timer = new Date();
}
for ( setting in orig ) {
typ = typeof ts.defaults[setting];
if ( typ === 'undefined' ) {
console.warn( 'Tablesorter Warning! "table.config.' + setting + '" option not recognized' );
} else if ( typ === 'object' ) {
for ( setting2 in orig[setting] ) {
typ = typeof ts.defaults[setting][setting2];
if ( $.inArray( setting, ignore ) < 0 && typ === 'undefined' ) {
console.warn( 'Tablesorter Warning! "table.config.' + setting + '.' + setting2 + '" option not recognized' );
}
}
}
}
if ( c.debug ) {
console.log( 'validate options time:' + ts.benchmark( timer ) );
}
}
},
// restore headers
restoreHeaders : function( table ) {
var index, $cell,

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 09-28-2016 (v2.27.8)*/
/*! tablesorter (FORK) - updated 11-26-2016 (v2.28.0)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -10,7 +10,7 @@
}
}(function(jQuery) {
/*! Widget: storage - updated 3/1/2016 (v2.25.5) */
/*! Widget: storage - updated 11/26/2016 (v2.28.0) */
/*global JSON:false */
;(function ($, window, document) {
'use strict';
@ -55,6 +55,17 @@
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: ''
}
});
// https://gist.github.com/paulirish/5558557
if (storageType in window) {
try {
@ -376,7 +387,7 @@
})(jQuery);
/*! Widget: filter - updated 9/23/2016 (v2.27.7) *//*
/*! Widget: filter - updated 11/26/2016 (v2.28.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -1205,11 +1216,15 @@
// include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
var column = parseInt( $( this ).attr( 'data-column' ), 10 ),
liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
wo.filter_liveSearch :
ts.getColumnData( table, wo.filter_liveSearch, column );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( table.config.widgetOptions.filter_initialized &&
( event.which === tskeyCodes.enter || event.type === 'search' ||
( event.type === 'change' || event.type === 'input' ) &&
( event.type === 'change' ||
( event.type === 'input' && liveSearch === true ) ) &&
this.value !== c.lastSearch[column] )
) {
event.preventDefault();

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! Parser: two digit year - updated 11/22/2015 (v2.24.6) */
!function(a){"use strict";var b=50,c=a.tablesorter,d=(new Date).getFullYear();c.dates||(c.dates={}),c.dates.regxxxxyy=/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{2})/,c.dates.regyyxxxx=/(\d{2})[\/\s](\d{1,2})[\/\s](\d{1,2})/,c.formatDate=function(a,c,e,f){if(a){var g,h,i=a.replace(/\s+/g," ").replace(/[-.,]/g,"/").replace(c,e),j=new Date(i);if(j instanceof Date&&isFinite(j)){for(g=j.getFullYear(),h=f&&f.config.dateRange||b;d-g>h;)g+=100;return j.setFullYear(g)}}return a},a.tablesorter.addParser({id:"ddmmyy",is:function(){return!1},format:function(a,b){return c.formatDate(a,c.dates.regxxxxyy,"$2/$1/19$3",b)},type:"numeric"}),a.tablesorter.addParser({id:"mmddyy",is:function(){return!1},format:function(a,b){return c.formatDate(a,c.dates.regxxxxyy,"$1/$2/19$3",b)},type:"numeric"}),a.tablesorter.addParser({id:"yymmdd",is:function(){return!1},format:function(a,b){return c.formatDate(a,c.dates.regyyxxxx,"$2/$3/19$1",b)},type:"numeric"})}(jQuery);
/*! Parser: two digit year - updated 11/26/2016 (v2.28.0) */
!function(a){"use strict";var b=50,c=a.tablesorter,d=(new Date).getFullYear();c.defaults.dataRange="",c.dates||(c.dates={}),c.dates.regxxxxyy=/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{2})/,c.dates.regyyxxxx=/(\d{2})[\/\s](\d{1,2})[\/\s](\d{1,2})/,c.formatDate=function(a,c,e,f){if(a){var g,h,i=a.replace(/\s+/g," ").replace(/[-.,]/g,"/").replace(c,e),j=new Date(i);if(j instanceof Date&&isFinite(j)){for(g=j.getFullYear(),h=f&&f.config.dateRange||b;d-g>h;)g+=100;return j.setFullYear(g)}}return a},a.tablesorter.addParser({id:"ddmmyy",is:function(){return!1},format:function(a,b){return c.formatDate(a,c.dates.regxxxxyy,"$2/$1/19$3",b)},type:"numeric"}),a.tablesorter.addParser({id:"mmddyy",is:function(){return!1},format:function(a,b){return c.formatDate(a,c.dates.regxxxxyy,"$1/$2/19$3",b)},type:"numeric"}),a.tablesorter.addParser({id:"yymmdd",is:function(){return!1},format:function(a,b){return c.formatDate(a,c.dates.regyyxxxx,"$2/$3/19$1",b)},type:"numeric"})}(jQuery);

View File

@ -1,2 +1,2 @@
/*! Parser: input & select - updated 9/1/2016 (v2.27.6) */
!function(a){"use strict";var b=function(a,b,c){};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(function(){if(a.fn.on){var c=function(a,b,c,d){a.toggleClass(b+"-"+c,d),(a[0].className||"").match(b+"-")?a.addClass(b):a.removeClass(b)},d=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 e=".parser-forms";a(this).children("tbody").off(e).on("mouseleave"+e,function(b){"TBODY"===b.target.nodeName&&a(":focus").blur()}).on("focus"+e,"select, input:not([type=checkbox]), textarea",function(){a(this).data("ts-original-value",this.value)}).on("blur"+e,"input:not([type=checkbox]), textarea",function(){this.value=a(this).data("ts-original-value")}).on("change keyup ".split(" ").join(e+" "),"select, input, textarea",function(e){if(27===e.which&&("INPUT"!==this.nodeName||"checkbox"!==this.type))return void(this.value=a(this).data("ts-original-value"));if("change"===e.type||"keyup"===e.type&&13===e.which&&("INPUT"===e.target.nodeName||"TEXTAREA"===e.target.nodeName&&e.altKey)){var f,g,h=a(e.target),i="checkbox"===e.target.type,j=h.closest("td"),k=j.closest("table"),l=j[0].cellIndex,m=k[0].config||!1,n=k.length&&k[0].tablesorterBusy,o=m&&m.$headerIndexed&&m.$headerIndexed[l]||[],p=i?e.target.checked:h.val();if(a.isEmptyObject(m)||n!==!1)return;if(i&&(g=m.checkboxClass||"checked",c(j.closest("tr"),g,l,p),d(k,g)),o.length&&(o.hasClass("parser-false")||o.hasClass("sorter-false")&&o.hasClass("filter-false"))||"change"===e.type&&m.table.isUpdating)return;(m&&p!==h.data("ts-original-value")||i)&&(h.data("ts-original-value",p),k[0].tablesorterBusy=!0,a.tablesorter.updateCell(m,j,f,function(){b(e,k,h),k[0].tablesorterBusy=!1}))}}),a(this).children("thead").find('input[type="checkbox"]')&&a(this).off(e).on("tablesorter-ready"+e,function(){var b,c=a(this),e=c.length&&c[0].config;a.isEmptyObject(e)||(this.tablesorterBusy=!0,b=e&&e.checkboxClass||"checked",d(c,b),this.tablesorterBusy=!1)}).children("thead").off(e).on("click"+e+" change"+e,'input[type="checkbox"]',function(e){var f,g,h,i,j,k,l=a(this),m=l.closest("table"),n=m.length&&m[0].config,o=this.checked;return!(!m.length||!n||m[0].tablesorterBusy)&&(h=parseInt(l.closest("td, th").attr("data-column"),10),j="checkbox"===n.parsers[h].id,g=m.length&&n.checkboxVisible,m[0].tablesorterBusy=!0,i=m.children("tbody").children("tr"+("undefined"==typeof g||g===!0?":visible":"")).children(":nth-child("+(h+1)+")").find('input[type="checkbox"]').prop("checked",o),k=n.checkboxClass||"checked",i.each(function(){c(a(this).closest("tr"),k,h,o)}),d(m,k),j?a.tablesorter.update(n,f,function(){b(e,m,i),m[0].tablesorterBusy=!1}):(b(e,m,i),m[0].tablesorterBusy=!1),!0)})})}})}(jQuery);
/*! Parser: input & select - updated 11/26/2016 (v2.28.0) */
!function(a){"use strict";var b=function(a,b,c){};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"}),ts.defaults.checkboxClass="",ts.defaults.checkboxVisible="",a(function(){if(a.fn.on){var c=function(a,b,c,d){a.toggleClass(b+"-"+c,d),(a[0].className||"").match(b+"-")?a.addClass(b):a.removeClass(b)},d=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 e=".parser-forms";a(this).children("tbody").off(e).on("mouseleave"+e,function(b){"TBODY"===b.target.nodeName&&a(":focus").blur()}).on("focus"+e,"select, input:not([type=checkbox]), textarea",function(){a(this).data("ts-original-value",this.value)}).on("blur"+e,"input:not([type=checkbox]), textarea",function(){this.value=a(this).data("ts-original-value")}).on("change keyup ".split(" ").join(e+" "),"select, input, textarea",function(e){if(27===e.which&&("INPUT"!==this.nodeName||"checkbox"!==this.type))return void(this.value=a(this).data("ts-original-value"));if("change"===e.type||"keyup"===e.type&&13===e.which&&("INPUT"===e.target.nodeName||"TEXTAREA"===e.target.nodeName&&e.altKey)){var f,g,h=a(e.target),i="checkbox"===e.target.type,j=h.closest("td"),k=j.closest("table"),l=j[0].cellIndex,m=k[0].config||!1,n=k.length&&k[0].tablesorterBusy,o=m&&m.$headerIndexed&&m.$headerIndexed[l]||[],p=i?e.target.checked:h.val();if(a.isEmptyObject(m)||n!==!1)return;if(i&&(g=m.checkboxClass||"checked",c(j.closest("tr"),g,l,p),d(k,g)),o.length&&(o.hasClass("parser-false")||o.hasClass("sorter-false")&&o.hasClass("filter-false"))||"change"===e.type&&m.table.isUpdating)return;(m&&p!==h.data("ts-original-value")||i)&&(h.data("ts-original-value",p),k[0].tablesorterBusy=!0,a.tablesorter.updateCell(m,j,f,function(){b(e,k,h),k[0].tablesorterBusy=!1}))}}),a(this).children("thead").find('input[type="checkbox"]')&&a(this).off(e).on("tablesorter-ready"+e,function(){var b,c=a(this),e=c.length&&c[0].config;a.isEmptyObject(e)||(this.tablesorterBusy=!0,b=e&&e.checkboxClass||"checked",d(c,b),this.tablesorterBusy=!1)}).children("thead").off(e).on("click"+e+" change"+e,'input[type="checkbox"]',function(e){var f,g,h,i,j,k,l=a(this),m=l.closest("table"),n=m.length&&m[0].config,o=this.checked;return!(!m.length||!n||m[0].tablesorterBusy)&&(h=parseInt(l.closest("td, th").attr("data-column"),10),j="checkbox"===n.parsers[h].id,g=m.length&&n.checkboxVisible,m[0].tablesorterBusy=!0,i=m.children("tbody").children("tr"+("undefined"==typeof g||g===!0?":visible":"")).children(":nth-child("+(h+1)+")").find('input[type="checkbox"]').prop("checked",o),k=n.checkboxClass||"checked",i.each(function(){c(a(this).closest("tr"),k,h,o)}),d(m,k),j?a.tablesorter.update(n,f,function(){b(e,m,i),m[0].tablesorterBusy=!1}):(b(e,m,i),m[0].tablesorterBusy=!1),!0)})})}})}(jQuery);

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

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,6 @@
/*! tablesorter tbody sorting widget (BETA) - 11/22/2015 (v2.24.6)
/*! tablesorter tbody sorting widget (BETA) - 11/26/2016 (v2.28.0)
* Requires tablesorter v2.22.2+ and jQuery 1.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)}),(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,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_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(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,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);

View File

@ -1,2 +1,2 @@
/*! Widget: storage - updated 3/1/2016 (v2.25.5) */
!function(a,b,c){"use strict";var d=a.tablesorter||{};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.useSessionStorage||n&&n.storage_useSessionStorage?"sessionStorage":"localStorage",p=a(d),q=g&&g.id||p.attr(g&&g.group||n&&n.storage_group||"data-table-group")||n&&n.storage_tableId||d.id||a(".tablesorter").index(p),r=g&&g.url||p.attr(g&&g.page||n&&n.storage_page||"data-table-page")||n&&n.storage_fixedUrl||m&&m.fixedUrl||b.location.pathname;if(o 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")}return 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")||{}:{})),"undefined"!=typeof f&&b.JSON&&JSON.hasOwnProperty("stringify")?(l[r]||(l[r]={}),l[r][q]=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=/"),void 0):l&&l[r]?l[r][q]:""}}(jQuery,window,document);
/*! 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")}return 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")||{}:{})),"undefined"!=typeof g&&b.JSON&&JSON.hasOwnProperty("stringify")?(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=/"),void 0):m&&m[s]?m[s][r]:""}}(jQuery,window,document);

View File

@ -461,7 +461,7 @@
<li><a href="example-widget-editable.html">Content editable widget</a> (v2.9; <span class="version updated">v2.25.5</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.27.5</span>):
<li><span class="results">&dagger;</span> Filter widget (<span class="version updated">v2.28.0</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>
@ -480,21 +480,21 @@
<li>Grouping rows widget:
<ul>
<li><a href="example-widget-grouping.html">basic</a> (v2.8; <span class="version updated">v2.27.6</span>).</li>
<li><a href="example-widget-grouping-filter-childrows.html">Grouping + filter + child rows</a> (<span class="updated version">v2.15.12</span>).</li>
<li><a href="example-widget-grouping-filter-childrows.html">Grouping + filter + child rows</a> (<span class="updated version">v2.28.0</span>).</li>
</ul>
</li>
<li><a href="example-widget-header-titles.html">Header titles widget</a> (v2.15.6; <span class="version updated">v2.24.4</span>).</li>
<li><span class="label label-info">Beta</span> <a href="example-widget-lazyload.html">Lazyload widget</a> (<span class="version">v2.24.0</span>; <span class="version updated">v2.25.7</span>).</li>
<li><a href="example-widget-mark.html">Mark widget</a> (<span class="version">v2.27.6</span>).</li>
<li><a href="example-widget-math.html">Math widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.27.0</span>).</li>
<li><a href="example-widget-math.html">Math widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.28.0</span>).</li>
<li>
<a href="example-widget-output.html">Output widget</a> (<span class="version">v2.16</span>; <span class="version updated">v2.27.0</span>).
<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.27.7</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.0</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.27.7</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.0</span>).<br>
<br>
</li>
@ -505,7 +505,7 @@
<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.27.0</span>).</li>
<li><span class="label label-info">Beta</span> <a href="example-widget-sort-to-hash.html">Sort-to-hash widget</a> (<span class="version">v2.22.4</span>; <span class="version updated">v2.24.4</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.27.9</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>
<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.27.0</span>).</li>

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 09-28-2016 (v2.27.8)*/
/*! tablesorter (FORK) - updated 11-26-2016 (v2.28.0)*/
/* 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.27.8 *//*
/*! TableSorter (FORK) v2.28.0 *//*
* Client-side table sorting with ease!
* @requires jQuery v1.2.6+
*
@ -40,7 +40,7 @@
'use strict';
var ts = $.tablesorter = {
version : '2.27.8',
version : '2.28.0',
parsers : [],
widgets : [],
@ -134,7 +134,11 @@
headerList: [],
empties: {},
strings: {},
parsers: []
parsers: [],
// *** parser options for validator; values must be falsy!
globalize: 0,
imgAttr: 0
// removed: widgetZebra: { css: ['even', 'odd'] }
@ -308,6 +312,7 @@
ts.setupParsers( c );
// start total row count at zero
c.totalRows = 0;
ts.validateOptions( c );
// build the cache for the tbody cells
// delayInit will delay building the cache until the user starts a sort
if ( !c.delayInit ) { ts.buildCache( c ); }
@ -441,9 +446,11 @@
e.stopPropagation();
// remove all widgets
ts.removeWidget( this, true, false );
var tmp = $.extend( true, {}, c.originalSettings );
// restore original settings; this clears out current settings, but does not clear
// values saved to storage.
c = $.extend( true, ts.defaults, c.originalSettings );
c = $.extend( true, ts.defaults, tmp );
c.originalSettings = tmp;
this.hasInitialized = false;
// setup the entire table again
ts.setup( this, c );
@ -1086,6 +1093,7 @@
.removeClass( css.join( ' ' ) );
// remove all header information
c.$headers
.add( $( 'thead ' + c.namespace + '_extra_headers' ) )
.removeClass( css.join( ' ' ) )
.addClass( none )
.attr( 'aria-sort', 'none' )
@ -1928,6 +1936,8 @@
widget = ts.getWidgetById( c.widgets[ indx ] );
if ( widget && widget.options ) {
c.widgetOptions = $.extend( true, {}, widget.options, c.widgetOptions );
// add widgetOptions to defaults for option validator
$.extend( true, ts.defaults.widgetOptions, widget.options );
}
}
}
@ -2300,7 +2310,9 @@
},
getColumnData : function( table, obj, indx, getCell, $headers ) {
if ( typeof obj === 'undefined' || obj === null ) { return; }
if ( typeof obj !== 'object' || obj === null ) {
return obj;
}
table = $( table )[ 0 ];
var $header, key,
c = table.config,
@ -2411,6 +2423,34 @@
return str;
},
validateOptions : function( c ) {
var setting, setting2, typ, timer,
// ignore options containing an array
ignore = 'sortForce sortList sortAppend widgets'.split( ' ' ),
orig = c.originalSettings;
if ( orig ) {
if ( c.debug ) {
timer = new Date();
}
for ( setting in orig ) {
typ = typeof ts.defaults[setting];
if ( typ === 'undefined' ) {
console.warn( 'Tablesorter Warning! "table.config.' + setting + '" option not recognized' );
} else if ( typ === 'object' ) {
for ( setting2 in orig[setting] ) {
typ = typeof ts.defaults[setting][setting2];
if ( $.inArray( setting, ignore ) < 0 && typ === 'undefined' ) {
console.warn( 'Tablesorter Warning! "table.config.' + setting + '.' + setting2 + '" option not recognized' );
}
}
}
}
if ( c.debug ) {
console.log( 'validate options time:' + ts.benchmark( timer ) );
}
}
},
// restore headers
restoreHeaders : function( table ) {
var index, $cell,
@ -2771,7 +2811,7 @@
})( jQuery );
/*! Widget: storage - updated 3/1/2016 (v2.25.5) */
/*! Widget: storage - updated 11/26/2016 (v2.28.0) */
/*global JSON:false */
;(function ($, window, document) {
'use strict';
@ -2816,6 +2856,17 @@
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: ''
}
});
// https://gist.github.com/paulirish/5558557
if (storageType in window) {
try {
@ -3137,7 +3188,7 @@
})(jQuery);
/*! Widget: filter - updated 9/23/2016 (v2.27.7) *//*
/*! Widget: filter - updated 11/26/2016 (v2.28.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -3966,11 +4017,15 @@
// include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
var column = parseInt( $( this ).attr( 'data-column' ), 10 ),
liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
wo.filter_liveSearch :
ts.getColumnData( table, wo.filter_liveSearch, column );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( table.config.widgetOptions.filter_initialized &&
( event.which === tskeyCodes.enter || event.type === 'search' ||
( event.type === 'change' || event.type === 'input' ) &&
( event.type === 'change' ||
( event.type === 'input' && liveSearch === true ) ) &&
this.value !== c.lastSearch[column] )
) {
event.preventDefault();

View File

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

View File

@ -4,7 +4,7 @@
*/
/*! tablesorter (FORK) - updated 09-28-2016 (v2.27.8)*/
/*! tablesorter (FORK) - updated 11-26-2016 (v2.28.0)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) {
if (typeof define === 'function' && define.amd) {
@ -16,7 +16,7 @@
}
}(function(jQuery) {
/*! Widget: storage - updated 3/1/2016 (v2.25.5) */
/*! Widget: storage - updated 11/26/2016 (v2.28.0) */
/*global JSON:false */
;(function ($, window, document) {
'use strict';
@ -61,6 +61,17 @@
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: ''
}
});
// https://gist.github.com/paulirish/5558557
if (storageType in window) {
try {
@ -382,7 +393,7 @@
})(jQuery);
/*! Widget: filter - updated 9/23/2016 (v2.27.7) *//*
/*! Widget: filter - updated 11/26/2016 (v2.28.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -1211,11 +1222,15 @@
// include change for select - fixes #473
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
// don't get cached data, in case data-column changes dynamically
var column = parseInt( $( this ).attr( 'data-column' ), 10 );
var column = parseInt( $( this ).attr( 'data-column' ), 10 ),
liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
wo.filter_liveSearch :
ts.getColumnData( table, wo.filter_liveSearch, column );
// don't allow 'change' event to process if the input value is the same - fixes #685
if ( table.config.widgetOptions.filter_initialized &&
( event.which === tskeyCodes.enter || event.type === 'search' ||
( event.type === 'change' || event.type === 'input' ) &&
( event.type === 'change' ||
( event.type === 'input' && liveSearch === true ) ) &&
this.value !== c.lastSearch[column] )
) {
event.preventDefault();

View File

@ -1,4 +1,4 @@
/*! Parser: two digit year - updated 11/22/2015 (v2.24.6) */
/*! Parser: two digit year - updated 11/26/2016 (v2.28.0) */
/* Demo: http://mottie.github.io/tablesorter/docs/example-parsers-dates.html */
/*jshint jquery:true */
;(function($){

View File

@ -1,4 +1,4 @@
/*! Parser: input & select - updated 9/1/2016 (v2.27.6) *//*
/*! Parser: input & select - updated 11/26/2016 (v2.28.0) *//*
* for jQuery 1.7+ & tablesorter 2.7.11+
* Demo: http://mottie.github.com/tablesorter/docs/example-widget-grouping.html
*/
@ -111,8 +111,8 @@
});
// update defaults for validator; values must be falsy
ts.defaults.checkboxClass = '';
ts.defaults.checkboxVisible = '';
$.tablesorter.defaults.checkboxClass = '';
$.tablesorter.defaults.checkboxVisible = '';
// update select and all input types in the tablesorter cache when the change event fires.
// This method only works with jQuery 1.7+

View File

@ -1,4 +1,4 @@
/*! Widget: Build Table - updated 3/26/2015 (v2.21.3) *//*
/*! Widget: Build Table - updated 11/26/2016 (v2.28.0) *//*
* for tableSorter v2.16.0+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! Widget: filter - updated 9/23/2016 (v2.27.7) *//*
/*! Widget: filter - updated 11/26/2016 (v2.28.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! Widget: grouping - updated 9/1/2016 (v2.27.6) *//*
/*! Widget: grouping - updated 11/26/2016 (v2.28.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/
@ -234,7 +234,7 @@
if ( $.isFunction( wo.group_formatter ) ) {
data.currentGroup = wo.group_formatter( ( data.group || '' ).toString(), data.column, c.table, c, wo, data ) || data.group;
}
//add first() for groping with childRows
// add first() for grouping with childRows
data.$row.first().before( tsg.groupHeaderHTML( c, wo, data ) );
if ( wo.group_saveGroups && !data.savedGroup && wo.group_collapsed && wo.group_collapsible ) {
// all groups start collapsed; data.groupIndex is 1 more than the expected index.

View File

@ -1,4 +1,4 @@
/*! Widget: math - updated 7/31/2016 (v2.27.0) *//*
/*! Widget: math - updated 11/26/2016 (v2.28.0) *//*
* Requires tablesorter v2.16+ and jQuery 1.7+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! Widget: Pager - updated 9/23/2016 (v2.27.7) */
/*! Widget: Pager - updated 11/26/2016 (v2.28.0) */
/* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison
*/

View File

@ -1,4 +1,4 @@
/*! tablesorter tbody sorting widget (BETA) - 11/07/2016 (v2.24.7)
/*! tablesorter tbody sorting widget (BETA) - 11/26/2016 (v2.28.0)
* Requires tablesorter v2.22.2+ and jQuery 1.4+
* by Rob Garrison
* Contributors: Chris Rogers

View File

@ -1,4 +1,4 @@
/*! Widget: storage - updated 3/1/2016 (v2.25.5) */
/*! Widget: storage - updated 11/26/2016 (v2.28.0) */
/*global JSON:false */
;(function ($, window, document) {
'use strict';

View File

@ -1,7 +1,7 @@
{
"name": "tablesorter",
"title": "tablesorter",
"version": "2.27.8",
"version": "2.28.0",
"description": "tablesorter (FORK) is a jQuery plugin for turning a standard HTML table with THEAD and TBODY tags into a sortable table without page refreshes. tablesorter can successfully parse and sort many types of data including linked data in a cell.",
"author": {
"name": "Christian Bach",

View File

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