Skip to content

Commit 8239b4c

Browse files
committed
Update tablesorter to latest version (2.28.3)
1 parent 326793c commit 8239b4c

11 files changed

+35
-25
lines changed

CHANGELOG.md

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

4+
#### v1.23.3 (2016-12-19)
5+
6+
* Upgrade tablesorter to v2.28.3
7+
48
#### v1.23.2 (2016-12-09)
59

610
* Upgrade tablesorter to v2.28.1

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.1 (11/27/2016), [documentation]
7+
Current tablesorter version: 2.28.3 (12/16/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 = 2
4+
TINY = 3
55

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

vendor/assets/javascripts/jquery-tablesorter/beta-testing/widget-reorder.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,15 @@ $.tablesorter.addWidget({
5656
top: r.top - clickOffset[1],
5757
width: $th.outerWidth()
5858
})
59-
.appendTo('body')
59+
.appendTo('head')
6060
.find('th, td').addClass(wo.reorder_helperClass);
6161
$bar = $('<div class="' + wo.reorder_helperBar + '" />')
6262
.css({
6363
position : 'absolute',
6464
top : c.$table.find('thead').offset().top,
6565
height : $th.closest('thead').outerHeight() + c.$table.find('tbody').height()
6666
})
67-
.appendTo('body');
67+
.appendTo('head');
6868
positionBar(e);
6969
lastIndx = endIndex;
7070
},
@@ -179,4 +179,4 @@ $.tablesorter.addWidget({
179179
// add mouse coordinates
180180
$x = $('#main h1:last'); $(document).mousemove(function(e){ $x.html( e.pageX ); });
181181

182-
})(jQuery);
182+
})(jQuery);

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
55
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
66
*/
7-
/*! tablesorter (FORK) - updated 12-08-2016 (v2.28.1)*/
7+
/*! tablesorter (FORK) - updated 12-16-2016 (v2.28.3)*/
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.1 *//*
19+
/*! TableSorter (FORK) v2.28.3 *//*
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.1',
43+
version : '2.28.3',
4444

4545
parsers : [],
4646
widgets : [],
@@ -5374,7 +5374,7 @@
53745374

53755375
})(jQuery, window);
53765376

5377-
/*! Widget: resizable - updated 6/28/2016 (v2.26.5) */
5377+
/*! Widget: resizable - updated 12/15/2016 (v2.28.2) */
53785378
/*jshint browser:true, jquery:true, unused:false */
53795379
;(function ($, window) {
53805380
'use strict';
@@ -5397,7 +5397,7 @@
53975397
'.' + ts.css.resizableHandle + ' { position: absolute; display: inline-block; width: 8px;' +
53985398
'top: 1px; cursor: ew-resize; z-index: 3; user-select: none; -moz-user-select: none; }' +
53995399
'</style>';
5400-
$(s).appendTo('body');
5400+
$('head').append(s);
54015401
});
54025402

54035403
ts.resizable = {

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.1 *//*
1+
/*! TableSorter (FORK) v2.28.3 *//*
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.1',
25+
version : '2.28.3',
2626

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

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

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

25802580
})(jQuery, window);
25812581

2582-
/*! Widget: resizable - updated 6/28/2016 (v2.26.5) */
2582+
/*! Widget: resizable - updated 12/15/2016 (v2.28.2) */
25832583
/*jshint browser:true, jquery:true, unused:false */
25842584
;(function ($, window) {
25852585
'use strict';
@@ -2602,7 +2602,7 @@
26022602
'.' + ts.css.resizableHandle + ' { position: absolute; display: inline-block; width: 8px;' +
26032603
'top: 1px; cursor: ew-resize; z-index: 3; user-select: none; -moz-user-select: none; }' +
26042604
'</style>';
2605-
$(s).appendTo('body');
2605+
$('head').append(s);
26062606
});
26072607

26082608
ts.resizable = {

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

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Widget: columnSelector (responsive table widget) - updated 9/28/2016 (v2.27.8) *//*
1+
/* Widget: columnSelector (responsive table widget) - updated 12/15/2016 (v2.28.2) *//*
22
* Requires tablesorter v2.8+ and jQuery 1.7+
33
* by Justin Hallett & Rob Garrison
44
*/
@@ -113,7 +113,7 @@
113113
},
114114

115115
setupSelector: function(c, wo) {
116-
var index, name, $header, priority, col, colId,
116+
var index, name, $header, priority, col, colId, $el,
117117
colSel = c.selector,
118118
$container = colSel.$container,
119119
useStorage = wo.columnSelector_saveColumns && ts.storage,
@@ -149,10 +149,13 @@
149149
saved[colId] : (typeof wo.columnSelector_columns[colId] !== 'undefined' && wo.columnSelector_columns[colId] !== null) ?
150150
wo.columnSelector_columns[colId] : (state === 'true' || state !== 'false');
151151
colSel.$column[colId] = $(this);
152-
153-
// set default col title
154-
name = $header.attr(wo.columnSelector_name) || $header.text();
155152
if ($container.length) {
153+
// set default col title
154+
name = $header.attr(wo.columnSelector_name) || $header.text().trim();
155+
if (typeof wo.columnSelector_layoutCustomizer === "function") {
156+
$el = $header.find('.' + ts.css.headerIn);
157+
name = wo.columnSelector_layoutCustomizer( $el.length ? $el : $header, name, parseInt(colId, 10) );
158+
}
156159
colSel.$wrapper[colId] = $(wo.columnSelector_layout.replace(/\{name\}/g, name)).appendTo($container);
157160
colSel.$checkbox[colId] = colSel.$wrapper[colId]
158161
// input may not be wrapped within the layout template
@@ -270,7 +273,7 @@
270273
var array = [],
271274
temp = ' col:nth-child(' + column + ')';
272275
array.push(prefix + temp + ',' + prefix + '_extra_table' + temp);
273-
temp = ' tr:not(.hasSpan) th:nth-child(' + column + ')';
276+
temp = ' tr:not(.hasSpan) th[data-column="' + ( column - 1 ) + '"]';
274277
array.push(prefix + temp + ',' + prefix + '_extra_table' + temp);
275278
temp = ' tr:not(.hasSpan) td:nth-child(' + column + ')';
276279
array.push(prefix + temp + ',' + prefix + '_extra_table' + temp);
@@ -497,6 +500,9 @@
497500

498501
// container layout
499502
columnSelector_layout : '<label><input type="checkbox">{name}</label>',
503+
// layout customizer callback called for each column
504+
// function($cell, name, column){ return name || $cell.html(); }
505+
columnSelector_layoutCustomizer : null,
500506
// data attribute containing column name to use in the selector container
501507
columnSelector_name : 'data-selector-name',
502508

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Widget: resizable - updated 6/28/2016 (v2.26.5) */
1+
/*! Widget: resizable - updated 12/15/2016 (v2.28.2) */
22
/*jshint browser:true, jquery:true, unused:false */
33
;(function ($, window) {
44
'use strict';
@@ -21,7 +21,7 @@
2121
'.' + ts.css.resizableHandle + ' { position: absolute; display: inline-block; width: 8px;' +
2222
'top: 1px; cursor: ew-resize; z-index: 3; user-select: none; -moz-user-select: none; }' +
2323
'</style>';
24-
$(s).appendTo('body');
24+
$('head').append(s);
2525
});
2626

2727
ts.resizable = {

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
'.' + tscss.scrollerWrap + ' .' + tscss.scrollerFixedPanel +
140140
' { position: absolute; top: 0; bottom: 0; z-index: 2; left: 0; right: 0; } ' +
141141
'</style>';
142-
$( style ).appendTo( 'body' );
142+
$( 'head' ).append( style );
143143
});
144144

145145
ts.scroller = {

0 commit comments

Comments
 (0)