This commit is contained in:
Rob Garrison 2017-09-27 21:07:28 -05:00
parent b3cde8c680
commit b6647faba5
30 changed files with 321 additions and 179 deletions

View File

@ -104,6 +104,45 @@ If you would like to contribute, please...
View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes). View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes).
#### <a name="v2.29.0">Version 2.29.0</a> (9/27/2017)
* Core:
* Include callback method for ["applyWidgets"](https://mottie.github.io/tablesorter/docs/index.html#applywidgets).
* Add ["widgetRemoveEnd" event](https://mottie.github.io/tablesorter/docs/index.html#widgetremoveend). Fixes [issue #1430](https://github.com/Mottie/tablesorter/issues/1430).
* Clarify warning message (widget enabled but code not loaded).
* Target header cells for data-column. Fixes [issue #1459](https://github.com/Mottie/tablesorter/issues/1459).
* ColumnSelector:
* Add [`classHasSpan` option](https://mottie.github.io/tablesorter/docs/example-widget-column-selector.html#column-selector-class-has-span).
* Fix compatibility with grouping widget.
* Grouping:
* Fix compatibility with columnSelector widget.
* Output:
* Modify internal `process` function to allow outputting of data without adding it to the table.
* Resizable:
* Add resizableComplete event. Fixes [issue #1444](https://github.com/Mottie/tablesorter/issues/1444).
* Scroller:
* Save position to fix `scroller_upAfterSort: false`; See [PR #1441](https://github.com/Mottie/tablesorter/pull/1441). This should fix [issue #1297](https://github.com/Mottie/tablesorter/issues/1297) - The current position is now saved on scroll so it can be restored after sorting; thanks [@lbodtke](https://github.com/lbodtke)!
* Update scroll position after fixing columns.
* Sort2Hash:
* Prevent sort2Hash from adding extraneous entries to browser history. Use `window.location.replace` to update the browser URL only, rather than `window.location.hash`, which modifies the browser history. See [PR #1447](https://github.com/Mottie/tablesorter/pull/1447); thanks [@alexweissman](https://github.com/alexweissman)!
* StickyHeaders:
* Only update class as needed. See [issue #1018](https://github.com/Mottie/tablesorter/issues/1018).
* Check horizontal scrolling. Fixes [issue #1455](https://github.com/Mottie/tablesorter/issues/1455).
* UITheme:
* Remove bootstrap v2 refs &amp; fix docs. See [issue #1432](https://github.com/Mottie/tablesorter/issues/1432).
* Docs:
* Miscellaneous fixes and updates.
* Add more info about zebra widget when the table is not visible. See [PR #1438](https://github.com/Mottie/tablesorter/pull/1438); thanks [@Federico-G](https://github.com/Federico-G)!
* Fix alignCharacter widget reference to css4.
* Update userfrosting link in the readme.
* Update to Bootstrap v4.0.0-beta.
* Fix colspan demo.
* Themes:
* Rename `icon-white` to `bootstrap-icon-white`. Fixes [issue #1432](https://github.com/Mottie/tablesorter/issues/1432).
* Meta:
* Update dependencies.
* Build: maintain ie8 support to fix [issue #1431](https://github.com/Mottie/tablesorter/issues/1431).
#### <a name="v2.28.15">Version 2.28.15</a> (7/4/2017) #### <a name="v2.28.15">Version 2.28.15</a> (7/4/2017)
* Core: * Core:
@ -137,15 +176,3 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C
* Use selectorRemove to remove error rows. Removes error rows with dynamically changed class names. * Use selectorRemove to remove error rows. Removes error rows with dynamically changed class names.
* Meta: * Meta:
* Added [AUTHORS](https://github.com/Mottie/tablesorter/blob/master/AUTHORS) file. * Added [AUTHORS](https://github.com/Mottie/tablesorter/blob/master/AUTHORS) file.
#### <a name="v2.28.13">Version 2.28.13</a> (6/2/2017)
* Core:
* Add cssIconDisabled option. See [issue #1409](https://github.com/Mottie/tablesorter/issues/1409).
* Coerce sort natural elements into strings. See [issue #1415](https://github.com/Mottie/tablesorter/issues/1415).
* StickyHeaders:
* Fix dynamic updating of offset. Fixes [issue #1412](https://github.com/Mottie/tablesorter/issues/1412).
* Init with visible headers on partial scroll
* Meta:
* Set jQuery dependency back to >=1.2.6. Fixes [issue #1411](https://github.com/Mottie/tablesorter/issues/1411).
* Add `package-lock.json` file.

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 07-04-2017 (v2.28.15)*/ /*! tablesorter (FORK) - updated 09-27-2017 (v2.29.0)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */ /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) { (function(factory) {
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
@ -10,7 +10,7 @@
} }
}(function(jQuery) { }(function(jQuery) {
/*! TableSorter (FORK) v2.28.15 *//* /*! TableSorter (FORK) v2.29.0 *//*
* Client-side table sorting with ease! * Client-side table sorting with ease!
* @requires jQuery v1.2.6+ * @requires jQuery v1.2.6+
* *
@ -34,7 +34,7 @@
'use strict'; 'use strict';
var ts = $.tablesorter = { var ts = $.tablesorter = {
version : '2.28.15', version : '2.29.0',
parsers : [], parsers : [],
widgets : [], widgets : [],
@ -433,10 +433,10 @@
e.stopPropagation(); e.stopPropagation();
ts.applyWidgetId( this, id ); ts.applyWidgetId( this, id );
}) })
.bind( 'applyWidgets' + namespace, function( e, init ) { .bind( 'applyWidgets' + namespace, function( e, callback ) {
e.stopPropagation(); e.stopPropagation();
// apply widgets // apply widgets (false = not initializing)
ts.applyWidget( this, init ); ts.applyWidget( this, false, callback );
}) })
.bind( 'refreshWidgets' + namespace, function( e, all, dontapply ) { .bind( 'refreshWidgets' + namespace, function( e, all, dontapply ) {
e.stopPropagation(); e.stopPropagation();
@ -473,9 +473,9 @@
downTarget = null; downTarget = null;
if ( core !== true ) { if ( core !== true ) {
$headers.addClass( namespace.slice( 1 ) + '_extra_headers' ); $headers.addClass( namespace.slice( 1 ) + '_extra_headers' );
tmp = $.fn.closest ? $headers.closest( 'table' )[ 0 ] : $headers.parents( 'table' )[ 0 ]; tmp = ts.getClosest( $headers, 'table' );
if ( tmp && tmp.nodeName === 'TABLE' && tmp !== table ) { if ( tmp.length && tmp[ 0 ].nodeName === 'TABLE' && tmp[ 0 ] !== table ) {
$( tmp ).addClass( namespace.slice( 1 ) + '_extra_table' ); $( tmp[ 0 ] ).addClass( namespace.slice( 1 ) + '_extra_table' );
} }
} }
tmp = ( c.pointerDown + ' ' + c.pointerUp + ' ' + c.pointerClick + ' sort keyup ' ) tmp = ( c.pointerDown + ' ' + c.pointerUp + ' ' + c.pointerClick + ' sort keyup ' )
@ -527,8 +527,7 @@
ts.buildCache( c ); ts.buildCache( c );
} }
// jQuery v1.2.6 doesn't have closest() // jQuery v1.2.6 doesn't have closest()
$cell = $.fn.closest ? $( this ).closest( 'th, td' ) : $cell = ts.getHeaderCell( $( this ) );
/TH|TD/.test( this.nodeName ) ? $( this ) : $( this ).parents( 'th, td' );
// reference original table headers and find the same cell // reference original table headers and find the same cell
// don't use $headers or IE8 throws an error - see #987 // don't use $headers or IE8 throws an error - see #987
temp = $headers.index( $cell ); temp = $headers.index( $cell );
@ -568,7 +567,7 @@
''; '';
// redefine c.$headers here in case of an updateAll that replaces or adds an entire header cell - see #683 // redefine c.$headers here in case of an updateAll that replaces or adds an entire header cell - see #683
c.$headers = $( $.map( c.$table.find( c.selectorHeaders ), function( elem, index ) { c.$headers = $( $.map( c.$table.find( c.selectorHeaders ), function( elem, index ) {
var configHeaders, header, column, template, tmp, var configHeaders, header, column, template, tmp, $th,
$elem = $( elem ); $elem = $( elem );
// ignore cell (don't add it to c.$headers) if row has ignoreRow class // ignore cell (don't add it to c.$headers) if row has ignoreRow class
if ( $elem.parent().hasClass( c.cssIgnoreRow ) ) { return; } if ( $elem.parent().hasClass( c.cssIgnoreRow ) ) { return; }
@ -594,7 +593,9 @@
if ( c.onRenderHeader ) { if ( c.onRenderHeader ) {
c.onRenderHeader.apply( $elem, [ index, c, c.$table ] ); c.onRenderHeader.apply( $elem, [ index, c, c.$table ] );
} }
column = parseInt( $elem.attr( 'data-column' ), 10 ); // data-column stored on th or td only
$th = ts.getHeaderCell( $elem );
column = parseInt( $th.attr( 'data-column' ), 10 );
elem.column = column; elem.column = column;
tmp = ts.getOrder( ts.getData( $elem, configHeaders, 'sortInitialOrder' ) || c.sortInitialOrder ); tmp = ts.getOrder( ts.getData( $elem, configHeaders, 'sortInitialOrder' ) || c.sortInitialOrder );
// this may get updated numerous times if there are multiple rows // this may get updated numerous times if there are multiple rows
@ -612,10 +613,9 @@
} }
// add cell to headerList // add cell to headerList
c.headerList[ index ] = elem; c.headerList[ index ] = elem;
$elem.addClass( ts.css.header + ' ' + c.cssHeader );
// add to parent in case there are multiple rows // add to parent in case there are multiple rows
$elem ts.getClosest( $elem, 'tr' )
.addClass( ts.css.header + ' ' + c.cssHeader )
.parent()
.addClass( ts.css.headerRow + ' ' + c.cssHeaderRow ) .addClass( ts.css.headerRow + ' ' + c.cssHeaderRow )
.attr( 'role', 'row' ); .attr( 'role', 'row' );
// allow keyboard cursor to focus on element // allow keyboard cursor to focus on element
@ -1173,10 +1173,29 @@
} }
}, },
// This function does NOT return closest if the $el matches the selector
getClosest : function( $el, selector ) {
return $.fn.closest ?
$el.closest( selector ) :
$el.parents( selector ).filter( ':first' );
},
getHeaderCell : function( $el ) {
// jQuery v1.2.6 doesn't have closest()
if ( $.fn.closest ) {
return $el.closest( 'th, td' );
}
return /TH|TD/.test( $el[0].nodeName ) ?
$el :
$el.parents( 'th, td' ).filter( ':first' );
},
// nextSort (optional), lets you disable next sort text // nextSort (optional), lets you disable next sort text
setColumnAriaLabel : function( c, $header, nextSort ) { setColumnAriaLabel : function( c, $header, nextSort ) {
if ( $header.length ) { if ( $header.length ) {
var column = parseInt( $header.attr( 'data-column' ), 10 ), var $th = ts.getHeaderCell( $header ),
// data-column always stored on the th/td
column = parseInt( $th.attr( 'data-column' ), 10 ),
vars = c.sortVars[ column ], vars = c.sortVars[ column ],
tmp = $header.hasClass( ts.css.sortAsc ) ? tmp = $header.hasClass( ts.css.sortAsc ) ?
'sortAsc' : 'sortAsc' :
@ -1334,10 +1353,9 @@
$cell = $( cell ), $cell = $( cell ),
// update cache - format: function( s, table, cell, cellIndex ) // update cache - format: function( s, table, cell, cellIndex )
// no closest in jQuery v1.2.6 // no closest in jQuery v1.2.6
tbodyIndex = $tbodies tbodyIndex = $tbodies.index( ts.getClosest( $cell, 'tbody' ) ),
.index( $.fn.closest ? $cell.closest( 'tbody' ) : $cell.parents( 'tbody' ).filter( ':first' ) ),
tbcache = c.cache[ tbodyIndex ], tbcache = c.cache[ tbodyIndex ],
$row = $.fn.closest ? $cell.closest( 'tr' ) : $cell.parents( 'tr' ).filter( ':first' ); $row = ts.getClosest( $cell, 'tr' );
cell = $cell[ 0 ]; // in case cell is a jQuery object cell = $cell[ 0 ]; // in case cell is a jQuery object
// tbody may not exist if update is initialized while tbody is removed for processing // tbody may not exist if update is initialized while tbody is removed for processing
if ( $tbodies.length && tbodyIndex >= 0 ) { if ( $tbodies.length && tbodyIndex >= 0 ) {
@ -1392,11 +1410,13 @@
if ( valid ) { if ( valid ) {
$row = $( $row ); $row = $( $row );
c.$tbodies.append( $row ); c.$tbodies.append( $row );
} else if ( !$row || } else if (
!$row ||
// row is a jQuery object? // row is a jQuery object?
!( $row instanceof jQuery ) || !( $row instanceof jQuery ) ||
// row contained in the table? // row contained in the table?
( $.fn.closest ? $row.closest( 'table' )[ 0 ] : $row.parents( 'table' )[ 0 ] ) !== c.table ) { ( ts.getClosest( $row, 'table' )[ 0 ] !== c.table )
) {
if ( c.debug ) { if ( c.debug ) {
console.error( 'addRows method requires (1) a jQuery selector reference to rows that have already ' + console.error( 'addRows method requires (1) a jQuery selector reference to rows that have already ' +
'been added to the table, or (2) row HTML string to be added to a table with only one tbody' ); 'been added to the table, or (2) row HTML string to be added to a table with only one tbody' );
@ -1543,10 +1563,10 @@
notMultiSort = !event[ c.sortMultiSortKey ], notMultiSort = !event[ c.sortMultiSortKey ],
table = c.table, table = c.table,
len = c.$headers.length, len = c.$headers.length,
// get current column index // get current column index; *always* stored on th/td
col = parseInt( $( cell ).attr( 'data-column' ), 10 ), $th = ts.getHeaderCell( $( cell ) ),
col = parseInt( $th.attr( 'data-column' ), 10 ),
order = c.sortVars[ col ].order; order = c.sortVars[ col ].order;
// Only call sortStart if sorting is enabled // Only call sortStart if sorting is enabled
c.$table.triggerHandler( 'sortStart', table ); c.$table.triggerHandler( 'sortStart', table );
// get current column sort order // get current column sort order
@ -2070,7 +2090,7 @@
if ( !widget.priority ) { widget.priority = 10; } if ( !widget.priority ) { widget.priority = 10; }
widgets[ indx ] = widget; widgets[ indx ] = widget;
} else if ( c.debug ) { } else if ( c.debug ) {
console.warn( '"' + names[ indx ] + '" widget code does not exist!' ); console.warn( '"' + names[ indx ] + '" was enabled, but the widget code has not been loaded!' );
} }
} }
// sort widgets by priority // sort widgets by priority
@ -2142,6 +2162,7 @@
c.widgetInit[ name[ index ] ] = false; c.widgetInit[ name[ index ] ] = false;
} }
} }
c.$table.triggerHandler( 'widgetRemoveEnd', table );
}, },
refreshWidgets : function( table, doAll, dontapply ) { refreshWidgets : function( table, doAll, dontapply ) {
@ -2993,7 +3014,7 @@
})(jQuery, window, document); })(jQuery, window, document);
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */ /*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
;(function ($) { ;(function ($) {
'use strict'; 'use strict';
var ts = $.tablesorter || {}; var ts = $.tablesorter || {};
@ -5196,7 +5217,7 @@
})( jQuery ); })( jQuery );
/*! Widget: stickyHeaders - updated 6/2/2017 (v2.28.13) *//* /*! Widget: stickyHeaders - updated 9/27/2017 (v2.29.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.4.3+ * Requires tablesorter v2.8+ and jQuery 1.4.3+
* by Rob Garrison * by Rob Garrison
*/ */
@ -5348,10 +5369,14 @@
}); });
} }
}, },
getLeftPosition = function() {
return $attach.length ?
parseInt($attach.css('padding-left'), 10) || 0 :
$table.offset().left - parseInt($table.css('margin-left'), 10) - $(window).scrollLeft();
},
resizeHeader = function() { resizeHeader = function() {
$stickyWrap.css({ $stickyWrap.css({
left : $attach.length ? parseInt($attach.css('padding-left'), 10) || 0 : left : getLeftPosition(),
$table.offset().left - parseInt($table.css('margin-left'), 10) - $xScroll.scrollLeft(),
width: $table.outerWidth() width: $table.outerWidth()
}); });
setWidth( $table, $stickyTable ); setWidth( $table, $stickyTable );
@ -5361,10 +5386,10 @@
if (!$table.is(':visible')) { return; } // fixes #278 if (!$table.is(':visible')) { return; } // fixes #278
// Detect nested tables - fixes #724 // Detect nested tables - fixes #724
nestedStickyTop = $nestedSticky.length ? $nestedSticky.offset().top - $yScroll.scrollTop() + $nestedSticky.height() : 0; nestedStickyTop = $nestedSticky.length ? $nestedSticky.offset().top - $yScroll.scrollTop() + $nestedSticky.height() : 0;
var offset = $table.offset(), var tmp,
offset = $table.offset(),
stickyOffset = getStickyOffset(c, wo), stickyOffset = getStickyOffset(c, wo),
yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3 yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3
xWindow = $.isWindow( $xScroll[0] ),
attachTop = $attach.length ? attachTop = $attach.length ?
( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) : ( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) :
$yScroll.scrollTop(), $yScroll.scrollTop(),
@ -5372,19 +5397,27 @@
scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight, scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight,
tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight, tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight,
isVisible = ( scrollTop > offset.top ) && ( scrollTop < offset.top + tableHeight ) ? 'visible' : 'hidden', isVisible = ( scrollTop > offset.top ) && ( scrollTop < offset.top + tableHeight ) ? 'visible' : 'hidden',
state = isVisible === 'visible' ? ts.css.stickyVis : ts.css.stickyHide,
needsUpdating = !$stickyWrap.hasClass( state ),
cssSettings = { visibility : isVisible }; cssSettings = { visibility : isVisible };
if ($attach.length) { if ($attach.length) {
// attached sticky headers always need updating
needsUpdating = true;
cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop(); cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop();
} }
if (xWindow) {
// adjust when scrolling horizontally - fixes issue #143 // adjust when scrolling horizontally - fixes issue #143
cssSettings.left = $table.offset().left - parseInt($table.css('margin-left'), 10) - $xScroll.scrollLeft(); tmp = getLeftPosition();
if (tmp !== parseInt($stickyWrap.css('left'), 10)) {
needsUpdating = true;
cssSettings.left = tmp;
} }
cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop; cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop;
if (needsUpdating) {
$stickyWrap $stickyWrap
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide ) .removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
.addClass( isVisible === 'visible' ? ts.css.stickyVis : ts.css.stickyHide ) .addClass( state )
.css(cssSettings); .css(cssSettings);
}
if (isVisible !== laststate || resizing) { if (isVisible !== laststate || resizing) {
// make sure the column widths match // make sure the column widths match
resizeHeader(); resizeHeader();
@ -5503,7 +5536,7 @@
})(jQuery, window); })(jQuery, window);
/*! Widget: resizable - updated 4/18/2017 (v2.28.8) */ /*! Widget: resizable - updated 9/27/2017 (v2.29.0) */
/*jshint browser:true, jquery:true, unused:false */ /*jshint browser:true, jquery:true, unused:false */
;(function ($, window) { ;(function ($, window) {
'use strict'; 'use strict';
@ -5830,6 +5863,7 @@
vars.$target = vars.$next = null; vars.$target = vars.$next = null;
// will update stickyHeaders, just in case, see #912 // will update stickyHeaders, just in case, see #912
c.$table.triggerHandler('stickyHeadersUpdate'); c.$table.triggerHandler('stickyHeadersUpdate');
c.$table.triggerHandler('resizableComplete');
} }
}; };

File diff suppressed because one or more lines are too long

View File

@ -8,7 +8,7 @@
} }
}(function(jQuery) { }(function(jQuery) {
/*! TableSorter (FORK) v2.28.15 *//* /*! TableSorter (FORK) v2.29.0 *//*
* Client-side table sorting with ease! * Client-side table sorting with ease!
* @requires jQuery v1.2.6+ * @requires jQuery v1.2.6+
* *
@ -32,7 +32,7 @@
'use strict'; 'use strict';
var ts = $.tablesorter = { var ts = $.tablesorter = {
version : '2.28.15', version : '2.29.0',
parsers : [], parsers : [],
widgets : [], widgets : [],
@ -431,10 +431,10 @@
e.stopPropagation(); e.stopPropagation();
ts.applyWidgetId( this, id ); ts.applyWidgetId( this, id );
}) })
.bind( 'applyWidgets' + namespace, function( e, init ) { .bind( 'applyWidgets' + namespace, function( e, callback ) {
e.stopPropagation(); e.stopPropagation();
// apply widgets // apply widgets (false = not initializing)
ts.applyWidget( this, init ); ts.applyWidget( this, false, callback );
}) })
.bind( 'refreshWidgets' + namespace, function( e, all, dontapply ) { .bind( 'refreshWidgets' + namespace, function( e, all, dontapply ) {
e.stopPropagation(); e.stopPropagation();
@ -471,9 +471,9 @@
downTarget = null; downTarget = null;
if ( core !== true ) { if ( core !== true ) {
$headers.addClass( namespace.slice( 1 ) + '_extra_headers' ); $headers.addClass( namespace.slice( 1 ) + '_extra_headers' );
tmp = $.fn.closest ? $headers.closest( 'table' )[ 0 ] : $headers.parents( 'table' )[ 0 ]; tmp = ts.getClosest( $headers, 'table' );
if ( tmp && tmp.nodeName === 'TABLE' && tmp !== table ) { if ( tmp.length && tmp[ 0 ].nodeName === 'TABLE' && tmp[ 0 ] !== table ) {
$( tmp ).addClass( namespace.slice( 1 ) + '_extra_table' ); $( tmp[ 0 ] ).addClass( namespace.slice( 1 ) + '_extra_table' );
} }
} }
tmp = ( c.pointerDown + ' ' + c.pointerUp + ' ' + c.pointerClick + ' sort keyup ' ) tmp = ( c.pointerDown + ' ' + c.pointerUp + ' ' + c.pointerClick + ' sort keyup ' )
@ -525,8 +525,7 @@
ts.buildCache( c ); ts.buildCache( c );
} }
// jQuery v1.2.6 doesn't have closest() // jQuery v1.2.6 doesn't have closest()
$cell = $.fn.closest ? $( this ).closest( 'th, td' ) : $cell = ts.getHeaderCell( $( this ) );
/TH|TD/.test( this.nodeName ) ? $( this ) : $( this ).parents( 'th, td' );
// reference original table headers and find the same cell // reference original table headers and find the same cell
// don't use $headers or IE8 throws an error - see #987 // don't use $headers or IE8 throws an error - see #987
temp = $headers.index( $cell ); temp = $headers.index( $cell );
@ -566,7 +565,7 @@
''; '';
// redefine c.$headers here in case of an updateAll that replaces or adds an entire header cell - see #683 // redefine c.$headers here in case of an updateAll that replaces or adds an entire header cell - see #683
c.$headers = $( $.map( c.$table.find( c.selectorHeaders ), function( elem, index ) { c.$headers = $( $.map( c.$table.find( c.selectorHeaders ), function( elem, index ) {
var configHeaders, header, column, template, tmp, var configHeaders, header, column, template, tmp, $th,
$elem = $( elem ); $elem = $( elem );
// ignore cell (don't add it to c.$headers) if row has ignoreRow class // ignore cell (don't add it to c.$headers) if row has ignoreRow class
if ( $elem.parent().hasClass( c.cssIgnoreRow ) ) { return; } if ( $elem.parent().hasClass( c.cssIgnoreRow ) ) { return; }
@ -592,7 +591,9 @@
if ( c.onRenderHeader ) { if ( c.onRenderHeader ) {
c.onRenderHeader.apply( $elem, [ index, c, c.$table ] ); c.onRenderHeader.apply( $elem, [ index, c, c.$table ] );
} }
column = parseInt( $elem.attr( 'data-column' ), 10 ); // data-column stored on th or td only
$th = ts.getHeaderCell( $elem );
column = parseInt( $th.attr( 'data-column' ), 10 );
elem.column = column; elem.column = column;
tmp = ts.getOrder( ts.getData( $elem, configHeaders, 'sortInitialOrder' ) || c.sortInitialOrder ); tmp = ts.getOrder( ts.getData( $elem, configHeaders, 'sortInitialOrder' ) || c.sortInitialOrder );
// this may get updated numerous times if there are multiple rows // this may get updated numerous times if there are multiple rows
@ -610,10 +611,9 @@
} }
// add cell to headerList // add cell to headerList
c.headerList[ index ] = elem; c.headerList[ index ] = elem;
$elem.addClass( ts.css.header + ' ' + c.cssHeader );
// add to parent in case there are multiple rows // add to parent in case there are multiple rows
$elem ts.getClosest( $elem, 'tr' )
.addClass( ts.css.header + ' ' + c.cssHeader )
.parent()
.addClass( ts.css.headerRow + ' ' + c.cssHeaderRow ) .addClass( ts.css.headerRow + ' ' + c.cssHeaderRow )
.attr( 'role', 'row' ); .attr( 'role', 'row' );
// allow keyboard cursor to focus on element // allow keyboard cursor to focus on element
@ -1171,10 +1171,29 @@
} }
}, },
// This function does NOT return closest if the $el matches the selector
getClosest : function( $el, selector ) {
return $.fn.closest ?
$el.closest( selector ) :
$el.parents( selector ).filter( ':first' );
},
getHeaderCell : function( $el ) {
// jQuery v1.2.6 doesn't have closest()
if ( $.fn.closest ) {
return $el.closest( 'th, td' );
}
return /TH|TD/.test( $el[0].nodeName ) ?
$el :
$el.parents( 'th, td' ).filter( ':first' );
},
// nextSort (optional), lets you disable next sort text // nextSort (optional), lets you disable next sort text
setColumnAriaLabel : function( c, $header, nextSort ) { setColumnAriaLabel : function( c, $header, nextSort ) {
if ( $header.length ) { if ( $header.length ) {
var column = parseInt( $header.attr( 'data-column' ), 10 ), var $th = ts.getHeaderCell( $header ),
// data-column always stored on the th/td
column = parseInt( $th.attr( 'data-column' ), 10 ),
vars = c.sortVars[ column ], vars = c.sortVars[ column ],
tmp = $header.hasClass( ts.css.sortAsc ) ? tmp = $header.hasClass( ts.css.sortAsc ) ?
'sortAsc' : 'sortAsc' :
@ -1332,10 +1351,9 @@
$cell = $( cell ), $cell = $( cell ),
// update cache - format: function( s, table, cell, cellIndex ) // update cache - format: function( s, table, cell, cellIndex )
// no closest in jQuery v1.2.6 // no closest in jQuery v1.2.6
tbodyIndex = $tbodies tbodyIndex = $tbodies.index( ts.getClosest( $cell, 'tbody' ) ),
.index( $.fn.closest ? $cell.closest( 'tbody' ) : $cell.parents( 'tbody' ).filter( ':first' ) ),
tbcache = c.cache[ tbodyIndex ], tbcache = c.cache[ tbodyIndex ],
$row = $.fn.closest ? $cell.closest( 'tr' ) : $cell.parents( 'tr' ).filter( ':first' ); $row = ts.getClosest( $cell, 'tr' );
cell = $cell[ 0 ]; // in case cell is a jQuery object cell = $cell[ 0 ]; // in case cell is a jQuery object
// tbody may not exist if update is initialized while tbody is removed for processing // tbody may not exist if update is initialized while tbody is removed for processing
if ( $tbodies.length && tbodyIndex >= 0 ) { if ( $tbodies.length && tbodyIndex >= 0 ) {
@ -1390,11 +1408,13 @@
if ( valid ) { if ( valid ) {
$row = $( $row ); $row = $( $row );
c.$tbodies.append( $row ); c.$tbodies.append( $row );
} else if ( !$row || } else if (
!$row ||
// row is a jQuery object? // row is a jQuery object?
!( $row instanceof jQuery ) || !( $row instanceof jQuery ) ||
// row contained in the table? // row contained in the table?
( $.fn.closest ? $row.closest( 'table' )[ 0 ] : $row.parents( 'table' )[ 0 ] ) !== c.table ) { ( ts.getClosest( $row, 'table' )[ 0 ] !== c.table )
) {
if ( c.debug ) { if ( c.debug ) {
console.error( 'addRows method requires (1) a jQuery selector reference to rows that have already ' + console.error( 'addRows method requires (1) a jQuery selector reference to rows that have already ' +
'been added to the table, or (2) row HTML string to be added to a table with only one tbody' ); 'been added to the table, or (2) row HTML string to be added to a table with only one tbody' );
@ -1541,10 +1561,10 @@
notMultiSort = !event[ c.sortMultiSortKey ], notMultiSort = !event[ c.sortMultiSortKey ],
table = c.table, table = c.table,
len = c.$headers.length, len = c.$headers.length,
// get current column index // get current column index; *always* stored on th/td
col = parseInt( $( cell ).attr( 'data-column' ), 10 ), $th = ts.getHeaderCell( $( cell ) ),
col = parseInt( $th.attr( 'data-column' ), 10 ),
order = c.sortVars[ col ].order; order = c.sortVars[ col ].order;
// Only call sortStart if sorting is enabled // Only call sortStart if sorting is enabled
c.$table.triggerHandler( 'sortStart', table ); c.$table.triggerHandler( 'sortStart', table );
// get current column sort order // get current column sort order
@ -2068,7 +2088,7 @@
if ( !widget.priority ) { widget.priority = 10; } if ( !widget.priority ) { widget.priority = 10; }
widgets[ indx ] = widget; widgets[ indx ] = widget;
} else if ( c.debug ) { } else if ( c.debug ) {
console.warn( '"' + names[ indx ] + '" widget code does not exist!' ); console.warn( '"' + names[ indx ] + '" was enabled, but the widget code has not been loaded!' );
} }
} }
// sort widgets by priority // sort widgets by priority
@ -2140,6 +2160,7 @@
c.widgetInit[ name[ index ] ] = false; c.widgetInit[ name[ index ] ] = false;
} }
} }
c.$table.triggerHandler( 'widgetRemoveEnd', table );
}, },
refreshWidgets : function( table, doAll, dontapply ) { refreshWidgets : function( table, doAll, dontapply ) {

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*! tablesorter (FORK) - updated 07-04-2017 (v2.28.15)*/ /*! tablesorter (FORK) - updated 09-27-2017 (v2.29.0)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */ /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) { (function(factory) {
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
@ -127,7 +127,7 @@
})(jQuery, window, document); })(jQuery, window, document);
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */ /*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
;(function ($) { ;(function ($) {
'use strict'; 'use strict';
var ts = $.tablesorter || {}; var ts = $.tablesorter || {};
@ -2330,7 +2330,7 @@
})( jQuery ); })( jQuery );
/*! Widget: stickyHeaders - updated 6/2/2017 (v2.28.13) *//* /*! Widget: stickyHeaders - updated 9/27/2017 (v2.29.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.4.3+ * Requires tablesorter v2.8+ and jQuery 1.4.3+
* by Rob Garrison * by Rob Garrison
*/ */
@ -2482,10 +2482,14 @@
}); });
} }
}, },
getLeftPosition = function() {
return $attach.length ?
parseInt($attach.css('padding-left'), 10) || 0 :
$table.offset().left - parseInt($table.css('margin-left'), 10) - $(window).scrollLeft();
},
resizeHeader = function() { resizeHeader = function() {
$stickyWrap.css({ $stickyWrap.css({
left : $attach.length ? parseInt($attach.css('padding-left'), 10) || 0 : left : getLeftPosition(),
$table.offset().left - parseInt($table.css('margin-left'), 10) - $xScroll.scrollLeft(),
width: $table.outerWidth() width: $table.outerWidth()
}); });
setWidth( $table, $stickyTable ); setWidth( $table, $stickyTable );
@ -2495,10 +2499,10 @@
if (!$table.is(':visible')) { return; } // fixes #278 if (!$table.is(':visible')) { return; } // fixes #278
// Detect nested tables - fixes #724 // Detect nested tables - fixes #724
nestedStickyTop = $nestedSticky.length ? $nestedSticky.offset().top - $yScroll.scrollTop() + $nestedSticky.height() : 0; nestedStickyTop = $nestedSticky.length ? $nestedSticky.offset().top - $yScroll.scrollTop() + $nestedSticky.height() : 0;
var offset = $table.offset(), var tmp,
offset = $table.offset(),
stickyOffset = getStickyOffset(c, wo), stickyOffset = getStickyOffset(c, wo),
yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3 yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3
xWindow = $.isWindow( $xScroll[0] ),
attachTop = $attach.length ? attachTop = $attach.length ?
( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) : ( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) :
$yScroll.scrollTop(), $yScroll.scrollTop(),
@ -2506,19 +2510,27 @@
scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight, scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight,
tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight, tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight,
isVisible = ( scrollTop > offset.top ) && ( scrollTop < offset.top + tableHeight ) ? 'visible' : 'hidden', isVisible = ( scrollTop > offset.top ) && ( scrollTop < offset.top + tableHeight ) ? 'visible' : 'hidden',
state = isVisible === 'visible' ? ts.css.stickyVis : ts.css.stickyHide,
needsUpdating = !$stickyWrap.hasClass( state ),
cssSettings = { visibility : isVisible }; cssSettings = { visibility : isVisible };
if ($attach.length) { if ($attach.length) {
// attached sticky headers always need updating
needsUpdating = true;
cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop(); cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop();
} }
if (xWindow) {
// adjust when scrolling horizontally - fixes issue #143 // adjust when scrolling horizontally - fixes issue #143
cssSettings.left = $table.offset().left - parseInt($table.css('margin-left'), 10) - $xScroll.scrollLeft(); tmp = getLeftPosition();
if (tmp !== parseInt($stickyWrap.css('left'), 10)) {
needsUpdating = true;
cssSettings.left = tmp;
} }
cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop; cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop;
if (needsUpdating) {
$stickyWrap $stickyWrap
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide ) .removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
.addClass( isVisible === 'visible' ? ts.css.stickyVis : ts.css.stickyHide ) .addClass( state )
.css(cssSettings); .css(cssSettings);
}
if (isVisible !== laststate || resizing) { if (isVisible !== laststate || resizing) {
// make sure the column widths match // make sure the column widths match
resizeHeader(); resizeHeader();
@ -2637,7 +2649,7 @@
})(jQuery, window); })(jQuery, window);
/*! Widget: resizable - updated 4/18/2017 (v2.28.8) */ /*! Widget: resizable - updated 9/27/2017 (v2.29.0) */
/*jshint browser:true, jquery:true, unused:false */ /*jshint browser:true, jquery:true, unused:false */
;(function ($, window) { ;(function ($, window) {
'use strict'; 'use strict';
@ -2964,6 +2976,7 @@
vars.$target = vars.$next = null; vars.$target = vars.$next = null;
// will update stickyHeaders, just in case, see #912 // will update stickyHeaders, just in case, see #912
c.$table.triggerHandler('stickyHeadersUpdate'); c.$table.triggerHandler('stickyHeadersUpdate');
c.$table.triggerHandler('resizableComplete');
} }
}; };

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

File diff suppressed because one or more lines are too long

View File

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

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */ /*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
!function(e){"use strict";var o=e.tablesorter||{};o.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"glyphicon glyphicon-chevron-up",iconSortDesc:"glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},e.extend(o.css,{wrapper:"tablesorter-wrapper"}),o.addWidget({id:"uitheme",priority:10,format:function(t,s,r){var i,a,n,c,l,d,h,m,u,p,v,f,b,C=o.themes,w=s.$table.add(e(s.namespace+"_extra_table")),g=s.$headers.add(e(s.namespace+"_extra_headers")),S=s.theme||"jui",j=C[S]||{},D=e.trim([j.sortNone,j.sortDesc,j.sortAsc,j.active].join(" ")),A=e.trim([j.iconSortNone,j.iconSortDesc,j.iconSortAsc].join(" "));for(s.debug&&(l=new Date),w.hasClass("tablesorter-"+S)&&s.theme===s.appliedTheme&&r.uitheme_applied||(r.uitheme_applied=!0,p=C[s.appliedTheme]||{},v=(b=!e.isEmptyObject(p))?[p.sortNone,p.sortDesc,p.sortAsc,p.active].join(" "):"",f=b?[p.iconSortNone,p.iconSortDesc,p.iconSortAsc].join(" "):"",b&&(r.zebra[0]=e.trim(" "+r.zebra[0].replace(" "+p.even,"")),r.zebra[1]=e.trim(" "+r.zebra[1].replace(" "+p.odd,"")),s.$tbodies.children().removeClass([p.even,p.odd].join(" "))),j.even&&(r.zebra[0]+=" "+j.even),j.odd&&(r.zebra[1]+=" "+j.odd),w.children("caption").removeClass(p.caption||"").addClass(j.caption),m=w.removeClass((s.appliedTheme?"tablesorter-"+(s.appliedTheme||""):"")+" "+(p.table||"")).addClass("tablesorter-"+S+" "+(j.table||"")).children("tfoot"),s.appliedTheme=s.theme,m.length&&m.children("tr").removeClass(p.footerRow||"").addClass(j.footerRow).children("th, td").removeClass(p.footerCells||"").addClass(j.footerCells),g.removeClass((b?[p.header,p.hover,v].join(" "):"")||"").addClass(j.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(o){e(this)["mouseenter"===o.type?"addClass":"removeClass"](j.hover||"")}),g.each(function(){var t=e(this);t.find("."+o.css.wrapper).length||t.wrapInner('<div class="'+o.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>')}),s.cssIcon&&g.find("."+o.css.icon).removeClass(b?[p.icons,f].join(" "):"").addClass(j.icons||""),o.hasWidget(s.table,"filter")&&(a=function(){w.children("thead").children("."+o.css.filterRow).removeClass(b?p.filterRow||"":"").addClass(j.filterRow||"")},r.filter_initialized?a():w.one("filterInit",function(){a()}))),i=0;i<s.columns;i++)d=s.$headers.add(e(s.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+i+'"]'),h=o.css.icon?d.find("."+o.css.icon):e(),(u=g.not(".sorter-false").filter('[data-column="'+i+'"]:last')).length&&(d.removeClass(D),h.removeClass(A),u[0].sortDisabled?h.removeClass(j.icons||""):(n=j.sortNone,c=j.iconSortNone,u.hasClass(o.css.sortAsc)?(n=[j.sortAsc,j.active].join(" "),c=j.iconSortAsc):u.hasClass(o.css.sortDesc)&&(n=[j.sortDesc,j.active].join(" "),c=j.iconSortDesc),d.addClass(n),h.addClass(c||"")));s.debug&&console.log("Applying "+S+" theme"+o.benchmark(l))},remove:function(e,t,s,r){if(s.uitheme_applied){var i=t.$table,a=t.appliedTheme||"jui",n=o.themes[a]||o.themes.jui,c=i.children("thead").children(),l=n.sortNone+" "+n.sortDesc+" "+n.sortAsc,d=n.iconSortNone+" "+n.iconSortDesc+" "+n.iconSortAsc;i.removeClass("tablesorter-"+a+" "+n.table),s.uitheme_applied=!1,r||(i.find(o.css.header).removeClass(n.header),c.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(n.hover+" "+l+" "+n.active).filter("."+o.css.filterRow).removeClass(n.filterRow),c.find("."+o.css.icon).removeClass(n.icons+" "+d))}}})}(jQuery); !function(e){"use strict";var o=e.tablesorter||{};o.themes={bootstrap:{table:"table table-bordered table-striped",caption:"caption",header:"bootstrap-header",sortNone:"",sortAsc:"",sortDesc:"",active:"",hover:"",icons:"",iconSortNone:"bootstrap-icon-unsorted",iconSortAsc:"glyphicon glyphicon-chevron-up",iconSortDesc:"glyphicon glyphicon-chevron-down",filterRow:"",footerRow:"",footerCells:"",even:"",odd:""},jui:{table:"ui-widget ui-widget-content ui-corner-all",caption:"ui-widget-content",header:"ui-widget-header ui-corner-all ui-state-default",sortNone:"",sortAsc:"",sortDesc:"",active:"ui-state-active",hover:"ui-state-hover",icons:"ui-icon",iconSortNone:"ui-icon-carat-2-n-s ui-icon-caret-2-n-s",iconSortAsc:"ui-icon-carat-1-n ui-icon-caret-1-n",iconSortDesc:"ui-icon-carat-1-s ui-icon-caret-1-s",filterRow:"",footerRow:"",footerCells:"",even:"ui-widget-content",odd:"ui-state-default"}},e.extend(o.css,{wrapper:"tablesorter-wrapper"}),o.addWidget({id:"uitheme",priority:10,format:function(t,s,r){var i,a,n,c,l,d,h,m,u,p,v,f,b,C=o.themes,w=s.$table.add(e(s.namespace+"_extra_table")),g=s.$headers.add(e(s.namespace+"_extra_headers")),S=s.theme||"jui",j=C[S]||{},D=e.trim([j.sortNone,j.sortDesc,j.sortAsc,j.active].join(" ")),A=e.trim([j.iconSortNone,j.iconSortDesc,j.iconSortAsc].join(" "));for(s.debug&&(l=new Date),w.hasClass("tablesorter-"+S)&&s.theme===s.appliedTheme&&r.uitheme_applied||(r.uitheme_applied=!0,p=C[s.appliedTheme]||{},v=(b=!e.isEmptyObject(p))?[p.sortNone,p.sortDesc,p.sortAsc,p.active].join(" "):"",f=b?[p.iconSortNone,p.iconSortDesc,p.iconSortAsc].join(" "):"",b&&(r.zebra[0]=e.trim(" "+r.zebra[0].replace(" "+p.even,"")),r.zebra[1]=e.trim(" "+r.zebra[1].replace(" "+p.odd,"")),s.$tbodies.children().removeClass([p.even,p.odd].join(" "))),j.even&&(r.zebra[0]+=" "+j.even),j.odd&&(r.zebra[1]+=" "+j.odd),w.children("caption").removeClass(p.caption||"").addClass(j.caption),m=w.removeClass((s.appliedTheme?"tablesorter-"+(s.appliedTheme||""):"")+" "+(p.table||"")).addClass("tablesorter-"+S+" "+(j.table||"")).children("tfoot"),s.appliedTheme=s.theme,m.length&&m.children("tr").removeClass(p.footerRow||"").addClass(j.footerRow).children("th, td").removeClass(p.footerCells||"").addClass(j.footerCells),g.removeClass((b?[p.header,p.hover,v].join(" "):"")||"").addClass(j.header).not(".sorter-false").unbind("mouseenter.tsuitheme mouseleave.tsuitheme").bind("mouseenter.tsuitheme mouseleave.tsuitheme",function(o){e(this)["mouseenter"===o.type?"addClass":"removeClass"](j.hover||"")}),g.each(function(){var t=e(this);t.find("."+o.css.wrapper).length||t.wrapInner('<div class="'+o.css.wrapper+'" style="position:relative;height:100%;width:100%"></div>')}),s.cssIcon&&g.find("."+o.css.icon).removeClass(b?[p.icons,f].join(" "):"").addClass(j.icons||""),o.hasWidget(s.table,"filter")&&(a=function(){w.children("thead").children("."+o.css.filterRow).removeClass(b?p.filterRow||"":"").addClass(j.filterRow||"")},r.filter_initialized?a():w.one("filterInit",function(){a()}))),i=0;i<s.columns;i++)d=s.$headers.add(e(s.namespace+"_extra_headers")).not(".sorter-false").filter('[data-column="'+i+'"]'),h=o.css.icon?d.find("."+o.css.icon):e(),(u=g.not(".sorter-false").filter('[data-column="'+i+'"]:last')).length&&(d.removeClass(D),h.removeClass(A),u[0].sortDisabled?h.removeClass(j.icons||""):(n=j.sortNone,c=j.iconSortNone,u.hasClass(o.css.sortAsc)?(n=[j.sortAsc,j.active].join(" "),c=j.iconSortAsc):u.hasClass(o.css.sortDesc)&&(n=[j.sortDesc,j.active].join(" "),c=j.iconSortDesc),d.addClass(n),h.addClass(c||"")));s.debug&&console.log("Applying "+S+" theme"+o.benchmark(l))},remove:function(e,t,s,r){if(s.uitheme_applied){var i=t.$table,a=t.appliedTheme||"jui",n=o.themes[a]||o.themes.jui,c=i.children("thead").children(),l=n.sortNone+" "+n.sortDesc+" "+n.sortAsc,d=n.iconSortNone+" "+n.iconSortDesc+" "+n.iconSortAsc;i.removeClass("tablesorter-"+a+" "+n.table),s.uitheme_applied=!1,r||(i.find(o.css.header).removeClass(n.header),c.unbind("mouseenter.tsuitheme mouseleave.tsuitheme").removeClass(n.hover+" "+l+" "+n.active).filter("."+o.css.filterRow).removeClass(n.filterRow),c.find("."+o.css.icon).removeClass(n.icons+" "+d))}}})}(jQuery);

View File

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

View File

@ -519,7 +519,7 @@
<li><span class="label label-info">Beta</span> <a href="example-widget-toggle-tablesorter.html">Toggle Sort & Filter Widget</a> (<span class="version">v2.24.4</span>).</li> <li><span class="label label-info">Beta</span> <a href="example-widget-toggle-tablesorter.html">Toggle Sort & Filter Widget</a> (<span class="version">v2.24.4</span>).</li>
<li><span class="results">&dagger;</span> UITheme widget (<span class="version">v2.0.9</span>; <span class="version updated">v2.27.0</span>): <li><span class="results">&dagger;</span> UITheme widget (<span class="version">v2.0.9</span>; <span class="version updated">v2.29.0</span>):
<ul> <ul>
<li><a href="example-widget-ui-theme.html">jQuery UI theme</a> (v2.0.9; <span class="version updated">v2.27.0</span>).</li> <li><a href="example-widget-ui-theme.html">jQuery UI theme</a> (v2.0.9; <span class="version updated">v2.27.0</span>).</li>
<li><a href="example-option-theme-bootstrap-v2.html">Bootstrap v2.x</a> (demo added <span class="version">v2.22.0</span>).</li> <li><a href="example-option-theme-bootstrap-v2.html">Bootstrap v2.x</a> (demo added <span class="version">v2.22.0</span>).</li>

View File

@ -4,7 +4,7 @@
*/ */
/*! tablesorter (FORK) - updated 07-04-2017 (v2.28.15)*/ /*! tablesorter (FORK) - updated 09-27-2017 (v2.29.0)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */ /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) { (function(factory) {
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
@ -16,7 +16,7 @@
} }
}(function(jQuery) { }(function(jQuery) {
/*! TableSorter (FORK) v2.28.15 *//* /*! TableSorter (FORK) v2.29.0 *//*
* Client-side table sorting with ease! * Client-side table sorting with ease!
* @requires jQuery v1.2.6+ * @requires jQuery v1.2.6+
* *
@ -40,7 +40,7 @@
'use strict'; 'use strict';
var ts = $.tablesorter = { var ts = $.tablesorter = {
version : '2.28.15', version : '2.29.0',
parsers : [], parsers : [],
widgets : [], widgets : [],
@ -439,10 +439,10 @@
e.stopPropagation(); e.stopPropagation();
ts.applyWidgetId( this, id ); ts.applyWidgetId( this, id );
}) })
.bind( 'applyWidgets' + namespace, function( e, init ) { .bind( 'applyWidgets' + namespace, function( e, callback ) {
e.stopPropagation(); e.stopPropagation();
// apply widgets // apply widgets (false = not initializing)
ts.applyWidget( this, init ); ts.applyWidget( this, false, callback );
}) })
.bind( 'refreshWidgets' + namespace, function( e, all, dontapply ) { .bind( 'refreshWidgets' + namespace, function( e, all, dontapply ) {
e.stopPropagation(); e.stopPropagation();
@ -479,9 +479,9 @@
downTarget = null; downTarget = null;
if ( core !== true ) { if ( core !== true ) {
$headers.addClass( namespace.slice( 1 ) + '_extra_headers' ); $headers.addClass( namespace.slice( 1 ) + '_extra_headers' );
tmp = $.fn.closest ? $headers.closest( 'table' )[ 0 ] : $headers.parents( 'table' )[ 0 ]; tmp = ts.getClosest( $headers, 'table' );
if ( tmp && tmp.nodeName === 'TABLE' && tmp !== table ) { if ( tmp.length && tmp[ 0 ].nodeName === 'TABLE' && tmp[ 0 ] !== table ) {
$( tmp ).addClass( namespace.slice( 1 ) + '_extra_table' ); $( tmp[ 0 ] ).addClass( namespace.slice( 1 ) + '_extra_table' );
} }
} }
tmp = ( c.pointerDown + ' ' + c.pointerUp + ' ' + c.pointerClick + ' sort keyup ' ) tmp = ( c.pointerDown + ' ' + c.pointerUp + ' ' + c.pointerClick + ' sort keyup ' )
@ -533,8 +533,7 @@
ts.buildCache( c ); ts.buildCache( c );
} }
// jQuery v1.2.6 doesn't have closest() // jQuery v1.2.6 doesn't have closest()
$cell = $.fn.closest ? $( this ).closest( 'th, td' ) : $cell = ts.getHeaderCell( $( this ) );
/TH|TD/.test( this.nodeName ) ? $( this ) : $( this ).parents( 'th, td' );
// reference original table headers and find the same cell // reference original table headers and find the same cell
// don't use $headers or IE8 throws an error - see #987 // don't use $headers or IE8 throws an error - see #987
temp = $headers.index( $cell ); temp = $headers.index( $cell );
@ -574,7 +573,7 @@
''; '';
// redefine c.$headers here in case of an updateAll that replaces or adds an entire header cell - see #683 // redefine c.$headers here in case of an updateAll that replaces or adds an entire header cell - see #683
c.$headers = $( $.map( c.$table.find( c.selectorHeaders ), function( elem, index ) { c.$headers = $( $.map( c.$table.find( c.selectorHeaders ), function( elem, index ) {
var configHeaders, header, column, template, tmp, var configHeaders, header, column, template, tmp, $th,
$elem = $( elem ); $elem = $( elem );
// ignore cell (don't add it to c.$headers) if row has ignoreRow class // ignore cell (don't add it to c.$headers) if row has ignoreRow class
if ( $elem.parent().hasClass( c.cssIgnoreRow ) ) { return; } if ( $elem.parent().hasClass( c.cssIgnoreRow ) ) { return; }
@ -600,7 +599,9 @@
if ( c.onRenderHeader ) { if ( c.onRenderHeader ) {
c.onRenderHeader.apply( $elem, [ index, c, c.$table ] ); c.onRenderHeader.apply( $elem, [ index, c, c.$table ] );
} }
column = parseInt( $elem.attr( 'data-column' ), 10 ); // data-column stored on th or td only
$th = ts.getHeaderCell( $elem );
column = parseInt( $th.attr( 'data-column' ), 10 );
elem.column = column; elem.column = column;
tmp = ts.getOrder( ts.getData( $elem, configHeaders, 'sortInitialOrder' ) || c.sortInitialOrder ); tmp = ts.getOrder( ts.getData( $elem, configHeaders, 'sortInitialOrder' ) || c.sortInitialOrder );
// this may get updated numerous times if there are multiple rows // this may get updated numerous times if there are multiple rows
@ -618,10 +619,9 @@
} }
// add cell to headerList // add cell to headerList
c.headerList[ index ] = elem; c.headerList[ index ] = elem;
$elem.addClass( ts.css.header + ' ' + c.cssHeader );
// add to parent in case there are multiple rows // add to parent in case there are multiple rows
$elem ts.getClosest( $elem, 'tr' )
.addClass( ts.css.header + ' ' + c.cssHeader )
.parent()
.addClass( ts.css.headerRow + ' ' + c.cssHeaderRow ) .addClass( ts.css.headerRow + ' ' + c.cssHeaderRow )
.attr( 'role', 'row' ); .attr( 'role', 'row' );
// allow keyboard cursor to focus on element // allow keyboard cursor to focus on element
@ -1179,10 +1179,29 @@
} }
}, },
// This function does NOT return closest if the $el matches the selector
getClosest : function( $el, selector ) {
return $.fn.closest ?
$el.closest( selector ) :
$el.parents( selector ).filter( ':first' );
},
getHeaderCell : function( $el ) {
// jQuery v1.2.6 doesn't have closest()
if ( $.fn.closest ) {
return $el.closest( 'th, td' );
}
return /TH|TD/.test( $el[0].nodeName ) ?
$el :
$el.parents( 'th, td' ).filter( ':first' );
},
// nextSort (optional), lets you disable next sort text // nextSort (optional), lets you disable next sort text
setColumnAriaLabel : function( c, $header, nextSort ) { setColumnAriaLabel : function( c, $header, nextSort ) {
if ( $header.length ) { if ( $header.length ) {
var column = parseInt( $header.attr( 'data-column' ), 10 ), var $th = ts.getHeaderCell( $header ),
// data-column always stored on the th/td
column = parseInt( $th.attr( 'data-column' ), 10 ),
vars = c.sortVars[ column ], vars = c.sortVars[ column ],
tmp = $header.hasClass( ts.css.sortAsc ) ? tmp = $header.hasClass( ts.css.sortAsc ) ?
'sortAsc' : 'sortAsc' :
@ -1340,10 +1359,9 @@
$cell = $( cell ), $cell = $( cell ),
// update cache - format: function( s, table, cell, cellIndex ) // update cache - format: function( s, table, cell, cellIndex )
// no closest in jQuery v1.2.6 // no closest in jQuery v1.2.6
tbodyIndex = $tbodies tbodyIndex = $tbodies.index( ts.getClosest( $cell, 'tbody' ) ),
.index( $.fn.closest ? $cell.closest( 'tbody' ) : $cell.parents( 'tbody' ).filter( ':first' ) ),
tbcache = c.cache[ tbodyIndex ], tbcache = c.cache[ tbodyIndex ],
$row = $.fn.closest ? $cell.closest( 'tr' ) : $cell.parents( 'tr' ).filter( ':first' ); $row = ts.getClosest( $cell, 'tr' );
cell = $cell[ 0 ]; // in case cell is a jQuery object cell = $cell[ 0 ]; // in case cell is a jQuery object
// tbody may not exist if update is initialized while tbody is removed for processing // tbody may not exist if update is initialized while tbody is removed for processing
if ( $tbodies.length && tbodyIndex >= 0 ) { if ( $tbodies.length && tbodyIndex >= 0 ) {
@ -1398,11 +1416,13 @@
if ( valid ) { if ( valid ) {
$row = $( $row ); $row = $( $row );
c.$tbodies.append( $row ); c.$tbodies.append( $row );
} else if ( !$row || } else if (
!$row ||
// row is a jQuery object? // row is a jQuery object?
!( $row instanceof jQuery ) || !( $row instanceof jQuery ) ||
// row contained in the table? // row contained in the table?
( $.fn.closest ? $row.closest( 'table' )[ 0 ] : $row.parents( 'table' )[ 0 ] ) !== c.table ) { ( ts.getClosest( $row, 'table' )[ 0 ] !== c.table )
) {
if ( c.debug ) { if ( c.debug ) {
console.error( 'addRows method requires (1) a jQuery selector reference to rows that have already ' + console.error( 'addRows method requires (1) a jQuery selector reference to rows that have already ' +
'been added to the table, or (2) row HTML string to be added to a table with only one tbody' ); 'been added to the table, or (2) row HTML string to be added to a table with only one tbody' );
@ -1549,10 +1569,10 @@
notMultiSort = !event[ c.sortMultiSortKey ], notMultiSort = !event[ c.sortMultiSortKey ],
table = c.table, table = c.table,
len = c.$headers.length, len = c.$headers.length,
// get current column index // get current column index; *always* stored on th/td
col = parseInt( $( cell ).attr( 'data-column' ), 10 ), $th = ts.getHeaderCell( $( cell ) ),
col = parseInt( $th.attr( 'data-column' ), 10 ),
order = c.sortVars[ col ].order; order = c.sortVars[ col ].order;
// Only call sortStart if sorting is enabled // Only call sortStart if sorting is enabled
c.$table.triggerHandler( 'sortStart', table ); c.$table.triggerHandler( 'sortStart', table );
// get current column sort order // get current column sort order
@ -2076,7 +2096,7 @@
if ( !widget.priority ) { widget.priority = 10; } if ( !widget.priority ) { widget.priority = 10; }
widgets[ indx ] = widget; widgets[ indx ] = widget;
} else if ( c.debug ) { } else if ( c.debug ) {
console.warn( '"' + names[ indx ] + '" widget code does not exist!' ); console.warn( '"' + names[ indx ] + '" was enabled, but the widget code has not been loaded!' );
} }
} }
// sort widgets by priority // sort widgets by priority
@ -2148,6 +2168,7 @@
c.widgetInit[ name[ index ] ] = false; c.widgetInit[ name[ index ] ] = false;
} }
} }
c.$table.triggerHandler( 'widgetRemoveEnd', table );
}, },
refreshWidgets : function( table, doAll, dontapply ) { refreshWidgets : function( table, doAll, dontapply ) {
@ -2999,7 +3020,7 @@
})(jQuery, window, document); })(jQuery, window, document);
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */ /*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
;(function ($) { ;(function ($) {
'use strict'; 'use strict';
var ts = $.tablesorter || {}; var ts = $.tablesorter || {};
@ -5202,7 +5223,7 @@
})( jQuery ); })( jQuery );
/*! Widget: stickyHeaders - updated 6/2/2017 (v2.28.13) *//* /*! Widget: stickyHeaders - updated 9/27/2017 (v2.29.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.4.3+ * Requires tablesorter v2.8+ and jQuery 1.4.3+
* by Rob Garrison * by Rob Garrison
*/ */
@ -5354,10 +5375,14 @@
}); });
} }
}, },
getLeftPosition = function() {
return $attach.length ?
parseInt($attach.css('padding-left'), 10) || 0 :
$table.offset().left - parseInt($table.css('margin-left'), 10) - $(window).scrollLeft();
},
resizeHeader = function() { resizeHeader = function() {
$stickyWrap.css({ $stickyWrap.css({
left : $attach.length ? parseInt($attach.css('padding-left'), 10) || 0 : left : getLeftPosition(),
$table.offset().left - parseInt($table.css('margin-left'), 10) - $xScroll.scrollLeft(),
width: $table.outerWidth() width: $table.outerWidth()
}); });
setWidth( $table, $stickyTable ); setWidth( $table, $stickyTable );
@ -5367,10 +5392,10 @@
if (!$table.is(':visible')) { return; } // fixes #278 if (!$table.is(':visible')) { return; } // fixes #278
// Detect nested tables - fixes #724 // Detect nested tables - fixes #724
nestedStickyTop = $nestedSticky.length ? $nestedSticky.offset().top - $yScroll.scrollTop() + $nestedSticky.height() : 0; nestedStickyTop = $nestedSticky.length ? $nestedSticky.offset().top - $yScroll.scrollTop() + $nestedSticky.height() : 0;
var offset = $table.offset(), var tmp,
offset = $table.offset(),
stickyOffset = getStickyOffset(c, wo), stickyOffset = getStickyOffset(c, wo),
yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3 yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3
xWindow = $.isWindow( $xScroll[0] ),
attachTop = $attach.length ? attachTop = $attach.length ?
( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) : ( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) :
$yScroll.scrollTop(), $yScroll.scrollTop(),
@ -5378,19 +5403,27 @@
scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight, scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight,
tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight, tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight,
isVisible = ( scrollTop > offset.top ) && ( scrollTop < offset.top + tableHeight ) ? 'visible' : 'hidden', isVisible = ( scrollTop > offset.top ) && ( scrollTop < offset.top + tableHeight ) ? 'visible' : 'hidden',
state = isVisible === 'visible' ? ts.css.stickyVis : ts.css.stickyHide,
needsUpdating = !$stickyWrap.hasClass( state ),
cssSettings = { visibility : isVisible }; cssSettings = { visibility : isVisible };
if ($attach.length) { if ($attach.length) {
// attached sticky headers always need updating
needsUpdating = true;
cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop(); cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop();
} }
if (xWindow) {
// adjust when scrolling horizontally - fixes issue #143 // adjust when scrolling horizontally - fixes issue #143
cssSettings.left = $table.offset().left - parseInt($table.css('margin-left'), 10) - $xScroll.scrollLeft(); tmp = getLeftPosition();
if (tmp !== parseInt($stickyWrap.css('left'), 10)) {
needsUpdating = true;
cssSettings.left = tmp;
} }
cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop; cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop;
if (needsUpdating) {
$stickyWrap $stickyWrap
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide ) .removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
.addClass( isVisible === 'visible' ? ts.css.stickyVis : ts.css.stickyHide ) .addClass( state )
.css(cssSettings); .css(cssSettings);
}
if (isVisible !== laststate || resizing) { if (isVisible !== laststate || resizing) {
// make sure the column widths match // make sure the column widths match
resizeHeader(); resizeHeader();
@ -5509,7 +5542,7 @@
})(jQuery, window); })(jQuery, window);
/*! Widget: resizable - updated 4/18/2017 (v2.28.8) */ /*! Widget: resizable - updated 9/27/2017 (v2.29.0) */
/*jshint browser:true, jquery:true, unused:false */ /*jshint browser:true, jquery:true, unused:false */
;(function ($, window) { ;(function ($, window) {
'use strict'; 'use strict';
@ -5836,6 +5869,7 @@
vars.$target = vars.$next = null; vars.$target = vars.$next = null;
// will update stickyHeaders, just in case, see #912 // will update stickyHeaders, just in case, see #912
c.$table.triggerHandler('stickyHeadersUpdate'); c.$table.triggerHandler('stickyHeadersUpdate');
c.$table.triggerHandler('resizableComplete');
} }
}; };

View File

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

View File

@ -4,7 +4,7 @@
*/ */
/*! tablesorter (FORK) - updated 07-04-2017 (v2.28.15)*/ /*! tablesorter (FORK) - updated 09-27-2017 (v2.29.0)*/
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */ /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
(function(factory) { (function(factory) {
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
@ -133,7 +133,7 @@
})(jQuery, window, document); })(jQuery, window, document);
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */ /*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
;(function ($) { ;(function ($) {
'use strict'; 'use strict';
var ts = $.tablesorter || {}; var ts = $.tablesorter || {};
@ -2336,7 +2336,7 @@
})( jQuery ); })( jQuery );
/*! Widget: stickyHeaders - updated 6/2/2017 (v2.28.13) *//* /*! Widget: stickyHeaders - updated 9/27/2017 (v2.29.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.4.3+ * Requires tablesorter v2.8+ and jQuery 1.4.3+
* by Rob Garrison * by Rob Garrison
*/ */
@ -2488,10 +2488,14 @@
}); });
} }
}, },
getLeftPosition = function() {
return $attach.length ?
parseInt($attach.css('padding-left'), 10) || 0 :
$table.offset().left - parseInt($table.css('margin-left'), 10) - $(window).scrollLeft();
},
resizeHeader = function() { resizeHeader = function() {
$stickyWrap.css({ $stickyWrap.css({
left : $attach.length ? parseInt($attach.css('padding-left'), 10) || 0 : left : getLeftPosition(),
$table.offset().left - parseInt($table.css('margin-left'), 10) - $xScroll.scrollLeft(),
width: $table.outerWidth() width: $table.outerWidth()
}); });
setWidth( $table, $stickyTable ); setWidth( $table, $stickyTable );
@ -2501,10 +2505,10 @@
if (!$table.is(':visible')) { return; } // fixes #278 if (!$table.is(':visible')) { return; } // fixes #278
// Detect nested tables - fixes #724 // Detect nested tables - fixes #724
nestedStickyTop = $nestedSticky.length ? $nestedSticky.offset().top - $yScroll.scrollTop() + $nestedSticky.height() : 0; nestedStickyTop = $nestedSticky.length ? $nestedSticky.offset().top - $yScroll.scrollTop() + $nestedSticky.height() : 0;
var offset = $table.offset(), var tmp,
offset = $table.offset(),
stickyOffset = getStickyOffset(c, wo), stickyOffset = getStickyOffset(c, wo),
yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3 yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3
xWindow = $.isWindow( $xScroll[0] ),
attachTop = $attach.length ? attachTop = $attach.length ?
( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) : ( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) :
$yScroll.scrollTop(), $yScroll.scrollTop(),
@ -2512,19 +2516,27 @@
scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight, scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight,
tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight, tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight,
isVisible = ( scrollTop > offset.top ) && ( scrollTop < offset.top + tableHeight ) ? 'visible' : 'hidden', isVisible = ( scrollTop > offset.top ) && ( scrollTop < offset.top + tableHeight ) ? 'visible' : 'hidden',
state = isVisible === 'visible' ? ts.css.stickyVis : ts.css.stickyHide,
needsUpdating = !$stickyWrap.hasClass( state ),
cssSettings = { visibility : isVisible }; cssSettings = { visibility : isVisible };
if ($attach.length) { if ($attach.length) {
// attached sticky headers always need updating
needsUpdating = true;
cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop(); cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop();
} }
if (xWindow) {
// adjust when scrolling horizontally - fixes issue #143 // adjust when scrolling horizontally - fixes issue #143
cssSettings.left = $table.offset().left - parseInt($table.css('margin-left'), 10) - $xScroll.scrollLeft(); tmp = getLeftPosition();
if (tmp !== parseInt($stickyWrap.css('left'), 10)) {
needsUpdating = true;
cssSettings.left = tmp;
} }
cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop; cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop;
if (needsUpdating) {
$stickyWrap $stickyWrap
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide ) .removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
.addClass( isVisible === 'visible' ? ts.css.stickyVis : ts.css.stickyHide ) .addClass( state )
.css(cssSettings); .css(cssSettings);
}
if (isVisible !== laststate || resizing) { if (isVisible !== laststate || resizing) {
// make sure the column widths match // make sure the column widths match
resizeHeader(); resizeHeader();
@ -2643,7 +2655,7 @@
})(jQuery, window); })(jQuery, window);
/*! Widget: resizable - updated 4/18/2017 (v2.28.8) */ /*! Widget: resizable - updated 9/27/2017 (v2.29.0) */
/*jshint browser:true, jquery:true, unused:false */ /*jshint browser:true, jquery:true, unused:false */
;(function ($, window) { ;(function ($, window) {
'use strict'; 'use strict';
@ -2970,6 +2982,7 @@
vars.$target = vars.$next = null; vars.$target = vars.$next = null;
// will update stickyHeaders, just in case, see #912 // will update stickyHeaders, just in case, see #912
c.$table.triggerHandler('stickyHeadersUpdate'); c.$table.triggerHandler('stickyHeadersUpdate');
c.$table.triggerHandler('resizableComplete');
} }
}; };

View File

@ -1,4 +1,4 @@
/* Widget: columnSelector (responsive table widget) - updated 7/4/2017 (v2.28.15) *//* /* Widget: columnSelector (responsive table widget) - updated 9/27/2017 (v2.29.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+ * Requires tablesorter v2.8+ and jQuery 1.7+
* by Justin Hallett & Rob Garrison * by Justin Hallett & Rob Garrison
*/ */

View File

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

View File

@ -1,4 +1,4 @@
/*! Widget: output - updated 7/5/2017 (v2.28.16) *//* /*! Widget: output - updated 9/27/2017 (v2.29.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.7+ * Requires tablesorter v2.8+ and jQuery 1.7+
* Modified from: * Modified from:
* HTML Table to CSV: http://www.kunalbabre.com/projects/table2CSV.php (License unknown?) * HTML Table to CSV: http://www.kunalbabre.com/projects/table2CSV.php (License unknown?)

View File

@ -1,4 +1,4 @@
/*! Widget: resizable - updated 4/18/2017 (v2.28.8) */ /*! Widget: resizable - updated 9/27/2017 (v2.29.0) */
/*jshint browser:true, jquery:true, unused:false */ /*jshint browser:true, jquery:true, unused:false */
;(function ($, window) { ;(function ($, window) {
'use strict'; 'use strict';

View File

@ -1,4 +1,4 @@
/*! Widget: scroller - updated 4/18/2017 (v2.28.8) *//* /*! Widget: scroller - updated 9/27/2017 (v2.29.0) *//*
Copyright (C) 2011 T. Connell & Associates, Inc. Copyright (C) 2011 T. Connell & Associates, Inc.
Dual-licensed under the MIT and GPL licenses Dual-licensed under the MIT and GPL licenses

View File

@ -1,4 +1,4 @@
/*! Widget: sort2Hash (BETA) - updated 7/4/2017 (v2.28.15) */ /*! Widget: sort2Hash (BETA) - updated 9/27/2017 (v2.29.0) */
/* Requires tablesorter v2.8+ and jQuery 1.7+ /* Requires tablesorter v2.8+ and jQuery 1.7+
* by Rob Garrison * by Rob Garrison
*/ */

View File

@ -1,4 +1,4 @@
/*! Widget: stickyHeaders - updated 6/2/2017 (v2.28.13) *//* /*! Widget: stickyHeaders - updated 9/27/2017 (v2.29.0) *//*
* Requires tablesorter v2.8+ and jQuery 1.4.3+ * Requires tablesorter v2.8+ and jQuery 1.4.3+
* by Rob Garrison * by Rob Garrison
*/ */

View File

@ -1,4 +1,4 @@
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */ /*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
;(function ($) { ;(function ($) {
'use strict'; 'use strict';
var ts = $.tablesorter || {}; var ts = $.tablesorter || {};

View File

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

View File

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