mirror of
https://github.com/Mottie/tablesorter.git
synced 2024-11-15 23:54:22 +00:00
Merge branch 'master' into gh-pages
This commit is contained in:
commit
857a9570e6
24
README.md
24
README.md
@ -104,6 +104,19 @@ If you would like to contribute, please...
|
||||
|
||||
View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/Changes).
|
||||
|
||||
#### <a name="v2.29.6">Version 2.29.6</a> (2018-02-25)
|
||||
|
||||
* Docs:
|
||||
* Fix theme selector.
|
||||
* `pager.page` is zero-based. See [issue #1516](https://github.com/Mottie/tablesorter/issues/1516).
|
||||
* Resizable:
|
||||
* Don't save 'auto' table width. Closes [issue #1514](https://github.com/Mottie/tablesorter/issues/1514).
|
||||
* Scroller:
|
||||
* Adjust spacing for jQuery UI themes. See [issue #1506](https://github.com/Mottie/tablesorter/issues/1506).
|
||||
* StickyHeaders:
|
||||
* Allow nested tables in sticky header. See [Stack Overflow](https://stackoverflow.com/q/48793036/145346).
|
||||
* Include nested tables inside a scrolling element. Fixes [issue #1512](https://github.com/Mottie/tablesorter/issues/1512).
|
||||
|
||||
#### <a name="v2.29.5">Version 2.29.5</a> (2018-01-30)
|
||||
|
||||
* Docs:
|
||||
@ -115,7 +128,7 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C
|
||||
* Fix linting issue.
|
||||
* Fix version numbering.
|
||||
* Parser:
|
||||
* Add radio parser. See [issue #1502(https://github.com/Mottie/tablesorter/issues/1502).
|
||||
* Add radio parser. See [issue #1502](https://github.com/Mottie/tablesorter/issues/1502).
|
||||
|
||||
#### <a name="v2.29.4">Version 2.29.4</a> (2018-01-18)
|
||||
|
||||
@ -127,12 +140,3 @@ View the [complete change log here](https://github.com/Mottie/tablesorter/wiki/C
|
||||
* Fix select2 issue. Closes [issue #1497](https://github.com/Mottie/tablesorter/issues/1497).
|
||||
* Meta:
|
||||
* Change date format in file comments to "YYYY-MM-DD".
|
||||
|
||||
#### <a name="v2.29.3">Version 2.29.3</a> (2018-01-10)
|
||||
|
||||
* Docs:
|
||||
* Update Bootstrap to v4-beta.3.
|
||||
* Add scroller widget incompatibilities section.
|
||||
* Add pager size all setting.
|
||||
* Parser:
|
||||
* Network parsers now return a text value. Fixes [issue #1494](https://github.com/Mottie/tablesorter/issues/1494).
|
||||
|
38
dist/js/jquery.tablesorter.combined.js
vendored
38
dist/js/jquery.tablesorter.combined.js
vendored
@ -1,4 +1,4 @@
|
||||
/*! tablesorter (FORK) - updated 2018-01-30 (v2.29.5)*/
|
||||
/*! tablesorter (FORK) - updated 2018-02-25 (v2.29.6)*/
|
||||
/* 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.29.5 *//*
|
||||
/*! TableSorter (FORK) v2.29.6 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -34,7 +34,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.29.5',
|
||||
version : '2.29.6',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
@ -5327,7 +5327,7 @@
|
||||
var index, len, $t,
|
||||
$table = c.$table,
|
||||
// add position: relative to attach element, hopefully it won't cause trouble.
|
||||
$attach = $(wo.stickyHeaders_attachTo),
|
||||
$attach = $(wo.stickyHeaders_attachTo || wo.stickyHeaders_appendTo),
|
||||
namespace = c.namespace + 'stickyheaders ',
|
||||
// element to watch for the scroll event
|
||||
$yScroll = $(wo.stickyHeaders_yScroll || wo.stickyHeaders_attachTo || window),
|
||||
@ -5387,7 +5387,10 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
getLeftPosition = function() {
|
||||
getLeftPosition = function(yWindow) {
|
||||
if (yWindow === false && $nestedSticky.length) {
|
||||
return $table.position().left;
|
||||
}
|
||||
return $attach.length ?
|
||||
parseInt($attach.css('padding-left'), 10) || 0 :
|
||||
$table.offset().left - parseInt($table.css('margin-left'), 10) - $(window).scrollLeft();
|
||||
@ -5408,9 +5411,11 @@
|
||||
offset = $table.offset(),
|
||||
stickyOffset = getStickyOffset(c, wo),
|
||||
yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3
|
||||
attachTop = $attach.length ?
|
||||
( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) :
|
||||
$yScroll.scrollTop(),
|
||||
yScroll = yWindow ?
|
||||
$yScroll.scrollTop() :
|
||||
// use parent sticky position if nested AND inside of a scrollable element - see #1512
|
||||
$nestedSticky.length ? parseInt($nestedSticky[0].style.top, 10) : $yScroll.offset().top,
|
||||
attachTop = $attach.length ? yScroll : $yScroll.scrollTop(),
|
||||
captionHeight = wo.stickyHeaders_includeCaption ? 0 : $table.children( 'caption' ).height() || 0,
|
||||
scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight,
|
||||
tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight,
|
||||
@ -5424,12 +5429,14 @@
|
||||
cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop();
|
||||
}
|
||||
// adjust when scrolling horizontally - fixes issue #143
|
||||
tmp = getLeftPosition();
|
||||
tmp = getLeftPosition(yWindow);
|
||||
if (tmp !== parseInt($stickyWrap.css('left'), 10)) {
|
||||
needsUpdating = true;
|
||||
cssSettings.left = tmp;
|
||||
}
|
||||
cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop;
|
||||
cssSettings.top = ( cssSettings.top || 0 ) +
|
||||
// If nested AND inside of a scrollable element, only add parent sticky height
|
||||
(!yWindow && $nestedSticky.length ? $nestedSticky.height() : stickyOffset + nestedStickyTop);
|
||||
if (needsUpdating) {
|
||||
$stickyWrap
|
||||
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
|
||||
@ -5450,8 +5457,8 @@
|
||||
if ($stickyTable.attr('id')) { $stickyTable[0].id += wo.stickyHeaders_cloneId; }
|
||||
// clear out cloned table, except for sticky header
|
||||
// include caption & filter row (fixes #126 & #249) - don't remove cells to get correct cell indexing
|
||||
$stickyTable.find('thead:gt(0), tr.sticky-false').hide();
|
||||
$stickyTable.find('tbody, tfoot').remove();
|
||||
$stickyTable.find('> thead:gt(0), tr.sticky-false').hide();
|
||||
$stickyTable.find('> tbody, > tfoot').remove();
|
||||
$stickyTable.find('caption').toggle(wo.stickyHeaders_includeCaption);
|
||||
// issue #172 - find td/th in sticky header
|
||||
$stickyCells = $stickyThead.children().children();
|
||||
@ -5483,7 +5490,6 @@
|
||||
c.onRenderHeader.apply( $t.eq( index ), [ index, c, $stickyTable ] );
|
||||
}
|
||||
}
|
||||
|
||||
// make it sticky!
|
||||
$xScroll.add($yScroll)
|
||||
.unbind( ('scroll resize '.split(' ').join( namespace )).replace(/\s+/g, ' ') )
|
||||
@ -5554,7 +5560,7 @@
|
||||
|
||||
})(jQuery, window);
|
||||
|
||||
/*! Widget: resizable - updated 12/13/2017 (v2.29.1) */
|
||||
/*! Widget: resizable - updated 2018-02-14 (v2.29.6) */
|
||||
/*jshint browser:true, jquery:true, unused:false */
|
||||
;(function ($, window) {
|
||||
'use strict';
|
||||
@ -5945,7 +5951,7 @@
|
||||
if ( vars.overflow && vars.tableWidth ) {
|
||||
ts.resizable.setWidth( c.$table, vars.tableWidth, true );
|
||||
if ( vars.useStorage ) {
|
||||
ts.storage( table, 'tablesorter-table-resized-width', 'auto' );
|
||||
ts.storage( table, 'tablesorter-table-resized-width', vars.tableWidth );
|
||||
}
|
||||
}
|
||||
for ( index = 0; index < c.columns; index++ ) {
|
||||
@ -5961,7 +5967,7 @@
|
||||
// reset stickyHeader widths
|
||||
c.$table.triggerHandler( 'stickyHeadersUpdate' );
|
||||
if ( ts.storage && !refreshing ) {
|
||||
ts.storage( this, ts.css.resizableStorage, {} );
|
||||
ts.storage( this, ts.css.resizableStorage, [] );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
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
4
dist/js/jquery.tablesorter.js
vendored
4
dist/js/jquery.tablesorter.js
vendored
@ -8,7 +8,7 @@
|
||||
}
|
||||
}(function(jQuery) {
|
||||
|
||||
/*! TableSorter (FORK) v2.29.5 *//*
|
||||
/*! TableSorter (FORK) v2.29.6 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -32,7 +32,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.29.5',
|
||||
version : '2.29.6',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
|
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
34
dist/js/jquery.tablesorter.widgets.js
vendored
34
dist/js/jquery.tablesorter.widgets.js
vendored
@ -1,4 +1,4 @@
|
||||
/*! tablesorter (FORK) - updated 2018-01-30 (v2.29.5)*/
|
||||
/*! tablesorter (FORK) - updated 2018-02-25 (v2.29.6)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -2447,7 +2447,7 @@
|
||||
var index, len, $t,
|
||||
$table = c.$table,
|
||||
// add position: relative to attach element, hopefully it won't cause trouble.
|
||||
$attach = $(wo.stickyHeaders_attachTo),
|
||||
$attach = $(wo.stickyHeaders_attachTo || wo.stickyHeaders_appendTo),
|
||||
namespace = c.namespace + 'stickyheaders ',
|
||||
// element to watch for the scroll event
|
||||
$yScroll = $(wo.stickyHeaders_yScroll || wo.stickyHeaders_attachTo || window),
|
||||
@ -2507,7 +2507,10 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
getLeftPosition = function() {
|
||||
getLeftPosition = function(yWindow) {
|
||||
if (yWindow === false && $nestedSticky.length) {
|
||||
return $table.position().left;
|
||||
}
|
||||
return $attach.length ?
|
||||
parseInt($attach.css('padding-left'), 10) || 0 :
|
||||
$table.offset().left - parseInt($table.css('margin-left'), 10) - $(window).scrollLeft();
|
||||
@ -2528,9 +2531,11 @@
|
||||
offset = $table.offset(),
|
||||
stickyOffset = getStickyOffset(c, wo),
|
||||
yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3
|
||||
attachTop = $attach.length ?
|
||||
( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) :
|
||||
$yScroll.scrollTop(),
|
||||
yScroll = yWindow ?
|
||||
$yScroll.scrollTop() :
|
||||
// use parent sticky position if nested AND inside of a scrollable element - see #1512
|
||||
$nestedSticky.length ? parseInt($nestedSticky[0].style.top, 10) : $yScroll.offset().top,
|
||||
attachTop = $attach.length ? yScroll : $yScroll.scrollTop(),
|
||||
captionHeight = wo.stickyHeaders_includeCaption ? 0 : $table.children( 'caption' ).height() || 0,
|
||||
scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight,
|
||||
tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight,
|
||||
@ -2544,12 +2549,14 @@
|
||||
cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop();
|
||||
}
|
||||
// adjust when scrolling horizontally - fixes issue #143
|
||||
tmp = getLeftPosition();
|
||||
tmp = getLeftPosition(yWindow);
|
||||
if (tmp !== parseInt($stickyWrap.css('left'), 10)) {
|
||||
needsUpdating = true;
|
||||
cssSettings.left = tmp;
|
||||
}
|
||||
cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop;
|
||||
cssSettings.top = ( cssSettings.top || 0 ) +
|
||||
// If nested AND inside of a scrollable element, only add parent sticky height
|
||||
(!yWindow && $nestedSticky.length ? $nestedSticky.height() : stickyOffset + nestedStickyTop);
|
||||
if (needsUpdating) {
|
||||
$stickyWrap
|
||||
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
|
||||
@ -2570,8 +2577,8 @@
|
||||
if ($stickyTable.attr('id')) { $stickyTable[0].id += wo.stickyHeaders_cloneId; }
|
||||
// clear out cloned table, except for sticky header
|
||||
// include caption & filter row (fixes #126 & #249) - don't remove cells to get correct cell indexing
|
||||
$stickyTable.find('thead:gt(0), tr.sticky-false').hide();
|
||||
$stickyTable.find('tbody, tfoot').remove();
|
||||
$stickyTable.find('> thead:gt(0), tr.sticky-false').hide();
|
||||
$stickyTable.find('> tbody, > tfoot').remove();
|
||||
$stickyTable.find('caption').toggle(wo.stickyHeaders_includeCaption);
|
||||
// issue #172 - find td/th in sticky header
|
||||
$stickyCells = $stickyThead.children().children();
|
||||
@ -2603,7 +2610,6 @@
|
||||
c.onRenderHeader.apply( $t.eq( index ), [ index, c, $stickyTable ] );
|
||||
}
|
||||
}
|
||||
|
||||
// make it sticky!
|
||||
$xScroll.add($yScroll)
|
||||
.unbind( ('scroll resize '.split(' ').join( namespace )).replace(/\s+/g, ' ') )
|
||||
@ -2674,7 +2680,7 @@
|
||||
|
||||
})(jQuery, window);
|
||||
|
||||
/*! Widget: resizable - updated 12/13/2017 (v2.29.1) */
|
||||
/*! Widget: resizable - updated 2018-02-14 (v2.29.6) */
|
||||
/*jshint browser:true, jquery:true, unused:false */
|
||||
;(function ($, window) {
|
||||
'use strict';
|
||||
@ -3065,7 +3071,7 @@
|
||||
if ( vars.overflow && vars.tableWidth ) {
|
||||
ts.resizable.setWidth( c.$table, vars.tableWidth, true );
|
||||
if ( vars.useStorage ) {
|
||||
ts.storage( table, 'tablesorter-table-resized-width', 'auto' );
|
||||
ts.storage( table, 'tablesorter-table-resized-width', vars.tableWidth );
|
||||
}
|
||||
}
|
||||
for ( index = 0; index < c.columns; index++ ) {
|
||||
@ -3081,7 +3087,7 @@
|
||||
// reset stickyHeader widths
|
||||
c.$table.triggerHandler( 'stickyHeadersUpdate' );
|
||||
if ( ts.storage && !refreshing ) {
|
||||
ts.storage( this, ts.css.resizableStorage, {} );
|
||||
ts.storage( this, ts.css.resizableStorage, [] );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
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
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
2
dist/js/widgets/widget-scroller.min.js
vendored
2
dist/js/widgets/widget-scroller.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/js/widgets/widget-stickyHeaders.min.js
vendored
2
dist/js/widgets/widget-stickyHeaders.min.js
vendored
File diff suppressed because one or more lines are too long
@ -7082,7 +7082,7 @@ $.each( p.cacheIndex, function(i, v) {
|
||||
<tr id="variable-pager-page">
|
||||
<td><a href="#" class="permalink">p.page</a></td>
|
||||
<td>Numeric</td>
|
||||
<td>Contains a one-based index of the current page visible in the pager.
|
||||
<td>Contains a zero-based index of the current page visible in the pager.
|
||||
<div class="collapsible">
|
||||
<br>
|
||||
The <code>{page}</code> tag in the pager <a href="#pager-output"><code>output</code></a> option is replaced by this value.<br>
|
||||
|
@ -4,7 +4,7 @@
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||
*/
|
||||
/*! tablesorter (FORK) - updated 2018-01-30 (v2.29.5)*/
|
||||
/*! tablesorter (FORK) - updated 2018-02-25 (v2.29.6)*/
|
||||
/* 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.29.5 *//*
|
||||
/*! TableSorter (FORK) v2.29.6 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -40,7 +40,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.29.5',
|
||||
version : '2.29.6',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
@ -5333,7 +5333,7 @@
|
||||
var index, len, $t,
|
||||
$table = c.$table,
|
||||
// add position: relative to attach element, hopefully it won't cause trouble.
|
||||
$attach = $(wo.stickyHeaders_attachTo),
|
||||
$attach = $(wo.stickyHeaders_attachTo || wo.stickyHeaders_appendTo),
|
||||
namespace = c.namespace + 'stickyheaders ',
|
||||
// element to watch for the scroll event
|
||||
$yScroll = $(wo.stickyHeaders_yScroll || wo.stickyHeaders_attachTo || window),
|
||||
@ -5393,7 +5393,10 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
getLeftPosition = function() {
|
||||
getLeftPosition = function(yWindow) {
|
||||
if (yWindow === false && $nestedSticky.length) {
|
||||
return $table.position().left;
|
||||
}
|
||||
return $attach.length ?
|
||||
parseInt($attach.css('padding-left'), 10) || 0 :
|
||||
$table.offset().left - parseInt($table.css('margin-left'), 10) - $(window).scrollLeft();
|
||||
@ -5414,9 +5417,11 @@
|
||||
offset = $table.offset(),
|
||||
stickyOffset = getStickyOffset(c, wo),
|
||||
yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3
|
||||
attachTop = $attach.length ?
|
||||
( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) :
|
||||
$yScroll.scrollTop(),
|
||||
yScroll = yWindow ?
|
||||
$yScroll.scrollTop() :
|
||||
// use parent sticky position if nested AND inside of a scrollable element - see #1512
|
||||
$nestedSticky.length ? parseInt($nestedSticky[0].style.top, 10) : $yScroll.offset().top,
|
||||
attachTop = $attach.length ? yScroll : $yScroll.scrollTop(),
|
||||
captionHeight = wo.stickyHeaders_includeCaption ? 0 : $table.children( 'caption' ).height() || 0,
|
||||
scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight,
|
||||
tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight,
|
||||
@ -5430,12 +5435,14 @@
|
||||
cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop();
|
||||
}
|
||||
// adjust when scrolling horizontally - fixes issue #143
|
||||
tmp = getLeftPosition();
|
||||
tmp = getLeftPosition(yWindow);
|
||||
if (tmp !== parseInt($stickyWrap.css('left'), 10)) {
|
||||
needsUpdating = true;
|
||||
cssSettings.left = tmp;
|
||||
}
|
||||
cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop;
|
||||
cssSettings.top = ( cssSettings.top || 0 ) +
|
||||
// If nested AND inside of a scrollable element, only add parent sticky height
|
||||
(!yWindow && $nestedSticky.length ? $nestedSticky.height() : stickyOffset + nestedStickyTop);
|
||||
if (needsUpdating) {
|
||||
$stickyWrap
|
||||
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
|
||||
@ -5456,8 +5463,8 @@
|
||||
if ($stickyTable.attr('id')) { $stickyTable[0].id += wo.stickyHeaders_cloneId; }
|
||||
// clear out cloned table, except for sticky header
|
||||
// include caption & filter row (fixes #126 & #249) - don't remove cells to get correct cell indexing
|
||||
$stickyTable.find('thead:gt(0), tr.sticky-false').hide();
|
||||
$stickyTable.find('tbody, tfoot').remove();
|
||||
$stickyTable.find('> thead:gt(0), tr.sticky-false').hide();
|
||||
$stickyTable.find('> tbody, > tfoot').remove();
|
||||
$stickyTable.find('caption').toggle(wo.stickyHeaders_includeCaption);
|
||||
// issue #172 - find td/th in sticky header
|
||||
$stickyCells = $stickyThead.children().children();
|
||||
@ -5489,7 +5496,6 @@
|
||||
c.onRenderHeader.apply( $t.eq( index ), [ index, c, $stickyTable ] );
|
||||
}
|
||||
}
|
||||
|
||||
// make it sticky!
|
||||
$xScroll.add($yScroll)
|
||||
.unbind( ('scroll resize '.split(' ').join( namespace )).replace(/\s+/g, ' ') )
|
||||
@ -5560,7 +5566,7 @@
|
||||
|
||||
})(jQuery, window);
|
||||
|
||||
/*! Widget: resizable - updated 12/13/2017 (v2.29.1) */
|
||||
/*! Widget: resizable - updated 2018-02-14 (v2.29.6) */
|
||||
/*jshint browser:true, jquery:true, unused:false */
|
||||
;(function ($, window) {
|
||||
'use strict';
|
||||
@ -5951,7 +5957,7 @@
|
||||
if ( vars.overflow && vars.tableWidth ) {
|
||||
ts.resizable.setWidth( c.$table, vars.tableWidth, true );
|
||||
if ( vars.useStorage ) {
|
||||
ts.storage( table, 'tablesorter-table-resized-width', 'auto' );
|
||||
ts.storage( table, 'tablesorter-table-resized-width', vars.tableWidth );
|
||||
}
|
||||
}
|
||||
for ( index = 0; index < c.columns; index++ ) {
|
||||
@ -5967,7 +5973,7 @@
|
||||
// reset stickyHeader widths
|
||||
c.$table.triggerHandler( 'stickyHeadersUpdate' );
|
||||
if ( ts.storage && !refreshing ) {
|
||||
ts.storage( this, ts.css.resizableStorage, {} );
|
||||
ts.storage( this, ts.css.resizableStorage, [] );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! TableSorter (FORK) v2.29.5 *//*
|
||||
/*! TableSorter (FORK) v2.29.6 *//*
|
||||
* Client-side table sorting with ease!
|
||||
* @requires jQuery v1.2.6+
|
||||
*
|
||||
@ -22,7 +22,7 @@
|
||||
'use strict';
|
||||
var ts = $.tablesorter = {
|
||||
|
||||
version : '2.29.5',
|
||||
version : '2.29.6',
|
||||
|
||||
parsers : [],
|
||||
widgets : [],
|
||||
|
@ -4,7 +4,7 @@
|
||||
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
||||
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
||||
*/
|
||||
/*! tablesorter (FORK) - updated 2018-01-30 (v2.29.5)*/
|
||||
/*! tablesorter (FORK) - updated 2018-02-25 (v2.29.6)*/
|
||||
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
||||
(function(factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
@ -2453,7 +2453,7 @@
|
||||
var index, len, $t,
|
||||
$table = c.$table,
|
||||
// add position: relative to attach element, hopefully it won't cause trouble.
|
||||
$attach = $(wo.stickyHeaders_attachTo),
|
||||
$attach = $(wo.stickyHeaders_attachTo || wo.stickyHeaders_appendTo),
|
||||
namespace = c.namespace + 'stickyheaders ',
|
||||
// element to watch for the scroll event
|
||||
$yScroll = $(wo.stickyHeaders_yScroll || wo.stickyHeaders_attachTo || window),
|
||||
@ -2513,7 +2513,10 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
getLeftPosition = function() {
|
||||
getLeftPosition = function(yWindow) {
|
||||
if (yWindow === false && $nestedSticky.length) {
|
||||
return $table.position().left;
|
||||
}
|
||||
return $attach.length ?
|
||||
parseInt($attach.css('padding-left'), 10) || 0 :
|
||||
$table.offset().left - parseInt($table.css('margin-left'), 10) - $(window).scrollLeft();
|
||||
@ -2534,9 +2537,11 @@
|
||||
offset = $table.offset(),
|
||||
stickyOffset = getStickyOffset(c, wo),
|
||||
yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3
|
||||
attachTop = $attach.length ?
|
||||
( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) :
|
||||
$yScroll.scrollTop(),
|
||||
yScroll = yWindow ?
|
||||
$yScroll.scrollTop() :
|
||||
// use parent sticky position if nested AND inside of a scrollable element - see #1512
|
||||
$nestedSticky.length ? parseInt($nestedSticky[0].style.top, 10) : $yScroll.offset().top,
|
||||
attachTop = $attach.length ? yScroll : $yScroll.scrollTop(),
|
||||
captionHeight = wo.stickyHeaders_includeCaption ? 0 : $table.children( 'caption' ).height() || 0,
|
||||
scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight,
|
||||
tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight,
|
||||
@ -2550,12 +2555,14 @@
|
||||
cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop();
|
||||
}
|
||||
// adjust when scrolling horizontally - fixes issue #143
|
||||
tmp = getLeftPosition();
|
||||
tmp = getLeftPosition(yWindow);
|
||||
if (tmp !== parseInt($stickyWrap.css('left'), 10)) {
|
||||
needsUpdating = true;
|
||||
cssSettings.left = tmp;
|
||||
}
|
||||
cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop;
|
||||
cssSettings.top = ( cssSettings.top || 0 ) +
|
||||
// If nested AND inside of a scrollable element, only add parent sticky height
|
||||
(!yWindow && $nestedSticky.length ? $nestedSticky.height() : stickyOffset + nestedStickyTop);
|
||||
if (needsUpdating) {
|
||||
$stickyWrap
|
||||
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
|
||||
@ -2576,8 +2583,8 @@
|
||||
if ($stickyTable.attr('id')) { $stickyTable[0].id += wo.stickyHeaders_cloneId; }
|
||||
// clear out cloned table, except for sticky header
|
||||
// include caption & filter row (fixes #126 & #249) - don't remove cells to get correct cell indexing
|
||||
$stickyTable.find('thead:gt(0), tr.sticky-false').hide();
|
||||
$stickyTable.find('tbody, tfoot').remove();
|
||||
$stickyTable.find('> thead:gt(0), tr.sticky-false').hide();
|
||||
$stickyTable.find('> tbody, > tfoot').remove();
|
||||
$stickyTable.find('caption').toggle(wo.stickyHeaders_includeCaption);
|
||||
// issue #172 - find td/th in sticky header
|
||||
$stickyCells = $stickyThead.children().children();
|
||||
@ -2609,7 +2616,6 @@
|
||||
c.onRenderHeader.apply( $t.eq( index ), [ index, c, $stickyTable ] );
|
||||
}
|
||||
}
|
||||
|
||||
// make it sticky!
|
||||
$xScroll.add($yScroll)
|
||||
.unbind( ('scroll resize '.split(' ').join( namespace )).replace(/\s+/g, ' ') )
|
||||
@ -2680,7 +2686,7 @@
|
||||
|
||||
})(jQuery, window);
|
||||
|
||||
/*! Widget: resizable - updated 12/13/2017 (v2.29.1) */
|
||||
/*! Widget: resizable - updated 2018-02-14 (v2.29.6) */
|
||||
/*jshint browser:true, jquery:true, unused:false */
|
||||
;(function ($, window) {
|
||||
'use strict';
|
||||
@ -3071,7 +3077,7 @@
|
||||
if ( vars.overflow && vars.tableWidth ) {
|
||||
ts.resizable.setWidth( c.$table, vars.tableWidth, true );
|
||||
if ( vars.useStorage ) {
|
||||
ts.storage( table, 'tablesorter-table-resized-width', 'auto' );
|
||||
ts.storage( table, 'tablesorter-table-resized-width', vars.tableWidth );
|
||||
}
|
||||
}
|
||||
for ( index = 0; index < c.columns; index++ ) {
|
||||
@ -3087,7 +3093,7 @@
|
||||
// reset stickyHeader widths
|
||||
c.$table.triggerHandler( 'stickyHeadersUpdate' );
|
||||
if ( ts.storage && !refreshing ) {
|
||||
ts.storage( this, ts.css.resizableStorage, {} );
|
||||
ts.storage( this, ts.css.resizableStorage, [] );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -1,4 +1,4 @@
|
||||
/*! Widget: resizable - updated 12/13/2017 (v2.29.1) */
|
||||
/*! Widget: resizable - updated 2018-02-14 (v2.29.6) */
|
||||
/*jshint browser:true, jquery:true, unused:false */
|
||||
;(function ($, window) {
|
||||
'use strict';
|
||||
@ -389,7 +389,7 @@
|
||||
if ( vars.overflow && vars.tableWidth ) {
|
||||
ts.resizable.setWidth( c.$table, vars.tableWidth, true );
|
||||
if ( vars.useStorage ) {
|
||||
ts.storage( table, 'tablesorter-table-resized-width', 'auto' );
|
||||
ts.storage( table, 'tablesorter-table-resized-width', vars.tableWidth );
|
||||
}
|
||||
}
|
||||
for ( index = 0; index < c.columns; index++ ) {
|
||||
@ -405,7 +405,7 @@
|
||||
// reset stickyHeader widths
|
||||
c.$table.triggerHandler( 'stickyHeadersUpdate' );
|
||||
if ( ts.storage && !refreshing ) {
|
||||
ts.storage( this, ts.css.resizableStorage, {} );
|
||||
ts.storage( this, ts.css.resizableStorage, [] );
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -745,12 +745,18 @@
|
||||
tsScroller = ts.scroller,
|
||||
fixedColumns = wo.scroller_fixedColumns,
|
||||
// get dimensions
|
||||
getDim = function ($el, name, deflt) {
|
||||
return parseInt( $el.css(name) || '', 10 ) || deflt || 0;
|
||||
},
|
||||
$temp = $table.find( 'tbody td' ),
|
||||
borderRightWidth = parseInt( $temp.css( 'border-right-width' ), 10 ) || 1,
|
||||
borderSpacing = parseInt( ( $temp.css( 'border-spacing' ) || '' ).split( /\s/ )[ 0 ], 10 ) / 2 || 0,
|
||||
totalWidth = parseInt( $table.css( 'padding-left' ), 10 ) +
|
||||
parseInt( $table.css( 'padding-right' ), 10 ) -
|
||||
borderRightWidth,
|
||||
borderRightWidth = getDim( $temp, 'border-right-width', 1 ),
|
||||
borderSpacing = getDim( $temp, 'border-spacing', 0 ),
|
||||
totalWidth = getDim( $table, 'padding-left' ) +
|
||||
getDim( $table, 'padding-right' ) +
|
||||
// include table left & row left border
|
||||
getDim( $table, 'border-left-width', 1 ) * 2 +
|
||||
getDim( $table, 'border-right-width', 1 ) -
|
||||
borderRightWidth + borderSpacing / 2,
|
||||
widths = wo.scroller_calcWidths;
|
||||
|
||||
ts.scroller.removeFixed( c, wo, false );
|
||||
@ -761,7 +767,7 @@
|
||||
}
|
||||
|
||||
// set fixed column width
|
||||
totalWidth = totalWidth + borderRightWidth * 2 - borderSpacing;
|
||||
totalWidth = totalWidth + borderRightWidth * 2;
|
||||
tsScroller.setWidth( $fixedColumn.add( $fixedColumn.children() ), totalWidth );
|
||||
tsScroller.setWidth( $fixedColumn.children().children( 'table' ), totalWidth );
|
||||
|
||||
@ -799,7 +805,6 @@
|
||||
.css( 'width', totalWidth + adj );
|
||||
}
|
||||
|
||||
$fixedColumn.removeClass( tscss.scrollerHideElement );
|
||||
for ( index = 0; index < fixedColumns; index++ ) {
|
||||
temp = ':nth-child(' + ( index + 1 ) + ')';
|
||||
$wrapper
|
||||
@ -808,6 +813,14 @@
|
||||
.find( 'th' + temp + ', td' + temp + ', col' + temp )
|
||||
.addClass( tscss.scrollerHideColumn );
|
||||
}
|
||||
$fixedColumn
|
||||
.removeClass( tscss.scrollerHideElement )
|
||||
.find('colgroup')
|
||||
.each(function() {
|
||||
$(this)
|
||||
.find('col:gt(' + (fixedColumns - 1) + ')')
|
||||
.addClass( tscss.scrollerHideElement );
|
||||
});
|
||||
|
||||
totalWidth = totalWidth - borderRightWidth;
|
||||
temp = $tableWrap.parent().innerWidth() - totalWidth;
|
||||
|
@ -90,7 +90,7 @@
|
||||
var index, len, $t,
|
||||
$table = c.$table,
|
||||
// add position: relative to attach element, hopefully it won't cause trouble.
|
||||
$attach = $(wo.stickyHeaders_attachTo),
|
||||
$attach = $(wo.stickyHeaders_attachTo || wo.stickyHeaders_appendTo),
|
||||
namespace = c.namespace + 'stickyheaders ',
|
||||
// element to watch for the scroll event
|
||||
$yScroll = $(wo.stickyHeaders_yScroll || wo.stickyHeaders_attachTo || window),
|
||||
@ -150,7 +150,10 @@
|
||||
});
|
||||
}
|
||||
},
|
||||
getLeftPosition = function() {
|
||||
getLeftPosition = function(yWindow) {
|
||||
if (yWindow === false && $nestedSticky.length) {
|
||||
return $table.position().left;
|
||||
}
|
||||
return $attach.length ?
|
||||
parseInt($attach.css('padding-left'), 10) || 0 :
|
||||
$table.offset().left - parseInt($table.css('margin-left'), 10) - $(window).scrollLeft();
|
||||
@ -171,9 +174,11 @@
|
||||
offset = $table.offset(),
|
||||
stickyOffset = getStickyOffset(c, wo),
|
||||
yWindow = $.isWindow( $yScroll[0] ), // $.isWindow needs jQuery 1.4.3
|
||||
attachTop = $attach.length ?
|
||||
( yWindow ? $yScroll.scrollTop() : $yScroll.offset().top ) :
|
||||
$yScroll.scrollTop(),
|
||||
yScroll = yWindow ?
|
||||
$yScroll.scrollTop() :
|
||||
// use parent sticky position if nested AND inside of a scrollable element - see #1512
|
||||
$nestedSticky.length ? parseInt($nestedSticky[0].style.top, 10) : $yScroll.offset().top,
|
||||
attachTop = $attach.length ? yScroll : $yScroll.scrollTop(),
|
||||
captionHeight = wo.stickyHeaders_includeCaption ? 0 : $table.children( 'caption' ).height() || 0,
|
||||
scrollTop = attachTop + stickyOffset + nestedStickyTop - captionHeight,
|
||||
tableHeight = $table.height() - ($stickyWrap.height() + ($tfoot.height() || 0)) - captionHeight,
|
||||
@ -187,12 +192,14 @@
|
||||
cssSettings.top = yWindow ? scrollTop - $attach.offset().top : $attach.scrollTop();
|
||||
}
|
||||
// adjust when scrolling horizontally - fixes issue #143
|
||||
tmp = getLeftPosition();
|
||||
tmp = getLeftPosition(yWindow);
|
||||
if (tmp !== parseInt($stickyWrap.css('left'), 10)) {
|
||||
needsUpdating = true;
|
||||
cssSettings.left = tmp;
|
||||
}
|
||||
cssSettings.top = ( cssSettings.top || 0 ) + stickyOffset + nestedStickyTop;
|
||||
cssSettings.top = ( cssSettings.top || 0 ) +
|
||||
// If nested AND inside of a scrollable element, only add parent sticky height
|
||||
(!yWindow && $nestedSticky.length ? $nestedSticky.height() : stickyOffset + nestedStickyTop);
|
||||
if (needsUpdating) {
|
||||
$stickyWrap
|
||||
.removeClass( ts.css.stickyVis + ' ' + ts.css.stickyHide )
|
||||
@ -213,8 +220,8 @@
|
||||
if ($stickyTable.attr('id')) { $stickyTable[0].id += wo.stickyHeaders_cloneId; }
|
||||
// clear out cloned table, except for sticky header
|
||||
// include caption & filter row (fixes #126 & #249) - don't remove cells to get correct cell indexing
|
||||
$stickyTable.find('thead:gt(0), tr.sticky-false').hide();
|
||||
$stickyTable.find('tbody, tfoot').remove();
|
||||
$stickyTable.find('> thead:gt(0), tr.sticky-false').hide();
|
||||
$stickyTable.find('> tbody, > tfoot').remove();
|
||||
$stickyTable.find('caption').toggle(wo.stickyHeaders_includeCaption);
|
||||
// issue #172 - find td/th in sticky header
|
||||
$stickyCells = $stickyThead.children().children();
|
||||
@ -246,7 +253,6 @@
|
||||
c.onRenderHeader.apply( $t.eq( index ), [ index, c, $stickyTable ] );
|
||||
}
|
||||
}
|
||||
|
||||
// make it sticky!
|
||||
$xScroll.add($yScroll)
|
||||
.unbind( ('scroll resize '.split(' ').join( namespace )).replace(/\s+/g, ' ') )
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tablesorter",
|
||||
"title": "tablesorter",
|
||||
"version": "2.29.5",
|
||||
"version": "2.29.6",
|
||||
"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.29.5",
|
||||
"version": "2.29.6",
|
||||
"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