Skip to content

Commit 326793c

Browse files
committed
Update tablesorter to latest version (2.28.1)
1 parent b13967e commit 326793c

File tree

10 files changed

+68
-43
lines changed

10 files changed

+68
-43
lines changed

CHANGELOG.md

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

4+
#### v1.23.2 (2016-12-09)
5+
6+
* Upgrade tablesorter to v2.28.1
7+
48
#### v1.23.1 (2016-11-29)
59

610
* Add actual files of v2.28.0 (facepalm!)

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.28.0 (11/27/2016), [documentation]
7+
Current tablesorter version: 2.28.1 (11/27/2016), [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 = 23
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

+22-15
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
55
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
66
*/
7-
/*! tablesorter (FORK) - updated 11-26-2016 (v2.28.0)*/
7+
/*! tablesorter (FORK) - updated 12-08-2016 (v2.28.1)*/
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.28.0 *//*
19+
/*! TableSorter (FORK) v2.28.1 *//*
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.28.0',
43+
version : '2.28.1',
4444

4545
parsers : [],
4646
widgets : [],
@@ -2426,7 +2426,7 @@
24262426
validateOptions : function( c ) {
24272427
var setting, setting2, typ, timer,
24282428
// ignore options containing an array
2429-
ignore = 'sortForce sortList sortAppend widgets'.split( ' ' ),
2429+
ignore = 'headers sortForce sortList sortAppend widgets'.split( ' ' ),
24302430
orig = c.originalSettings;
24312431
if ( orig ) {
24322432
if ( c.debug ) {
@@ -2438,7 +2438,7 @@
24382438
console.warn( 'Tablesorter Warning! "table.config.' + setting + '" option not recognized' );
24392439
} else if ( typ === 'object' ) {
24402440
for ( setting2 in orig[setting] ) {
2441-
typ = typeof ts.defaults[setting][setting2];
2441+
typ = ts.defaults[setting] && typeof ts.defaults[setting][setting2];
24422442
if ( $.inArray( setting, ignore ) < 0 && typ === 'undefined' ) {
24432443
console.warn( 'Tablesorter Warning! "table.config.' + setting + '.' + setting2 + '" option not recognized' );
24442444
}
@@ -2913,7 +2913,7 @@
29132913

29142914
})(jQuery, window, document);
29152915

2916-
/*! Widget: uitheme - updated 7/31/2016 (v2.27.0) */
2916+
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */
29172917
;(function ($) {
29182918
'use strict';
29192919
var ts = $.tablesorter || {};
@@ -3039,7 +3039,7 @@
30393039
.addClass(themes.icons || '');
30403040
}
30413041
// filter widget initializes after uitheme
3042-
if (c.widgets.indexOf('filter') > -1) {
3042+
if (ts.hasWidget( c.table, 'filter' )) {
30433043
tmp = function() {
30443044
$table.children('thead').children('.' + ts.css.filterRow)
30453045
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
@@ -3188,7 +3188,7 @@
31883188

31893189
})(jQuery);
31903190

3191-
/*! Widget: filter - updated 11/26/2016 (v2.28.0) *//*
3191+
/*! Widget: filter - updated 12/8/2016 (v2.28.1) *//*
31923192
* Requires tablesorter v2.8+ and jQuery 1.7+
31933193
* by Rob Garrison
31943194
*/
@@ -4012,7 +4012,7 @@
40124012
return;
40134013
}
40144014
// change event = no delay; last true flag tells getFilters to skip newest timed input
4015-
tsf.searching( table, true, true );
4015+
tsf.searching( table, true, true, column );
40164016
})
40174017
// include change for select - fixes #473
40184018
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
@@ -4021,12 +4021,19 @@
40214021
liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
40224022
wo.filter_liveSearch :
40234023
ts.getColumnData( table, wo.filter_liveSearch, column );
4024-
// don't allow 'change' event to process if the input value is the same - fixes #685
40254024
if ( table.config.widgetOptions.filter_initialized &&
4026-
( event.which === tskeyCodes.enter || event.type === 'search' ||
4027-
( event.type === 'change' ||
4028-
( event.type === 'input' && liveSearch === true ) ) &&
4029-
this.value !== c.lastSearch[column] )
4025+
// immediate search if user presses enter
4026+
( event.which === tskeyCodes.enter ||
4027+
// immediate search if a "search" is triggered on the input
4028+
event.type === 'search' ||
4029+
// change & input events must be ignored if liveSearch !== true
4030+
( event.type === 'change' || event.type === 'input' ) &&
4031+
// prevent search if liveSearch is a number
4032+
liveSearch === true &&
4033+
// don't allow 'change' or 'input' event to process if the input value
4034+
// is the same - fixes #685
4035+
this.value !== c.lastSearch[column]
4036+
)
40304037
) {
40314038
event.preventDefault();
40324039
// init search with no delay
@@ -4046,7 +4053,7 @@
40464053
wo.filter_liveSearch :
40474054
// get column setting, or set to fallback value, or default to false
40484055
ts.getColumnData( table, wo.filter_liveSearch, column );
4049-
if ( typeof liveSearch !== 'undefined' ) {
4056+
if ( typeof liveSearch === 'undefined' ) {
40504057
liveSearch = wo.filter_liveSearch.fallback || false;
40514058
}
40524059
}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! TableSorter (FORK) v2.28.0 *//*
1+
/*! TableSorter (FORK) v2.28.1 *//*
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.28.0',
25+
version : '2.28.1',
2626

2727
parsers : [],
2828
widgets : [],

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

+18-11
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
55
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
66
*/
7-
/*! tablesorter (FORK) - updated 11-26-2016 (v2.28.0)*/
7+
/*! tablesorter (FORK) - updated 12-08-2016 (v2.28.1)*/
88
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
99
(function(factory) {
1010
if (typeof define === 'function' && define.amd) {
@@ -118,7 +118,7 @@
118118

119119
})(jQuery, window, document);
120120

121-
/*! Widget: uitheme - updated 7/31/2016 (v2.27.0) */
121+
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */
122122
;(function ($) {
123123
'use strict';
124124
var ts = $.tablesorter || {};
@@ -244,7 +244,7 @@
244244
.addClass(themes.icons || '');
245245
}
246246
// filter widget initializes after uitheme
247-
if (c.widgets.indexOf('filter') > -1) {
247+
if (ts.hasWidget( c.table, 'filter' )) {
248248
tmp = function() {
249249
$table.children('thead').children('.' + ts.css.filterRow)
250250
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')
@@ -393,7 +393,7 @@
393393

394394
})(jQuery);
395395

396-
/*! Widget: filter - updated 11/26/2016 (v2.28.0) *//*
396+
/*! Widget: filter - updated 12/8/2016 (v2.28.1) *//*
397397
* Requires tablesorter v2.8+ and jQuery 1.7+
398398
* by Rob Garrison
399399
*/
@@ -1217,7 +1217,7 @@
12171217
return;
12181218
}
12191219
// change event = no delay; last true flag tells getFilters to skip newest timed input
1220-
tsf.searching( table, true, true );
1220+
tsf.searching( table, true, true, column );
12211221
})
12221222
// include change for select - fixes #473
12231223
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
@@ -1226,12 +1226,19 @@
12261226
liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
12271227
wo.filter_liveSearch :
12281228
ts.getColumnData( table, wo.filter_liveSearch, column );
1229-
// don't allow 'change' event to process if the input value is the same - fixes #685
12301229
if ( table.config.widgetOptions.filter_initialized &&
1231-
( event.which === tskeyCodes.enter || event.type === 'search' ||
1232-
( event.type === 'change' ||
1233-
( event.type === 'input' && liveSearch === true ) ) &&
1234-
this.value !== c.lastSearch[column] )
1230+
// immediate search if user presses enter
1231+
( event.which === tskeyCodes.enter ||
1232+
// immediate search if a "search" is triggered on the input
1233+
event.type === 'search' ||
1234+
// change & input events must be ignored if liveSearch !== true
1235+
( event.type === 'change' || event.type === 'input' ) &&
1236+
// prevent search if liveSearch is a number
1237+
liveSearch === true &&
1238+
// don't allow 'change' or 'input' event to process if the input value
1239+
// is the same - fixes #685
1240+
this.value !== c.lastSearch[column]
1241+
)
12351242
) {
12361243
event.preventDefault();
12371244
// init search with no delay
@@ -1251,7 +1258,7 @@
12511258
wo.filter_liveSearch :
12521259
// get column setting, or set to fallback value, or default to false
12531260
ts.getColumnData( table, wo.filter_liveSearch, column );
1254-
if ( typeof liveSearch !== 'undefined' ) {
1261+
if ( typeof liveSearch === 'undefined' ) {
12551262
liveSearch = wo.filter_liveSearch.fallback || false;
12561263
}
12571264
}

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

+15-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Widget: filter - updated 11/26/2016 (v2.28.0) *//*
1+
/*! Widget: filter - updated 12/8/2016 (v2.28.1) *//*
22
* Requires tablesorter v2.8+ and jQuery 1.7+
33
* by Rob Garrison
44
*/
@@ -822,7 +822,7 @@
822822
return;
823823
}
824824
// change event = no delay; last true flag tells getFilters to skip newest timed input
825-
tsf.searching( table, true, true );
825+
tsf.searching( table, true, true, column );
826826
})
827827
// include change for select - fixes #473
828828
.bind( 'search change keypress input '.split( ' ' ).join( namespace + ' ' ), function( event ) {
@@ -831,12 +831,19 @@
831831
liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
832832
wo.filter_liveSearch :
833833
ts.getColumnData( table, wo.filter_liveSearch, column );
834-
// don't allow 'change' event to process if the input value is the same - fixes #685
835834
if ( table.config.widgetOptions.filter_initialized &&
836-
( event.which === tskeyCodes.enter || event.type === 'search' ||
837-
( event.type === 'change' ||
838-
( event.type === 'input' && liveSearch === true ) ) &&
839-
this.value !== c.lastSearch[column] )
835+
// immediate search if user presses enter
836+
( event.which === tskeyCodes.enter ||
837+
// immediate search if a "search" is triggered on the input
838+
event.type === 'search' ||
839+
// change & input events must be ignored if liveSearch !== true
840+
( event.type === 'change' || event.type === 'input' ) &&
841+
// prevent search if liveSearch is a number
842+
liveSearch === true &&
843+
// don't allow 'change' or 'input' event to process if the input value
844+
// is the same - fixes #685
845+
this.value !== c.lastSearch[column]
846+
)
840847
) {
841848
event.preventDefault();
842849
// init search with no delay
@@ -856,7 +863,7 @@
856863
wo.filter_liveSearch :
857864
// get column setting, or set to fallback value, or default to false
858865
ts.getColumnData( table, wo.filter_liveSearch, column );
859-
if ( typeof liveSearch !== 'undefined' ) {
866+
if ( typeof liveSearch === 'undefined' ) {
860867
liveSearch = wo.filter_liveSearch.fallback || false;
861868
}
862869
}

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Widget: print - updated 4/11/2016 (v2.25.8) *//*
1+
/* Widget: print - updated 12/8/2016 (v2.28.1) *//*
22
* Requires tablesorter v2.8+ and jQuery 1.2.6+
33
*/
44
/*jshint browser:true, jquery:true, unused:false */
@@ -70,7 +70,7 @@
7070
// columnSelector -> c.selector.$style
7171
// Assume 'visible' means hidden columns have a 'display:none' style, or a class name
7272
// add the definition to the wo.print_extraCSS option
73-
if (/s/i.test(wo.print_columns) && c.selector && c.widgets.indexOf('columnSelector') >= 0) {
73+
if (/s/i.test(wo.print_columns) && c.selector && ts.hasWidget( c.table, 'columnSelector' )) {
7474
// show selected (visible) columns; make a copy of the columnSelector widget css (not media queries)
7575
printStyle += wo.columnSelector_mediaquery && c.selector.auto ? '' : c.selector.$style.text();
7676
} else if (/a/i.test(wo.print_columns)) {

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Widget: uitheme - updated 7/31/2016 (v2.27.0) */
1+
/*! Widget: uitheme - updated 12/8/2016 (v2.28.1) */
22
;(function ($) {
33
'use strict';
44
var ts = $.tablesorter || {};
@@ -124,7 +124,7 @@
124124
.addClass(themes.icons || '');
125125
}
126126
// filter widget initializes after uitheme
127-
if (c.widgets.indexOf('filter') > -1) {
127+
if (ts.hasWidget( c.table, 'filter' )) {
128128
tmp = function() {
129129
$table.children('thead').children('.' + ts.css.filterRow)
130130
.removeClass(hasOldTheme ? oldtheme.filterRow || '' : '')

0 commit comments

Comments
 (0)