mirror of
https://github.com/Mottie/tablesorter.git
synced 2025-01-12 15:24:21 +00:00
2.29.0
This commit is contained in:
parent
b3cde8c680
commit
b6647faba5
51
README.md
51
README.md
@ -104,6 +104,45 @@ If you would like to contribute, please...
|
||||
|
||||
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 & fix docs. See [issue #1432](https://github.com/Mottie/tablesorter/issues/1432).
|
||||
* Docs:
|
||||
* Miscellaneous fixes and updates.
|
||||
* Add more info about zebra widget when the table is not visible. See [PR #1438](https://github.com/Mottie/tablesorter/pull/1438); thanks [@Federico-G](https://github.com/Federico-G)!
|
||||
* Fix alignCharacter widget reference to css4.
|
||||
* Update userfrosting link in the readme.
|
||||
* Update to Bootstrap v4.0.0-beta.
|
||||
* Fix colspan demo.
|
||||
* Themes:
|
||||
* Rename `icon-white` to `bootstrap-icon-white`. Fixes [issue #1432](https://github.com/Mottie/tablesorter/issues/1432).
|
||||
* Meta:
|
||||
* Update dependencies.
|
||||
* Build: maintain ie8 support to fix [issue #1431](https://github.com/Mottie/tablesorter/issues/1431).
|
||||
|
||||
#### <a name="v2.28.15">Version 2.28.15</a> (7/4/2017)
|
||||
|
||||
* Core:
|
||||
@ -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.
|
||||
* Meta:
|
||||
* 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.
|
||||
|
114
dist/js/jquery.tablesorter.combined.js
vendored
114
dist/js/jquery.tablesorter.combined.js
vendored
@ -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 ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -10,7 +10,7 @@
|
||||
}
|
||||
}(function(jQuery) {
|
||||
|
||||
/*! TableSorter (FORK) v2.28.15 *//*
|
||||
/*! TableSorter (FORK) v2.29.0 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -34,7 +34,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.28.15',
|
||||
version : '2.29.0',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
@ -433,10 +433,10 @@
|
||||
e.stopPropagation();
|
||||
ts.applyWidgetId( this, id );
|
||||
})
|
||||
.bind( 'applyWidgets' + namespace, function( e, init ) {
|
||||
.bind( 'applyWidgets' + namespace, function( e, callback ) {
|
||||
e.stopPropagation();
|
||||
// apply widgets
|
||||
ts.applyWidget( this, init );
|
||||
// apply widgets (false = not initializing)
|
||||
ts.applyWidget( this, false, callback );
|
||||
})
|
||||
.bind( 'refreshWidgets' + namespace, function( e, all, dontapply ) {
|
||||
e.stopPropagation();
|
||||
@ -473,9 +473,9 @@
|
||||
downTarget = null;
|
||||
if ( core !== true ) {
|
||||
$headers.addClass( namespace.slice( 1 ) + '_extra_headers' );
|
||||
tmp = $.fn.closest ? $headers.closest( 'table' )[ 0 ] : $headers.parents( 'table' )[ 0 ];
|
||||
if ( tmp && tmp.nodeName === 'TABLE' && tmp !== table ) {
|
||||
$( tmp ).addClass( namespace.slice( 1 ) + '_extra_table' );
|
||||
tmp = ts.getClosest( $headers, 'table' );
|
||||
if ( tmp.length && tmp[ 0 ].nodeName === 'TABLE' && tmp[ 0 ] !== table ) {
|
||||
$( tmp[ 0 ] ).addClass( namespace.slice( 1 ) + '_extra_table' );
|
||||
}
|
||||
}
|
||||
tmp = ( c.pointerDown + ' ' + c.pointerUp + ' ' + c.pointerClick + ' sort keyup ' )
|
||||
@ -527,8 +527,7 @@
|
||||
ts.buildCache( c );
|
||||
}
|
||||
// jQuery v1.2.6 doesn't have closest()
|
||||
$cell = $.fn.closest ? $( this ).closest( 'th, td' ) :
|
||||
/TH|TD/.test( this.nodeName ) ? $( this ) : $( this ).parents( 'th, td' );
|
||||
$cell = ts.getHeaderCell( $( this ) );
|
||||
// reference original table headers and find the same cell
|
||||
// don't use $headers or IE8 throws an error - see #987
|
||||
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
|
||||
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 );
|
||||
// ignore cell (don't add it to c.$headers) if row has ignoreRow class
|
||||
if ( $elem.parent().hasClass( c.cssIgnoreRow ) ) { return; }
|
||||
@ -594,7 +593,9 @@
|
||||
if ( c.onRenderHeader ) {
|
||||
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;
|
||||
tmp = ts.getOrder( ts.getData( $elem, configHeaders, 'sortInitialOrder' ) || c.sortInitialOrder );
|
||||
// this may get updated numerous times if there are multiple rows
|
||||
@ -612,10 +613,9 @@
|
||||
}
|
||||
// add cell to headerList
|
||||
c.headerList[ index ] = elem;
|
||||
$elem.addClass( ts.css.header + ' ' + c.cssHeader );
|
||||
// add to parent in case there are multiple rows
|
||||
$elem
|
||||
.addClass( ts.css.header + ' ' + c.cssHeader )
|
||||
.parent()
|
||||
ts.getClosest( $elem, 'tr' )
|
||||
.addClass( ts.css.headerRow + ' ' + c.cssHeaderRow )
|
||||
.attr( 'role', 'row' );
|
||||
// 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
|
||||
setColumnAriaLabel : function( c, $header, nextSort ) {
|
||||
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 ],
|
||||
tmp = $header.hasClass( ts.css.sortAsc ) ?
|
||||
'sortAsc' :
|
||||
@ -1334,10 +1353,9 @@
|
||||
$cell = $( cell ),
|
||||
// update cache - format: function( s, table, cell, cellIndex )
|
||||
// no closest in jQuery v1.2.6
|
||||
tbodyIndex = $tbodies
|
||||
.index( $.fn.closest ? $cell.closest( 'tbody' ) : $cell.parents( 'tbody' ).filter( ':first' ) ),
|
||||
tbodyIndex = $tbodies.index( ts.getClosest( $cell, 'tbody' ) ),
|
||||
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
|
||||
// tbody may not exist if update is initialized while tbody is removed for processing
|
||||
if ( $tbodies.length && tbodyIndex >= 0 ) {
|
||||
@ -1392,11 +1410,13 @@
|
||||
if ( valid ) {
|
||||
$row = $( $row );
|
||||
c.$tbodies.append( $row );
|
||||
} else if ( !$row ||
|
||||
} else if (
|
||||
!$row ||
|
||||
// row is a jQuery object?
|
||||
!( $row instanceof jQuery ) ||
|
||||
// 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 ) {
|
||||
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' );
|
||||
@ -1543,10 +1563,10 @@
|
||||
notMultiSort = !event[ c.sortMultiSortKey ],
|
||||
table = c.table,
|
||||
len = c.$headers.length,
|
||||
// get current column index
|
||||
col = parseInt( $( cell ).attr( 'data-column' ), 10 ),
|
||||
// get current column index; *always* stored on th/td
|
||||
$th = ts.getHeaderCell( $( cell ) ),
|
||||
col = parseInt( $th.attr( 'data-column' ), 10 ),
|
||||
order = c.sortVars[ col ].order;
|
||||
|
||||
// Only call sortStart if sorting is enabled
|
||||
c.$table.triggerHandler( 'sortStart', table );
|
||||
// get current column sort order
|
||||
@ -2070,7 +2090,7 @@
|
||||
if ( !widget.priority ) { widget.priority = 10; }
|
||||
widgets[ indx ] = widget;
|
||||
} 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
|
||||
@ -2142,6 +2162,7 @@
|
||||
c.widgetInit[ name[ index ] ] = false;
|
||||
}
|
||||
}
|
||||
c.$table.triggerHandler( 'widgetRemoveEnd', table );
|
||||
},
|
||||
|
||||
refreshWidgets : function( table, doAll, dontapply ) {
|
||||
@ -2993,7 +3014,7 @@
|
||||
|
||||
})(jQuery, window, document);
|
||||
|
||||
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */
|
||||
/*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
|
||||
;(function ($) {
|
||||
'use strict';
|
||||
var ts = $.tablesorter || {};
|
||||
@ -5196,7 +5217,7 @@
|
||||
|
||||
})( 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+
|
||||
* 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() {
|
||||
$stickyWrap.css({
|
||||
left : $attach.length ? parseInt($attach.css('padding-left'), 10) || 0 :
|
||||
$table.offset().left - parseInt($table.css('margin-left'), 10) - $xScroll.scrollLeft(),
|
||||
left : getLeftPosition(),
|
||||
width: $table.outerWidth()
|
||||
});
|
||||
setWidth( $table, $stickyTable );
|
||||
@ -5361,10 +5386,10 @@
|
||||
if (!$table.is(':visible')) { return; } // fixes #278
|
||||
// Detect nested tables - fixes #724
|
||||
nestedStickyTop = $nestedSticky.length ? $nestedSticky.offset().top - $yScroll.scrollTop() + $nestedSticky.height() : 0;
|
||||
var offset = $table.offset(),
|
||||
var tmp,
|
||||
offset = $table.offset(),
|
||||
stickyOffset = getStickyOffset(c, wo),
|
||||
yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3
|
||||
xWindow = $.isWindow( $xScroll[0] ),
|
||||
attachTop = $attach.length ?
|
||||
( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) :
|
||||
$yScroll.scrollTop(),
|
||||
@ -5372,19 +5397,27 @@
|
||||
scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight,
|
||||
tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight,
|
||||
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 };
|
||||
if ($attach.length) {
|
||||
// attached sticky headers always need updating
|
||||
needsUpdating = true;
|
||||
cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop();
|
||||
}
|
||||
if (xWindow) {
|
||||
// adjust when scrolling horizontally - fixes issue #143
|
||||
cssSettings.left = $table.offset().left - parseInt($table.css('margin-left'), 10) - $xScroll.scrollLeft();
|
||||
// adjust when scrolling horizontally - fixes issue #143
|
||||
tmp = getLeftPosition();
|
||||
if (tmp !== parseInt($stickyWrap.css('left'), 10)) {
|
||||
needsUpdating = true;
|
||||
cssSettings.left = tmp;
|
||||
}
|
||||
cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop;
|
||||
$stickyWrap
|
||||
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
|
||||
.addClass( isVisible === 'visible' ? ts.css.stickyVis : ts.css.stickyHide )
|
||||
.css(cssSettings);
|
||||
if (needsUpdating) {
|
||||
$stickyWrap
|
||||
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
|
||||
.addClass( state )
|
||||
.css(cssSettings);
|
||||
}
|
||||
if (isVisible !== laststate || resizing) {
|
||||
// make sure the column widths match
|
||||
resizeHeader();
|
||||
@ -5503,7 +5536,7 @@
|
||||
|
||||
})(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 */
|
||||
;(function ($, window) {
|
||||
'use strict';
|
||||
@ -5830,6 +5863,7 @@
|
||||
vars.$target = vars.$next = null;
|
||||
// will update stickyHeaders, just in case, see #912
|
||||
c.$table.triggerHandler('stickyHeadersUpdate');
|
||||
c.$table.triggerHandler('resizableComplete');
|
||||
}
|
||||
};
|
||||
|
||||
|
4
dist/js/jquery.tablesorter.combined.min.js
vendored
4
dist/js/jquery.tablesorter.combined.min.js
vendored
File diff suppressed because one or more lines are too long
71
dist/js/jquery.tablesorter.js
vendored
71
dist/js/jquery.tablesorter.js
vendored
@ -8,7 +8,7 @@
|
||||
}
|
||||
}(function(jQuery) {
|
||||
|
||||
/*! TableSorter (FORK) v2.28.15 *//*
|
||||
/*! TableSorter (FORK) v2.29.0 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -32,7 +32,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.28.15',
|
||||
version : '2.29.0',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
@ -431,10 +431,10 @@
|
||||
e.stopPropagation();
|
||||
ts.applyWidgetId( this, id );
|
||||
})
|
||||
.bind( 'applyWidgets' + namespace, function( e, init ) {
|
||||
.bind( 'applyWidgets' + namespace, function( e, callback ) {
|
||||
e.stopPropagation();
|
||||
// apply widgets
|
||||
ts.applyWidget( this, init );
|
||||
// apply widgets (false = not initializing)
|
||||
ts.applyWidget( this, false, callback );
|
||||
})
|
||||
.bind( 'refreshWidgets' + namespace, function( e, all, dontapply ) {
|
||||
e.stopPropagation();
|
||||
@ -471,9 +471,9 @@
|
||||
downTarget = null;
|
||||
if ( core !== true ) {
|
||||
$headers.addClass( namespace.slice( 1 ) + '_extra_headers' );
|
||||
tmp = $.fn.closest ? $headers.closest( 'table' )[ 0 ] : $headers.parents( 'table' )[ 0 ];
|
||||
if ( tmp && tmp.nodeName === 'TABLE' && tmp !== table ) {
|
||||
$( tmp ).addClass( namespace.slice( 1 ) + '_extra_table' );
|
||||
tmp = ts.getClosest( $headers, 'table' );
|
||||
if ( tmp.length && tmp[ 0 ].nodeName === 'TABLE' && tmp[ 0 ] !== table ) {
|
||||
$( tmp[ 0 ] ).addClass( namespace.slice( 1 ) + '_extra_table' );
|
||||
}
|
||||
}
|
||||
tmp = ( c.pointerDown + ' ' + c.pointerUp + ' ' + c.pointerClick + ' sort keyup ' )
|
||||
@ -525,8 +525,7 @@
|
||||
ts.buildCache( c );
|
||||
}
|
||||
// jQuery v1.2.6 doesn't have closest()
|
||||
$cell = $.fn.closest ? $( this ).closest( 'th, td' ) :
|
||||
/TH|TD/.test( this.nodeName ) ? $( this ) : $( this ).parents( 'th, td' );
|
||||
$cell = ts.getHeaderCell( $( this ) );
|
||||
// reference original table headers and find the same cell
|
||||
// don't use $headers or IE8 throws an error - see #987
|
||||
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
|
||||
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 );
|
||||
// ignore cell (don't add it to c.$headers) if row has ignoreRow class
|
||||
if ( $elem.parent().hasClass( c.cssIgnoreRow ) ) { return; }
|
||||
@ -592,7 +591,9 @@
|
||||
if ( c.onRenderHeader ) {
|
||||
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;
|
||||
tmp = ts.getOrder( ts.getData( $elem, configHeaders, 'sortInitialOrder' ) || c.sortInitialOrder );
|
||||
// this may get updated numerous times if there are multiple rows
|
||||
@ -610,10 +611,9 @@
|
||||
}
|
||||
// add cell to headerList
|
||||
c.headerList[ index ] = elem;
|
||||
$elem.addClass( ts.css.header + ' ' + c.cssHeader );
|
||||
// add to parent in case there are multiple rows
|
||||
$elem
|
||||
.addClass( ts.css.header + ' ' + c.cssHeader )
|
||||
.parent()
|
||||
ts.getClosest( $elem, 'tr' )
|
||||
.addClass( ts.css.headerRow + ' ' + c.cssHeaderRow )
|
||||
.attr( 'role', 'row' );
|
||||
// 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
|
||||
setColumnAriaLabel : function( c, $header, nextSort ) {
|
||||
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 ],
|
||||
tmp = $header.hasClass( ts.css.sortAsc ) ?
|
||||
'sortAsc' :
|
||||
@ -1332,10 +1351,9 @@
|
||||
$cell = $( cell ),
|
||||
// update cache - format: function( s, table, cell, cellIndex )
|
||||
// no closest in jQuery v1.2.6
|
||||
tbodyIndex = $tbodies
|
||||
.index( $.fn.closest ? $cell.closest( 'tbody' ) : $cell.parents( 'tbody' ).filter( ':first' ) ),
|
||||
tbodyIndex = $tbodies.index( ts.getClosest( $cell, 'tbody' ) ),
|
||||
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
|
||||
// tbody may not exist if update is initialized while tbody is removed for processing
|
||||
if ( $tbodies.length && tbodyIndex >= 0 ) {
|
||||
@ -1390,11 +1408,13 @@
|
||||
if ( valid ) {
|
||||
$row = $( $row );
|
||||
c.$tbodies.append( $row );
|
||||
} else if ( !$row ||
|
||||
} else if (
|
||||
!$row ||
|
||||
// row is a jQuery object?
|
||||
!( $row instanceof jQuery ) ||
|
||||
// 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 ) {
|
||||
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' );
|
||||
@ -1541,10 +1561,10 @@
|
||||
notMultiSort = !event[ c.sortMultiSortKey ],
|
||||
table = c.table,
|
||||
len = c.$headers.length,
|
||||
// get current column index
|
||||
col = parseInt( $( cell ).attr( 'data-column' ), 10 ),
|
||||
// get current column index; *always* stored on th/td
|
||||
$th = ts.getHeaderCell( $( cell ) ),
|
||||
col = parseInt( $th.attr( 'data-column' ), 10 ),
|
||||
order = c.sortVars[ col ].order;
|
||||
|
||||
// Only call sortStart if sorting is enabled
|
||||
c.$table.triggerHandler( 'sortStart', table );
|
||||
// get current column sort order
|
||||
@ -2068,7 +2088,7 @@
|
||||
if ( !widget.priority ) { widget.priority = 10; }
|
||||
widgets[ indx ] = widget;
|
||||
} 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
|
||||
@ -2140,6 +2160,7 @@
|
||||
c.widgetInit[ name[ index ] ] = false;
|
||||
}
|
||||
}
|
||||
c.$table.triggerHandler( 'widgetRemoveEnd', table );
|
||||
},
|
||||
|
||||
refreshWidgets : function( table, doAll, dontapply ) {
|
||||
|
2
dist/js/jquery.tablesorter.min.js
vendored
2
dist/js/jquery.tablesorter.min.js
vendored
File diff suppressed because one or more lines are too long
43
dist/js/jquery.tablesorter.widgets.js
vendored
43
dist/js/jquery.tablesorter.widgets.js
vendored
@ -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 ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -127,7 +127,7 @@
|
||||
|
||||
})(jQuery, window, document);
|
||||
|
||||
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */
|
||||
/*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
|
||||
;(function ($) {
|
||||
'use strict';
|
||||
var ts = $.tablesorter || {};
|
||||
@ -2330,7 +2330,7 @@
|
||||
|
||||
})( 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+
|
||||
* 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() {
|
||||
$stickyWrap.css({
|
||||
left : $attach.length ? parseInt($attach.css('padding-left'), 10) || 0 :
|
||||
$table.offset().left - parseInt($table.css('margin-left'), 10) - $xScroll.scrollLeft(),
|
||||
left : getLeftPosition(),
|
||||
width: $table.outerWidth()
|
||||
});
|
||||
setWidth( $table, $stickyTable );
|
||||
@ -2495,10 +2499,10 @@
|
||||
if (!$table.is(':visible')) { return; } // fixes #278
|
||||
// Detect nested tables - fixes #724
|
||||
nestedStickyTop = $nestedSticky.length ? $nestedSticky.offset().top - $yScroll.scrollTop() + $nestedSticky.height() : 0;
|
||||
var offset = $table.offset(),
|
||||
var tmp,
|
||||
offset = $table.offset(),
|
||||
stickyOffset = getStickyOffset(c, wo),
|
||||
yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3
|
||||
xWindow = $.isWindow( $xScroll[0] ),
|
||||
attachTop = $attach.length ?
|
||||
( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) :
|
||||
$yScroll.scrollTop(),
|
||||
@ -2506,19 +2510,27 @@
|
||||
scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight,
|
||||
tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight,
|
||||
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 };
|
||||
if ($attach.length) {
|
||||
// attached sticky headers always need updating
|
||||
needsUpdating = true;
|
||||
cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop();
|
||||
}
|
||||
if (xWindow) {
|
||||
// adjust when scrolling horizontally - fixes issue #143
|
||||
cssSettings.left = $table.offset().left - parseInt($table.css('margin-left'), 10) - $xScroll.scrollLeft();
|
||||
// adjust when scrolling horizontally - fixes issue #143
|
||||
tmp = getLeftPosition();
|
||||
if (tmp !== parseInt($stickyWrap.css('left'), 10)) {
|
||||
needsUpdating = true;
|
||||
cssSettings.left = tmp;
|
||||
}
|
||||
cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop;
|
||||
$stickyWrap
|
||||
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
|
||||
.addClass( isVisible === 'visible' ? ts.css.stickyVis : ts.css.stickyHide )
|
||||
.css(cssSettings);
|
||||
if (needsUpdating) {
|
||||
$stickyWrap
|
||||
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
|
||||
.addClass( state )
|
||||
.css(cssSettings);
|
||||
}
|
||||
if (isVisible !== laststate || resizing) {
|
||||
// make sure the column widths match
|
||||
resizeHeader();
|
||||
@ -2637,7 +2649,7 @@
|
||||
|
||||
})(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 */
|
||||
;(function ($, window) {
|
||||
'use strict';
|
||||
@ -2964,6 +2976,7 @@
|
||||
vars.$target = vars.$next = null;
|
||||
// will update stickyHeaders, just in case, see #912
|
||||
c.$table.triggerHandler('stickyHeadersUpdate');
|
||||
c.$table.triggerHandler('resizableComplete');
|
||||
}
|
||||
};
|
||||
|
||||
|
4
dist/js/jquery.tablesorter.widgets.min.js
vendored
4
dist/js/jquery.tablesorter.widgets.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/widgets/widget-columnSelector.min.js
vendored
2
dist/js/widgets/widget-columnSelector.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/js/widgets/widget-grouping.min.js
vendored
4
dist/js/widgets/widget-grouping.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/widgets/widget-output.min.js
vendored
2
dist/js/widgets/widget-output.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/js/widgets/widget-resizable.min.js
vendored
4
dist/js/widgets/widget-resizable.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/js/widgets/widget-scroller.min.js
vendored
4
dist/js/widgets/widget-scroller.min.js
vendored
File diff suppressed because one or more lines are too long
4
dist/js/widgets/widget-sort2Hash.min.js
vendored
4
dist/js/widgets/widget-sort2Hash.min.js
vendored
@ -1,2 +1,2 @@
|
||||
/*! Widget: sort2Hash (BETA) - updated 7/4/2017 (v2.28.15) */
|
||||
!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);
|
||||
/*! Widget: sort2Hash (BETA) - updated 9/27/2017 (v2.29.0) */
|
||||
!function(e){"use strict";var t=e.tablesorter||{},a=t.sort2Hash={init:function(r,o){var s,n,i,h,l=r.table,d=r.pager,c=t.hasWidget(l,"saveSort"),H=a.decodeHash(r,o,"sort");(H&&!c||H&&c&&o.sort2Hash_overrideSaveSort)&&a.convertString2Sort(r,o,H),t.hasWidget(r.table,"pager")&&(n=parseInt(a.decodeHash(r,o,"page"),10),i=d.page=n<0?0:n>d.totalPages?d.totalPages-1:n,h=d.size=parseInt(a.decodeHash(r,o,"size"),10)),t.hasWidget(l,"filter")&&(s=a.decodeHash(r,o,"filter"))&&(s=s.split(o.sort2Hash_separator),r.$table.one("tablesorter-ready",function(){setTimeout(function(){r.$table.one("filterEnd",function(){e(this).triggerHandler("pageAndSize",[i,h])}),(n=t.filter.equalFilters?t.filter.equalFilters(r,r.lastSearch,s):(r.lastSearch||[]).join("")!==(s||[]).join(""))||e.tablesorter.setFilters(l,s,!0)},100)})),s||r.$table.one("tablesorter-ready",function(){r.$table.triggerHandler("pageAndSize",[i,h])}),r.$table.on("sortEnd.sort2hash filterEnd.sort2hash pagerComplete.sort2Hash",function(){this.hasInitialized&&a.setHash(this.config,this.config.widgetOptions)})},getTableId:function(t,a){return a.sort2Hash_tableId||t.table.id||"table"+e("table").index(t.$table)},regexEscape:function(e){return e.replace(/([\.\^\$\*\+\-\?\(\)\[\]\{\}\\\|])/g,"\\$1")},convertString2Sort:function(e,t,r){for(var o,s,n,i,h,l,d=r.split(t.sort2Hash_separator),c=0,H=d.length,g=[];c<H;){if(s=d[c++],i=parseInt(s,10),isNaN(i)||i>e.columns)for(o=new RegExp("("+a.regexEscape(s)+")","i"),h=0;h<e.columns;h++)l=e.$headerIndexed[h],o.test(l.attr(t.sort2Hash_headerTextAttr))&&(s=h,h=e.columns);n=d[c++],void 0!==s&&void 0!==n&&(isNaN(n)&&(n=n.indexOf(t.sort2Hash_directionText[1])>-1?1:0),g.push([s,n]))}g.length&&(e.sortList=g)},convertSort2String:function(t,a){var r,o,s,n,i=[],h=t.sortList||[],l=h.length;for(r=0;r<l;r++)s=h[r][0],o=e.trim(t.$headerIndexed[s].attr(a.sort2Hash_headerTextAttr)),i.push(""!==o?encodeURIComponent(o):s),n=a.sort2Hash_directionText[h[r][1]],i.push(n);return i.join(a.sort2Hash_separator)},convertFilter2String:function(t,a){var r,o,s,n,i=[],h=t.sortList||[],l=h.length;for(r=0;r<l;r++)s=h[r][0],s=void 0!==(o=e.trim(t.$headerIndexed[s].attr(a.sort2Hash_headerTextAttr)))?encodeURIComponent(o):s,i.push(s),n=a.sort2Hash_directionText[h[r][1]],i.push(n);return i.join(a.sort2Hash_separator)},getParam:function(e,t,r){t||(t=window.location.hash);var o=new RegExp("[\\?&]"+a.regexEscape(e)+"=([^&#]*)"),s=o.exec(t);return r?o:null===s?"":decodeURIComponent(s[1])},removeParam:function(e,t){t||(t=window.location.hash);var r,o=a.getParam(e,t,!0),s=[],n=t.split("&"),i=n.length;for(r=0;r<i;r++)o.test("&"+n[r])||s.push(n[r]);return s.length?s.join("&"):""},encodeHash:function(e,t,r,o,s){var n=!1,i=a.getTableId(e,t);return"function"==typeof t.sort2Hash_encodeHash&&(n=t.sort2Hash_encodeHash(e,i,r,o,s||o)),!1===n&&(n="&"+r+"["+i+"]="+o),n},decodeHash:function(e,t,r){var o=!1,s=a.getTableId(e,t);return"function"==typeof t.sort2Hash_decodeHash&&(o=t.sort2Hash_decodeHash(e,s,r)),!1===o&&(o=a.getParam(r+"["+s+"]")),o||""},cleanHash:function(e,t,r,o){var s=!1,n=a.getTableId(e,t);return"function"==typeof t.sort2Hash_cleanHash&&(s=t.sort2Hash_cleanHash(e,n,r,o)),!1===s&&(s=a.removeParam(r+"["+n+"]",o)),s||""},setHash:function(r,o){var s="",n=window.location.hash,i=t.hasWidget(r.table,"pager"),h=t.hasWidget(r.table,"filter"),l=a.convertSort2String(r,o),d=h&&""!==r.lastSearch.join("")?r.lastSearch:[],c=encodeURIComponent(d.join(r.widgetOptions.sort2Hash_separator)),H={sort:l?a.encodeHash(r,o,"sort",l,r.sortList):"",page:i?a.encodeHash(r,o,"page",r.pager.page+1):"",size:i?a.encodeHash(r,o,"size",r.pager.size):"",filter:c?a.encodeHash(r,o,"filter",c,d):""};e.each(H,function(e,t){n=a.cleanHash(r,o,e,n),s+=t});var g=o.sort2Hash_hash,p=((window.location.hash||"").replace(g,"").length?n:g)+s;if(o.sort2Hash_replaceHistory){var u=window.location.href.split(g)[0];p[0]!=g&&(p=g+p),window.location.replace(u+p)}else window.location.hash=p}};t.addWidget({id:"sort2Hash",priority:60,options:{sort2Hash_hash:"#",sort2Hash_separator:"-",sort2Hash_headerTextAttr:"data-header",sort2Hash_directionText:[0,1],sort2Hash_overrideSaveSort:!1,sort2Hash_replaceHistory:!1,sort2Hash_tableId:null,sort2Hash_encodeHash:null,sort2Hash_decodeHash:null,sort2Hash_cleanHash:null},init:function(e,t,r,o){a.init(r,o)},remove:function(e,t){t.$table.off(".sort2hash")}})}(jQuery);
|
4
dist/js/widgets/widget-stickyHeaders.min.js
vendored
4
dist/js/widgets/widget-stickyHeaders.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/widgets/widget-uitheme.min.js
vendored
2
dist/js/widgets/widget-uitheme.min.js
vendored
@ -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);
|
2
dist/js/widgets/widget-view.min.js
vendored
2
dist/js/widgets/widget-view.min.js
vendored
@ -1 +1 @@
|
||||
!function(e){"use strict";var t,i,a,o=e.tablesorter,n=!1,l=o.view={copyCaption:function(t,i){l.removeCaption(t,i),t.$table.find("caption").length>0&&e(i.view_caption).text(t.$table.find("caption").text())},removeCaption:function(t,i){e(i.view_caption).empty()},buildToolBar:function(t,i){l.removeToolBar(t,i),l.copyCaption(t,i);var a=e(i.view_toolbar);e.each(i.view_layouts,function(t,o){var n=i.view_switcher_class;t==i.view_layout&&(n+=" active");var l=e("<a>",{href:"#",class:n,"data-view-type":t,title:o.title});l.append(e("<i>",{class:o.icon})),a.append(l)}),a.find("."+i.view_switcher_class).on("click",function(o){if(o.preventDefault(),e(this).hasClass("active"))return!1;a.find("."+i.view_switcher_class).removeClass("active"),e(this).addClass("active"),i.view_layout=e(this).attr("data-view-type"),!0===i.view_layouts[i.view_layout].raw?(l.remove(t,i),l.buildToolBar(t,i)):(!1===n&&l.hideTable(t,i),l.buildView(t,i))})},removeToolBar:function(t,i){e(i.view_toolbar).empty(),l.removeCaption(t,i)},buildView:function(t,i){l.removeView(t,i);var a=i.view_layouts[i.view_layout],n=e(a.container,{class:i.view_layout});o.getColumnText(t.$table,0,function(t){var i=a.tmpl;e.each(e(t.$row).find("td"),function(t,a){var o={},n="{col"+t+"}";e.each(a.attributes,function(e,t){o[t.nodeName]=t.nodeValue});var l=e(a).html(),r=e("<span />").append(e("<span/>",o).append(l));i=i.replace(new RegExp(n,"g"),r.html()),n="{col"+t+":raw}",i=i.replace(new RegExp(n,"g"),e(a).text())});var o=e(i);e.each(t.$row[0].attributes,function(e,t){"class"==t.nodeName?o.attr(t.nodeName,o.attr(t.nodeName)+" "+t.nodeValue):o.attr(t.nodeName,t.nodeValue)}),n.append(o)}),e(i.view_container).append(n),t.$table.triggerHandler("viewComplete")},removeView:function(t,i){e(i.view_container).empty()},hideTable:function(e,o){t=e.$table.css("position"),i=e.$table.css("bottom"),a=e.$table.css("left"),e.$table.css({position:"absolute",top:"-10000px",left:"-10000px"}),n=!0},init:function(e,t){!1!==t.view_layout&&void 0!==t.view_layouts[t.view_layout]&&(!1===n&&l.hideTable(e,t),e.$table.on("tablesorter-ready",function(){l.buildToolBar(e,t),l.buildView(e,t)}))},remove:function(e,o){l.removeToolBar(e,o),l.removeView(e,o),e.$table.css({position:t,top:i,left:a}),n=!1}};o.addWidget({id:"view",options:{view_toolbar:"#ts-view-toolbar",view_container:"#ts-view",view_caption:"#ts-view-caption",view_switcher_class:"ts-view-switcher",view_layout:!1,view_layouts:{}},init:function(e,t,i,a){l.init(i,a)},remove:function(e,t,i){l.remove(t,i)}})}(jQuery);
|
||||
!function(e){"use strict";var t,i,a,o=e.tablesorter,n=!1,l=o.view={copyCaption:function(t,i){l.removeCaption(t,i),t.$table.find("caption").length>0&&e(i.view_caption).text(t.$table.find("caption").text())},removeCaption:function(t,i){e(i.view_caption).empty()},buildToolBar:function(t,i){l.removeToolBar(t,i),l.copyCaption(t,i);var a=e(i.view_toolbar);e.each(i.view_layouts,function(t,o){var n=i.view_switcher_class;t==i.view_layout&&(n+=" active");var l=e("<a>",{href:"#","class":n,"data-view-type":t,title:o.title});l.append(e("<i>",{"class":o.icon})),a.append(l)}),a.find("."+i.view_switcher_class).on("click",function(o){if(o.preventDefault(),e(this).hasClass("active"))return!1;a.find("."+i.view_switcher_class).removeClass("active"),e(this).addClass("active"),i.view_layout=e(this).attr("data-view-type"),!0===i.view_layouts[i.view_layout].raw?(l.remove(t,i),l.buildToolBar(t,i)):(!1===n&&l.hideTable(t,i),l.buildView(t,i))})},removeToolBar:function(t,i){e(i.view_toolbar).empty(),l.removeCaption(t,i)},buildView:function(t,i){l.removeView(t,i);var a=i.view_layouts[i.view_layout],n=e(a.container,{"class":i.view_layout});o.getColumnText(t.$table,0,function(t){var i=a.tmpl;e.each(e(t.$row).find("td"),function(t,a){var o={},n="{col"+t+"}";e.each(a.attributes,function(e,t){o[t.nodeName]=t.nodeValue});var l=e(a).html(),r=e("<span />").append(e("<span/>",o).append(l));i=i.replace(new RegExp(n,"g"),r.html()),n="{col"+t+":raw}",i=i.replace(new RegExp(n,"g"),e(a).text())});var o=e(i);e.each(t.$row[0].attributes,function(e,t){"class"==t.nodeName?o.attr(t.nodeName,o.attr(t.nodeName)+" "+t.nodeValue):o.attr(t.nodeName,t.nodeValue)}),n.append(o)}),e(i.view_container).append(n),t.$table.triggerHandler("viewComplete")},removeView:function(t,i){e(i.view_container).empty()},hideTable:function(e,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);
|
@ -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="results">†</span> UITheme widget (<span class="version">v2.0.9</span>; <span class="version updated">v2.27.0</span>):
|
||||
<li><span class="results">†</span> UITheme widget (<span class="version">v2.0.9</span>; <span class="version updated">v2.29.0</span>):
|
||||
<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-option-theme-bootstrap-v2.html">Bootstrap v2.x</a> (demo added <span class="version">v2.22.0</span>).</li>
|
||||
|
@ -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 ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -16,7 +16,7 @@
|
||||
}
|
||||
}(function(jQuery) {
|
||||
|
||||
/*! TableSorter (FORK) v2.28.15 *//*
|
||||
/*! TableSorter (FORK) v2.29.0 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -40,7 +40,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.28.15',
|
||||
version : '2.29.0',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
@ -439,10 +439,10 @@
|
||||
e.stopPropagation();
|
||||
ts.applyWidgetId( this, id );
|
||||
})
|
||||
.bind( 'applyWidgets' + namespace, function( e, init ) {
|
||||
.bind( 'applyWidgets' + namespace, function( e, callback ) {
|
||||
e.stopPropagation();
|
||||
// apply widgets
|
||||
ts.applyWidget( this, init );
|
||||
// apply widgets (false = not initializing)
|
||||
ts.applyWidget( this, false, callback );
|
||||
})
|
||||
.bind( 'refreshWidgets' + namespace, function( e, all, dontapply ) {
|
||||
e.stopPropagation();
|
||||
@ -479,9 +479,9 @@
|
||||
downTarget = null;
|
||||
if ( core !== true ) {
|
||||
$headers.addClass( namespace.slice( 1 ) + '_extra_headers' );
|
||||
tmp = $.fn.closest ? $headers.closest( 'table' )[ 0 ] : $headers.parents( 'table' )[ 0 ];
|
||||
if ( tmp && tmp.nodeName === 'TABLE' && tmp !== table ) {
|
||||
$( tmp ).addClass( namespace.slice( 1 ) + '_extra_table' );
|
||||
tmp = ts.getClosest( $headers, 'table' );
|
||||
if ( tmp.length && tmp[ 0 ].nodeName === 'TABLE' && tmp[ 0 ] !== table ) {
|
||||
$( tmp[ 0 ] ).addClass( namespace.slice( 1 ) + '_extra_table' );
|
||||
}
|
||||
}
|
||||
tmp = ( c.pointerDown + ' ' + c.pointerUp + ' ' + c.pointerClick + ' sort keyup ' )
|
||||
@ -533,8 +533,7 @@
|
||||
ts.buildCache( c );
|
||||
}
|
||||
// jQuery v1.2.6 doesn't have closest()
|
||||
$cell = $.fn.closest ? $( this ).closest( 'th, td' ) :
|
||||
/TH|TD/.test( this.nodeName ) ? $( this ) : $( this ).parents( 'th, td' );
|
||||
$cell = ts.getHeaderCell( $( this ) );
|
||||
// reference original table headers and find the same cell
|
||||
// don't use $headers or IE8 throws an error - see #987
|
||||
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
|
||||
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 );
|
||||
// ignore cell (don't add it to c.$headers) if row has ignoreRow class
|
||||
if ( $elem.parent().hasClass( c.cssIgnoreRow ) ) { return; }
|
||||
@ -600,7 +599,9 @@
|
||||
if ( c.onRenderHeader ) {
|
||||
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;
|
||||
tmp = ts.getOrder( ts.getData( $elem, configHeaders, 'sortInitialOrder' ) || c.sortInitialOrder );
|
||||
// this may get updated numerous times if there are multiple rows
|
||||
@ -618,10 +619,9 @@
|
||||
}
|
||||
// add cell to headerList
|
||||
c.headerList[ index ] = elem;
|
||||
$elem.addClass( ts.css.header + ' ' + c.cssHeader );
|
||||
// add to parent in case there are multiple rows
|
||||
$elem
|
||||
.addClass( ts.css.header + ' ' + c.cssHeader )
|
||||
.parent()
|
||||
ts.getClosest( $elem, 'tr' )
|
||||
.addClass( ts.css.headerRow + ' ' + c.cssHeaderRow )
|
||||
.attr( 'role', 'row' );
|
||||
// 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
|
||||
setColumnAriaLabel : function( c, $header, nextSort ) {
|
||||
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 ],
|
||||
tmp = $header.hasClass( ts.css.sortAsc ) ?
|
||||
'sortAsc' :
|
||||
@ -1340,10 +1359,9 @@
|
||||
$cell = $( cell ),
|
||||
// update cache - format: function( s, table, cell, cellIndex )
|
||||
// no closest in jQuery v1.2.6
|
||||
tbodyIndex = $tbodies
|
||||
.index( $.fn.closest ? $cell.closest( 'tbody' ) : $cell.parents( 'tbody' ).filter( ':first' ) ),
|
||||
tbodyIndex = $tbodies.index( ts.getClosest( $cell, 'tbody' ) ),
|
||||
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
|
||||
// tbody may not exist if update is initialized while tbody is removed for processing
|
||||
if ( $tbodies.length && tbodyIndex >= 0 ) {
|
||||
@ -1398,11 +1416,13 @@
|
||||
if ( valid ) {
|
||||
$row = $( $row );
|
||||
c.$tbodies.append( $row );
|
||||
} else if ( !$row ||
|
||||
} else if (
|
||||
!$row ||
|
||||
// row is a jQuery object?
|
||||
!( $row instanceof jQuery ) ||
|
||||
// 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 ) {
|
||||
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' );
|
||||
@ -1549,10 +1569,10 @@
|
||||
notMultiSort = !event[ c.sortMultiSortKey ],
|
||||
table = c.table,
|
||||
len = c.$headers.length,
|
||||
// get current column index
|
||||
col = parseInt( $( cell ).attr( 'data-column' ), 10 ),
|
||||
// get current column index; *always* stored on th/td
|
||||
$th = ts.getHeaderCell( $( cell ) ),
|
||||
col = parseInt( $th.attr( 'data-column' ), 10 ),
|
||||
order = c.sortVars[ col ].order;
|
||||
|
||||
// Only call sortStart if sorting is enabled
|
||||
c.$table.triggerHandler( 'sortStart', table );
|
||||
// get current column sort order
|
||||
@ -2076,7 +2096,7 @@
|
||||
if ( !widget.priority ) { widget.priority = 10; }
|
||||
widgets[ indx ] = widget;
|
||||
} 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
|
||||
@ -2148,6 +2168,7 @@
|
||||
c.widgetInit[ name[ index ] ] = false;
|
||||
}
|
||||
}
|
||||
c.$table.triggerHandler( 'widgetRemoveEnd', table );
|
||||
},
|
||||
|
||||
refreshWidgets : function( table, doAll, dontapply ) {
|
||||
@ -2999,7 +3020,7 @@
|
||||
|
||||
})(jQuery, window, document);
|
||||
|
||||
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */
|
||||
/*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
|
||||
;(function ($) {
|
||||
'use strict';
|
||||
var ts = $.tablesorter || {};
|
||||
@ -5202,7 +5223,7 @@
|
||||
|
||||
})( 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+
|
||||
* 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() {
|
||||
$stickyWrap.css({
|
||||
left : $attach.length ? parseInt($attach.css('padding-left'), 10) || 0 :
|
||||
$table.offset().left - parseInt($table.css('margin-left'), 10) - $xScroll.scrollLeft(),
|
||||
left : getLeftPosition(),
|
||||
width: $table.outerWidth()
|
||||
});
|
||||
setWidth( $table, $stickyTable );
|
||||
@ -5367,10 +5392,10 @@
|
||||
if (!$table.is(':visible')) { return; } // fixes #278
|
||||
// Detect nested tables - fixes #724
|
||||
nestedStickyTop = $nestedSticky.length ? $nestedSticky.offset().top - $yScroll.scrollTop() + $nestedSticky.height() : 0;
|
||||
var offset = $table.offset(),
|
||||
var tmp,
|
||||
offset = $table.offset(),
|
||||
stickyOffset = getStickyOffset(c, wo),
|
||||
yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3
|
||||
xWindow = $.isWindow( $xScroll[0] ),
|
||||
attachTop = $attach.length ?
|
||||
( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) :
|
||||
$yScroll.scrollTop(),
|
||||
@ -5378,19 +5403,27 @@
|
||||
scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight,
|
||||
tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight,
|
||||
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 };
|
||||
if ($attach.length) {
|
||||
// attached sticky headers always need updating
|
||||
needsUpdating = true;
|
||||
cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop();
|
||||
}
|
||||
if (xWindow) {
|
||||
// adjust when scrolling horizontally - fixes issue #143
|
||||
cssSettings.left = $table.offset().left - parseInt($table.css('margin-left'), 10) - $xScroll.scrollLeft();
|
||||
// adjust when scrolling horizontally - fixes issue #143
|
||||
tmp = getLeftPosition();
|
||||
if (tmp !== parseInt($stickyWrap.css('left'), 10)) {
|
||||
needsUpdating = true;
|
||||
cssSettings.left = tmp;
|
||||
}
|
||||
cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop;
|
||||
$stickyWrap
|
||||
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
|
||||
.addClass( isVisible === 'visible' ? ts.css.stickyVis : ts.css.stickyHide )
|
||||
.css(cssSettings);
|
||||
if (needsUpdating) {
|
||||
$stickyWrap
|
||||
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
|
||||
.addClass( state )
|
||||
.css(cssSettings);
|
||||
}
|
||||
if (isVisible !== laststate || resizing) {
|
||||
// make sure the column widths match
|
||||
resizeHeader();
|
||||
@ -5509,7 +5542,7 @@
|
||||
|
||||
})(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 */
|
||||
;(function ($, window) {
|
||||
'use strict';
|
||||
@ -5836,6 +5869,7 @@
|
||||
vars.$target = vars.$next = null;
|
||||
// will update stickyHeaders, just in case, see #912
|
||||
c.$table.triggerHandler('stickyHeadersUpdate');
|
||||
c.$table.triggerHandler('resizableComplete');
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! TableSorter (FORK) v2.28.15 *//*
|
||||
/*! TableSorter (FORK) v2.29.0 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -22,7 +22,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.28.15',
|
||||
version : '2.29.0',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
|
@ -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 ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -133,7 +133,7 @@
|
||||
|
||||
})(jQuery, window, document);
|
||||
|
||||
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */
|
||||
/*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
|
||||
;(function ($) {
|
||||
'use strict';
|
||||
var ts = $.tablesorter || {};
|
||||
@ -2336,7 +2336,7 @@
|
||||
|
||||
})( 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+
|
||||
* 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() {
|
||||
$stickyWrap.css({
|
||||
left : $attach.length ? parseInt($attach.css('padding-left'), 10) || 0 :
|
||||
$table.offset().left - parseInt($table.css('margin-left'), 10) - $xScroll.scrollLeft(),
|
||||
left : getLeftPosition(),
|
||||
width: $table.outerWidth()
|
||||
});
|
||||
setWidth( $table, $stickyTable );
|
||||
@ -2501,10 +2505,10 @@
|
||||
if (!$table.is(':visible')) { return; } // fixes #278
|
||||
// Detect nested tables - fixes #724
|
||||
nestedStickyTop = $nestedSticky.length ? $nestedSticky.offset().top - $yScroll.scrollTop() + $nestedSticky.height() : 0;
|
||||
var offset = $table.offset(),
|
||||
var tmp,
|
||||
offset = $table.offset(),
|
||||
stickyOffset = getStickyOffset(c, wo),
|
||||
yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3
|
||||
xWindow = $.isWindow( $xScroll[0] ),
|
||||
attachTop = $attach.length ?
|
||||
( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) :
|
||||
$yScroll.scrollTop(),
|
||||
@ -2512,19 +2516,27 @@
|
||||
scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight,
|
||||
tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight,
|
||||
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 };
|
||||
if ($attach.length) {
|
||||
// attached sticky headers always need updating
|
||||
needsUpdating = true;
|
||||
cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop();
|
||||
}
|
||||
if (xWindow) {
|
||||
// adjust when scrolling horizontally - fixes issue #143
|
||||
cssSettings.left = $table.offset().left - parseInt($table.css('margin-left'), 10) - $xScroll.scrollLeft();
|
||||
// adjust when scrolling horizontally - fixes issue #143
|
||||
tmp = getLeftPosition();
|
||||
if (tmp !== parseInt($stickyWrap.css('left'), 10)) {
|
||||
needsUpdating = true;
|
||||
cssSettings.left = tmp;
|
||||
}
|
||||
cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop;
|
||||
$stickyWrap
|
||||
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
|
||||
.addClass( isVisible === 'visible' ? ts.css.stickyVis : ts.css.stickyHide )
|
||||
.css(cssSettings);
|
||||
if (needsUpdating) {
|
||||
$stickyWrap
|
||||
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
|
||||
.addClass( state )
|
||||
.css(cssSettings);
|
||||
}
|
||||
if (isVisible !== laststate || resizing) {
|
||||
// make sure the column widths match
|
||||
resizeHeader();
|
||||
@ -2643,7 +2655,7 @@
|
||||
|
||||
})(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 */
|
||||
;(function ($, window) {
|
||||
'use strict';
|
||||
@ -2970,6 +2982,7 @@
|
||||
vars.$target = vars.$next = null;
|
||||
// will update stickyHeaders, just in case, see #912
|
||||
c.$table.triggerHandler('stickyHeadersUpdate');
|
||||
c.$table.triggerHandler('resizableComplete');
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -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+
|
||||
* by Justin Hallett & Rob Garrison
|
||||
*/
|
||||
|
@ -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+
|
||||
* by Rob Garrison
|
||||
*/
|
||||
|
@ -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+
|
||||
* Modified from:
|
||||
* HTML Table to CSV: http://www.kunalbabre.com/projects/table2CSV.php (License unknown?)
|
||||
|
@ -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 */
|
||||
;(function ($, window) {
|
||||
'use strict';
|
||||
|
@ -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.
|
||||
|
||||
Dual-licensed under the MIT and GPL licenses
|
||||
|
@ -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+
|
||||
* by Rob Garrison
|
||||
*/
|
||||
|
@ -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+
|
||||
* by Rob Garrison
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */
|
||||
/*! Widget: uitheme - updated 9/27/2017 (v2.29.0) */
|
||||
;(function ($) {
|
||||
'use strict';
|
||||
var ts = $.tablesorter || {};
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "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.",
|
||||
"author": {
|
||||
"name": "Christian Bach",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "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.",
|
||||
"author": {
|
||||
"name": "Christian Bach",
|
||||
|
Loading…
Reference in New Issue
Block a user