Skip to content

Commit 7a687d8

Browse files
committed
Update tablesorter to latest version (2.30.4)
1 parent c28ecf7 commit 7a687d8

File tree

8 files changed

+34
-18
lines changed

8 files changed

+34
-18
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Changelog
22
===
33

4+
#### v1.25.2 (2018-05-21)
5+
6+
* Upgrade tablesorter to v2.30.4
7+
48
#### v1.25.1 (2018-04-01)
59

610
* Upgrade tablesorter to v2.30.3

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Simple integration of jQuery tablesorter ([Mottie's fork]) into the asset pipeline.
66

7-
Current tablesorter version: 2.30.3 (2018-03-30) [documentation]
7+
Current tablesorter version: 2.30.4 (2018-05-16) [documentation]
88

99
Any issue associated with the js/css files, please report to [Mottie's fork].
1010

lib/jquery-tablesorter/version.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module JqueryTablesorter
22
MAJOR = 1
33
MINOR = 25
4-
TINY = 1
4+
TINY = 2
55

66
VERSION = [MAJOR, MINOR, TINY].compact.join('.')
77
end

vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.combined.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
55
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
66
*/
7-
/*! tablesorter (FORK) - updated 2018-04-30 (v2.30.3)*/
7+
/*! tablesorter (FORK) - updated 2018-05-16 (v2.30.4)*/
88
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
99
(function(factory) {
1010
if (typeof define === 'function' && define.amd) {
@@ -16,7 +16,7 @@
1616
}
1717
}(function(jQuery) {
1818

19-
/*! TableSorter (FORK) v2.30.3 *//*
19+
/*! TableSorter (FORK) v2.30.4 *//*
2020
* Client-side table sorting with ease!
2121
* @requires jQuery v1.2.6+
2222
*
@@ -40,7 +40,7 @@
4040
'use strict';
4141
var ts = $.tablesorter = {
4242

43-
version : '2.30.3',
43+
version : '2.30.4',
4444

4545
parsers : [],
4646
widgets : [],
@@ -538,7 +538,7 @@
538538
$cell = ts.getClosest( $( this ), '.' + ts.css.header );
539539
// use column index from data-attribute or index of current row; fixes #1116
540540
c.last.clickedIndex = $cell.attr( 'data-column' ) || $cell.index();
541-
cell = c.$headerIndexed[ c.last.clickedIndex ];
541+
cell = c.$headerIndexed[ c.last.clickedIndex ][0];
542542
if ( cell && !cell.sortDisabled ) {
543543
ts.initSort( c, cell, e );
544544
}

vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! TableSorter (FORK) v2.30.3 *//*
1+
/*! TableSorter (FORK) v2.30.4 *//*
22
* Client-side table sorting with ease!
33
* @requires jQuery v1.2.6+
44
*
@@ -22,7 +22,7 @@
2222
'use strict';
2323
var ts = $.tablesorter = {
2424

25-
version : '2.30.3',
25+
version : '2.30.4',
2626

2727
parsers : [],
2828
widgets : [],
@@ -520,7 +520,7 @@
520520
$cell = ts.getClosest( $( this ), '.' + ts.css.header );
521521
// use column index from data-attribute or index of current row; fixes #1116
522522
c.last.clickedIndex = $cell.attr( 'data-column' ) || $cell.index();
523-
cell = c.$headerIndexed[ c.last.clickedIndex ];
523+
cell = c.$headerIndexed[ c.last.clickedIndex ][0];
524524
if ( cell && !cell.sortDisabled ) {
525525
ts.initSort( c, cell, e );
526526
}

vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.widgets.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
55
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
66
*/
7-
/*! tablesorter (FORK) - updated 2018-04-30 (v2.30.3)*/
7+
/*! tablesorter (FORK) - updated 2018-05-16 (v2.30.4)*/
88
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
99
(function(factory) {
1010
if (typeof define === 'function' && define.amd) {

vendor/assets/javascripts/jquery-tablesorter/widgets/widget-scroller.js

+19-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Widget: scroller - updated 2018-02-25 (v2.29.6) *//*
1+
/*! Widget: scroller - updated 2018-05-07 (v2.30.4) *//*
22
Copyright (C) 2011 T. Connell & Associates, Inc.
33
44
Dual-licensed under the MIT and GPL licenses
@@ -203,6 +203,7 @@
203203
wo.scroller_calcWidths = [];
204204
wo.scroller_saved = [ 0, 0 ];
205205
wo.scroller_isBusy = true;
206+
wo.scroller_scrollTimer = null;
206207

207208
// set scrollbar width to one of the following (1) explicitly set scroller_barWidth option,
208209
// (2) detected scrollbar width or (3) fallback of 15px
@@ -273,8 +274,11 @@
273274
.off( 'scroll' + namespace )
274275
.on( 'scroll' + namespace, function() {
275276
// Save position
276-
wo.scroller_saved[0] = $tableWrap.scrollLeft();
277-
wo.scroller_saved[1] = $tableWrap.scrollTop();
277+
clearTimeout(wo.scroller_scrollTimer);
278+
wo.scroller_scrollTimer = setTimeout(function() {
279+
wo.scroller_saved[0] = $tableWrap.scrollLeft();
280+
wo.scroller_saved[1] = $tableWrap.scrollTop();
281+
}, 300);
278282
if ( wo.scroller_jumpToHeader ) {
279283
var pos = $win.scrollTop() - $hdr.offset().top;
280284
if ( $( this ).scrollTop() !== 0 && pos < tbHt && pos > 0 ) {
@@ -295,12 +299,18 @@
295299

296300
$table
297301
.off( namespace )
302+
.on( 'sortStart' + namespace, function() {
303+
clearTimeout(wo.scroller_scrollTimer);
304+
wo.scroller_isBusy = true;
305+
})
298306
.on( 'sortEnd filterEnd'.split( ' ' ).join( namespace + ' ' ), function( event ) {
299307
// Sorting, so scroll to top
300308
if ( event.type === 'sortEnd' && wo.scroller_upAfterSort ) {
301-
$tableWrap.animate({
302-
scrollTop : 0
303-
}, 'fast' );
309+
$tableWrap
310+
.scrollLeft( wo.scroller_saved[0] )
311+
.animate({ scrollTop : 0 }, 'fast', function() {
312+
wo.scroller_isBusy = false;
313+
});
304314
} else if ( wo.scroller_fixedColumns ) {
305315
setTimeout( function() {
306316
// restore previous scroll position
@@ -859,7 +869,9 @@
859869
$fixedColumn.find('caption').height( wo.scroller_$header.find( 'caption' ).height() );
860870

861871
$tableWrap.scroll();
862-
wo.scroller_isBusy = false;
872+
setTimeout(function() {
873+
wo.scroller_isBusy = false;
874+
}, 0)
863875

864876
},
865877

0 commit comments

Comments
 (0)