jquery-tablesorter 1.24.5 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/jquery-tablesorter/version.rb +2 -2
- data/vendor/assets/javascripts/jquery-tablesorter/addons/pager/jquery.tablesorter.pager.js +85 -85
- data/vendor/assets/javascripts/jquery-tablesorter/beta-testing/widget-reorder.js +17 -18
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.combined.js +128 -101
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.js +70 -58
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.widgets.js +58 -43
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-date-extract.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-date-iso8601.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-date-month.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-date-range.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-date-two-digit-year.js +2 -2
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-date-weekday.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-date.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-duration.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-feet-inch-fraction.js +2 -2
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-file-type.js +2 -2
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-ignore-articles.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-image.js +2 -2
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-input-select.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-leading-zeros.js +1 -0
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-named-numbers.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-network.js +4 -4
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-roman.js +5 -5
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-alignChar.js +15 -15
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-build-table.js +28 -18
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-chart.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-columnSelector.js +22 -18
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-cssStickyHeaders.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter-formatter-html5.js +34 -31
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter-formatter-jui.js +46 -46
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter-formatter-select2.js +10 -10
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter-type-insideRange.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-filter.js +17 -13
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-formatter.js +2 -2
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-grouping.js +14 -15
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-headerTitles.js +8 -9
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-lazyload.js +35 -35
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-math.js +8 -9
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-output.js +7 -6
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-pager.js +60 -56
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-print.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-reflow.js +11 -11
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-repeatheaders.js +2 -2
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-resizable.js +3 -3
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-saveSort.js +23 -12
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-scroller.js +3 -4
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-sort2Hash.js +2 -2
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-sortTbodies.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-staticRow.js +7 -7
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-stickyHeaders.js +2 -2
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-storage.js +5 -6
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-uitheme.js +7 -6
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-vertical-group.js +10 -12
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-view.js +3 -3
- metadata +2 -2
@@ -49,7 +49,7 @@
|
|
49
49
|
*/
|
50
50
|
/*jshint browser:true, jquery:true, unused:false */
|
51
51
|
/*global jQuery: false */
|
52
|
-
;(function($){
|
52
|
+
;(function($) {
|
53
53
|
'use strict';
|
54
54
|
|
55
55
|
var ts = $.tablesorter,
|
@@ -68,15 +68,15 @@
|
|
68
68
|
.off('refresh.tsreflow updateComplete.tsreflow2')
|
69
69
|
// emulate jQuery Mobile refresh
|
70
70
|
// https://api.jquerymobile.com/table-reflow/#method-refresh
|
71
|
-
.on('refresh.tsreflow updateComplete.tsreflow2', function(){
|
71
|
+
.on('refresh.tsreflow updateComplete.tsreflow2', function() {
|
72
72
|
tablereflow.init(table, c, wo);
|
73
73
|
});
|
74
|
-
c.$headers.each(function(){
|
74
|
+
c.$headers.each(function() {
|
75
75
|
$this = $(this);
|
76
76
|
headers.push( $.trim( $this.attr(header) || $this.text() ) );
|
77
77
|
});
|
78
|
-
c.$tbodies.children().each(function(){
|
79
|
-
$(this).children().each(function(i){
|
78
|
+
c.$tbodies.children().each(function() {
|
79
|
+
$(this).children().each(function(i) {
|
80
80
|
$(this).attr(title, headers[i]);
|
81
81
|
});
|
82
82
|
});
|
@@ -91,7 +91,7 @@
|
|
91
91
|
.off('refresh.tsreflow2 updateComplete.tsreflow2')
|
92
92
|
// emulate jQuery Mobile refresh
|
93
93
|
// https://api.jquerymobile.com/table-reflow/#method-refresh
|
94
|
-
.on('refresh.tsreflow2 updateComplete.tsreflow2', function(){
|
94
|
+
.on('refresh.tsreflow2 updateComplete.tsreflow2', function() {
|
95
95
|
tablereflow.init2(table, c, wo);
|
96
96
|
});
|
97
97
|
|
@@ -101,7 +101,7 @@
|
|
101
101
|
if ($hdr.length > 1) {
|
102
102
|
txt = [];
|
103
103
|
/*jshint loopfunc:true */
|
104
|
-
$hdr.each(function(){
|
104
|
+
$hdr.each(function() {
|
105
105
|
$this = $(this);
|
106
106
|
if (!$this.hasClass(wo.reflow2_classIgnore)) {
|
107
107
|
txt.push( $this.attr(header) || $this.text() );
|
@@ -114,9 +114,9 @@
|
|
114
114
|
}
|
115
115
|
// include 'remove-me' class so these additional elements are removed before updating
|
116
116
|
txt = '<b class="' + c.selectorRemove.slice(1) + ' ' + wo.reflow2_labelClass;
|
117
|
-
c.$tbodies.children().each(function(){
|
117
|
+
c.$tbodies.children().each(function() {
|
118
118
|
$tbody = ts.processTbody(table, $(this), true);
|
119
|
-
$tbody.children().each(function(j){
|
119
|
+
$tbody.children().each(function(j) {
|
120
120
|
$this = $(this);
|
121
121
|
len = headers[j].length;
|
122
122
|
i = len - 1;
|
@@ -149,7 +149,7 @@
|
|
149
149
|
init: function(table, thisWidget, c, wo) {
|
150
150
|
tablereflow.init(table, c, wo);
|
151
151
|
},
|
152
|
-
remove: function(table, c, wo){
|
152
|
+
remove: function(table, c, wo) {
|
153
153
|
tablereflow.remove(table, c, wo);
|
154
154
|
}
|
155
155
|
});
|
@@ -171,7 +171,7 @@
|
|
171
171
|
init: function(table, thisWidget, c, wo) {
|
172
172
|
tablereflow.init2(table, c, wo);
|
173
173
|
},
|
174
|
-
remove: function(table, c, wo){
|
174
|
+
remove: function(table, c, wo) {
|
175
175
|
tablereflow.remove2(table, c, wo);
|
176
176
|
}
|
177
177
|
});
|
@@ -3,7 +3,7 @@
|
|
3
3
|
* Original by Christian Bach from the example-widgets.html demo
|
4
4
|
*/
|
5
5
|
/*global jQuery: false */
|
6
|
-
;(function($){
|
6
|
+
;(function($) {
|
7
7
|
'use strict';
|
8
8
|
|
9
9
|
$.tablesorter.addWidget({
|
@@ -42,7 +42,7 @@
|
|
42
42
|
},
|
43
43
|
// this remove function is called when using the refreshWidgets method or when destroying the tablesorter plugin
|
44
44
|
// this function only applies to tablesorter v2.4+
|
45
|
-
remove: function(table, c, wo){
|
45
|
+
remove: function(table, c, wo) {
|
46
46
|
wo.repeatHeaders = '';
|
47
47
|
c.$table.find('tr.repeated-header').remove();
|
48
48
|
}
|
@@ -12,7 +12,7 @@
|
|
12
12
|
});
|
13
13
|
|
14
14
|
// Add extra scroller css
|
15
|
-
$(function(){
|
15
|
+
$(function() {
|
16
16
|
var s = '<style>' +
|
17
17
|
'body.' + ts.css.resizableNoSelect + ' { -ms-user-select: none; -moz-user-select: -moz-none;' +
|
18
18
|
'-khtml-user-select: none; -webkit-user-select: none; user-select: none; }' +
|
@@ -157,7 +157,7 @@
|
|
157
157
|
|
158
158
|
if ( ts.hasWidget( c.table, 'scroller' ) ) {
|
159
159
|
tableHeight = 0;
|
160
|
-
c.$table.closest( '.' + ts.css.scrollerWrap ).children().each(function(){
|
160
|
+
c.$table.closest( '.' + ts.css.scrollerWrap ).children().each(function() {
|
161
161
|
var $this = $(this);
|
162
162
|
// center table has a max-height set
|
163
163
|
tableHeight += $this.filter('[style*="height"]').length ? $this.height() : $this.children('table').height();
|
@@ -379,7 +379,7 @@
|
|
379
379
|
});
|
380
380
|
|
381
381
|
ts.resizableReset = function( table, refreshing ) {
|
382
|
-
$( table ).each(function(){
|
382
|
+
$( table ).each(function() {
|
383
383
|
var index, $t,
|
384
384
|
c = this.config,
|
385
385
|
wo = c && c.widgetOptions,
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: saveSort - updated
|
1
|
+
/*! Widget: saveSort - updated 2018-03-19 (v2.30.1) *//*
|
2
2
|
* Requires tablesorter v2.16+
|
3
3
|
* by Rob Garrison
|
4
4
|
*/
|
@@ -6,6 +6,15 @@
|
|
6
6
|
'use strict';
|
7
7
|
var ts = $.tablesorter || {};
|
8
8
|
|
9
|
+
function getStoredSortList(c) {
|
10
|
+
var stored = ts.storage( c.table, 'tablesorter-savesort' );
|
11
|
+
return (stored && stored.hasOwnProperty('sortList') && $.isArray(stored.sortList)) ? stored.sortList : [];
|
12
|
+
}
|
13
|
+
|
14
|
+
function sortListChanged(c, sortList) {
|
15
|
+
return (sortList || getStoredSortList(c)).join(',') !== c.sortList.join(',');
|
16
|
+
}
|
17
|
+
|
9
18
|
// this widget saves the last sort only if the
|
10
19
|
// saveSort widget option is true AND the
|
11
20
|
// $.tablesorter.storage function is included
|
@@ -21,18 +30,19 @@
|
|
21
30
|
thisWidget.format(table, c, wo, true);
|
22
31
|
},
|
23
32
|
format: function(table, c, wo, init) {
|
24
|
-
var
|
33
|
+
var time,
|
25
34
|
$table = c.$table,
|
26
35
|
saveSort = wo.saveSort !== false, // make saveSort active/inactive; default to true
|
27
|
-
sortList = { 'sortList' : c.sortList }
|
28
|
-
|
36
|
+
sortList = { 'sortList' : c.sortList },
|
37
|
+
debug = ts.debug(c, 'saveSort');
|
38
|
+
if (debug) {
|
29
39
|
time = new Date();
|
30
40
|
}
|
31
41
|
if ($table.hasClass('hasSaveSort')) {
|
32
|
-
if (saveSort && table.hasInitialized && ts.storage) {
|
42
|
+
if (saveSort && table.hasInitialized && ts.storage && sortListChanged(c)) {
|
33
43
|
ts.storage( table, 'tablesorter-savesort', sortList );
|
34
|
-
if (
|
35
|
-
console.log('saveSort
|
44
|
+
if (debug) {
|
45
|
+
console.log('saveSort >> Saving last sort: ' + c.sortList + ts.benchmark(time));
|
36
46
|
}
|
37
47
|
}
|
38
48
|
} else {
|
@@ -41,10 +51,9 @@
|
|
41
51
|
sortList = '';
|
42
52
|
// get data
|
43
53
|
if (ts.storage) {
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
console.log('saveSort: Last sort loaded: "' + sortList + '"' + ts.benchmark(time));
|
54
|
+
sortList = getStoredSortList(c);
|
55
|
+
if (debug) {
|
56
|
+
console.log('saveSort >> Last sort loaded: "' + sortList + '"' + ts.benchmark(time));
|
48
57
|
}
|
49
58
|
$table.bind('saveSortReset', function(event) {
|
50
59
|
event.stopPropagation();
|
@@ -57,7 +66,9 @@
|
|
57
66
|
c.sortList = sortList;
|
58
67
|
} else if (table.hasInitialized && sortList && sortList.length > 0) {
|
59
68
|
// update sort change
|
60
|
-
|
69
|
+
if (sortListChanged(c, sortList)) {
|
70
|
+
ts.sortOn(c, sortList);
|
71
|
+
}
|
61
72
|
}
|
62
73
|
}
|
63
74
|
},
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: scroller - updated
|
1
|
+
/*! Widget: scroller - updated 2018-02-25 (v2.29.6) *//*
|
2
2
|
Copyright (C) 2011 T. Connell & Associates, Inc.
|
3
3
|
|
4
4
|
Dual-licensed under the MIT and GPL licenses
|
@@ -188,7 +188,7 @@
|
|
188
188
|
},
|
189
189
|
|
190
190
|
setup : function( c, wo ) {
|
191
|
-
var tbHt, $hdr, $t, $hCells, $
|
191
|
+
var tbHt, $hdr, $t, $hCells, $tableWrap, events, tmp, detectedWidth,
|
192
192
|
$win = $( window ),
|
193
193
|
tsScroller = ts.scroller,
|
194
194
|
namespace = c.namespace + 'tsscroller',
|
@@ -228,7 +228,6 @@
|
|
228
228
|
// maintain any bindings on the tfoot cells
|
229
229
|
.append( $t.clone( true ) )
|
230
230
|
.wrap( '<div class="' + tscss.scrollerFooter + '"/>' );
|
231
|
-
$fCells = $foot.children( 'tfoot' ).eq( 0 ).children( 'tr' ).children();
|
232
231
|
}
|
233
232
|
wo.scroller_$footer = $foot;
|
234
233
|
|
@@ -361,7 +360,7 @@
|
|
361
360
|
// updateAll called - need to give the browser time to adjust the layout
|
362
361
|
// before calculating fix column widths
|
363
362
|
if ( c.table.hasInitialized && c.isScrolling ) {
|
364
|
-
setTimeout(function(){
|
363
|
+
setTimeout(function() {
|
365
364
|
ts.scroller.resize( c, wo );
|
366
365
|
}, 50);
|
367
366
|
}
|
@@ -25,7 +25,7 @@
|
|
25
25
|
if ( filter ) {
|
26
26
|
filter = filter.split( wo.sort2Hash_separator );
|
27
27
|
c.$table.one( 'tablesorter-ready', function() {
|
28
|
-
setTimeout(function(){
|
28
|
+
setTimeout(function() {
|
29
29
|
c.$table.one( 'filterEnd', function() {
|
30
30
|
$(this).triggerHandler( 'pageAndSize', [ page, size ] );
|
31
31
|
});
|
@@ -237,7 +237,7 @@
|
|
237
237
|
var baseUrl = window.location.href.split(hashChar)[0];
|
238
238
|
// Ensure that there is a leading hash character
|
239
239
|
var firstChar = newHash[0];
|
240
|
-
if (firstChar
|
240
|
+
if (firstChar !== hashChar) {
|
241
241
|
newHash = hashChar + newHash;
|
242
242
|
}
|
243
243
|
// Update URL in browser
|
@@ -230,7 +230,7 @@
|
|
230
230
|
init : function( table, thisWidget, c, wo ) {
|
231
231
|
ts.sortTbodies.init( c, wo );
|
232
232
|
},
|
233
|
-
remove : function( table, c, wo
|
233
|
+
remove : function( table, c, wo ) {
|
234
234
|
c.$table.unbind( 'sortBegin updateComplete '.split( ' ' ).join( c.namespace + 'sortTbody ' ) );
|
235
235
|
c.serverSideSorting = wo.sortTbody_original_serverSideSorting;
|
236
236
|
c.cssInfoBlock = wo.sortTbody_original_cssInfoBlock;
|
@@ -11,19 +11,19 @@
|
|
11
11
|
*/
|
12
12
|
/*jshint browser:true, jquery:true, unused:false */
|
13
13
|
/*global jQuery: false */
|
14
|
-
;(function($){
|
14
|
+
;(function($) {
|
15
15
|
'use strict';
|
16
16
|
var ts = $.tablesorter,
|
17
17
|
|
18
18
|
// add/refresh row indexes
|
19
|
-
addIndexes = function(table){
|
19
|
+
addIndexes = function(table) {
|
20
20
|
var $tr, wo, v, indx, rows,
|
21
21
|
c = table.config;
|
22
22
|
// 'Index' the static rows, saving their current (starting) position in the
|
23
23
|
// table inside a data() param on the <tr> element itself for later use.
|
24
24
|
if (c) {
|
25
25
|
wo = c.widgetOptions;
|
26
|
-
c.$tbodies.each(function(){
|
26
|
+
c.$tbodies.each(function() {
|
27
27
|
$tr = $(this).children();
|
28
28
|
rows = $tr.length;
|
29
29
|
$tr.filter(wo.staticRow_class).each(function() {
|
@@ -55,12 +55,12 @@
|
|
55
55
|
staticRow_event : 'staticRowsRefresh'
|
56
56
|
},
|
57
57
|
|
58
|
-
init: function(table, thisWidget, c, wo){
|
58
|
+
init: function(table, thisWidget, c, wo) {
|
59
59
|
addIndexes(table);
|
60
60
|
// refresh static rows after updates
|
61
61
|
c.$table
|
62
62
|
.unbind( ('updateComplete.tsstaticrows ' + wo.staticRow_event).replace(/\s+/g, ' ') )
|
63
|
-
.bind('updateComplete.tsstaticrows ' + wo.staticRow_event, function(){
|
63
|
+
.bind('updateComplete.tsstaticrows ' + wo.staticRow_event, function() {
|
64
64
|
addIndexes(table);
|
65
65
|
ts.applyWidget( table );
|
66
66
|
});
|
@@ -71,7 +71,7 @@
|
|
71
71
|
// & repeat until no more re-shuffling is needed
|
72
72
|
var targetIndex, $thisRow, indx, numRows, $tbody, hasShuffled, $rows, max;
|
73
73
|
|
74
|
-
c.$tbodies.each(function(){
|
74
|
+
c.$tbodies.each(function() {
|
75
75
|
$tbody = $.tablesorter.processTbody(table, $(this), true); // remove tbody
|
76
76
|
hasShuffled = true;
|
77
77
|
indx = 0;
|
@@ -112,7 +112,7 @@
|
|
112
112
|
c.$table.triggerHandler('staticRowsComplete', table);
|
113
113
|
},
|
114
114
|
|
115
|
-
remove : function(table, c, wo){
|
115
|
+
remove : function(table, c, wo) {
|
116
116
|
c.$table.unbind( ('updateComplete.tsstaticrows ' + wo.staticRow_event).replace(/\s+/g, ' ') );
|
117
117
|
}
|
118
118
|
|
@@ -120,7 +120,7 @@
|
|
120
120
|
$stickyThead = $stickyTable.children('thead:first'),
|
121
121
|
$stickyCells,
|
122
122
|
laststate = '',
|
123
|
-
setWidth = function($orig, $clone){
|
123
|
+
setWidth = function($orig, $clone) {
|
124
124
|
var index, width, border, $cell, $this,
|
125
125
|
$cells = $orig.filter(':visible'),
|
126
126
|
len = $cells.length;
|
@@ -261,7 +261,7 @@
|
|
261
261
|
});
|
262
262
|
c.$table
|
263
263
|
.unbind('stickyHeadersUpdate' + namespace)
|
264
|
-
.bind('stickyHeadersUpdate' + namespace, function(){
|
264
|
+
.bind('stickyHeadersUpdate' + namespace, function() {
|
265
265
|
scrollSticky( true );
|
266
266
|
});
|
267
267
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: storage - updated
|
1
|
+
/*! Widget: storage - updated 2018-03-18 (v2.30.0) */
|
2
2
|
/*global JSON:false */
|
3
3
|
;(function ($, window, document) {
|
4
4
|
'use strict';
|
@@ -44,6 +44,7 @@
|
|
44
44
|
values = {},
|
45
45
|
c = table.config,
|
46
46
|
wo = c && c.widgetOptions,
|
47
|
+
debug = ts.debug(c, 'storage'),
|
47
48
|
storageType = (
|
48
49
|
( options && options.storageType ) || ( wo && wo.storage_storageType )
|
49
50
|
).toString().charAt(0).toLowerCase(),
|
@@ -72,14 +73,12 @@
|
|
72
73
|
hasStorage = true;
|
73
74
|
window[storageType].removeItem('_tmptest');
|
74
75
|
} catch (error) {
|
75
|
-
|
76
|
-
console.warn( storageType + ' is not supported in this browser' );
|
77
|
-
}
|
76
|
+
console.warn( storageType + ' is not supported in this browser' );
|
78
77
|
}
|
79
78
|
}
|
80
79
|
}
|
81
|
-
if (
|
82
|
-
console.log('Storage
|
80
|
+
if (debug) {
|
81
|
+
console.log('Storage >> Using', hasStorage ? storageType : 'cookies');
|
83
82
|
}
|
84
83
|
// *** get value ***
|
85
84
|
if ($.parseJSON) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: uitheme - updated
|
1
|
+
/*! Widget: uitheme - updated 2018-03-18 (v2.30.0) */
|
2
2
|
;(function ($) {
|
3
3
|
'use strict';
|
4
4
|
var ts = $.tablesorter || {};
|
@@ -63,8 +63,9 @@
|
|
63
63
|
theme = c.theme || 'jui',
|
64
64
|
themes = themesAll[theme] || {},
|
65
65
|
remove = $.trim( [ themes.sortNone, themes.sortDesc, themes.sortAsc, themes.active ].join( ' ' ) ),
|
66
|
-
iconRmv = $.trim( [ themes.iconSortNone, themes.iconSortDesc, themes.iconSortAsc ].join( ' ' ) )
|
67
|
-
|
66
|
+
iconRmv = $.trim( [ themes.iconSortNone, themes.iconSortDesc, themes.iconSortAsc ].join( ' ' ) ),
|
67
|
+
debug = ts.debug(c, 'uitheme');
|
68
|
+
if (debug) { time = new Date(); }
|
68
69
|
// initialization code - run once
|
69
70
|
if (!$table.hasClass('tablesorter-' + theme) || c.theme !== c.appliedTheme || !wo.uitheme_applied) {
|
70
71
|
wo.uitheme_applied = true;
|
@@ -109,7 +110,7 @@
|
|
109
110
|
$(this)[ event.type === 'mouseenter' ? 'addClass' : 'removeClass' ](themes.hover || '');
|
110
111
|
});
|
111
112
|
|
112
|
-
$headers.each(function(){
|
113
|
+
$headers.each(function() {
|
113
114
|
var $this = $(this);
|
114
115
|
if (!$this.find('.' + ts.css.wrapper).length) {
|
115
116
|
// Firefox needs this inner div to position the icon & resizer correctly
|
@@ -167,8 +168,8 @@
|
|
167
168
|
}
|
168
169
|
}
|
169
170
|
}
|
170
|
-
if (
|
171
|
-
console.log('
|
171
|
+
if (debug) {
|
172
|
+
console.log('uitheme >> Applied ' + theme + ' theme' + ts.benchmark(time));
|
172
173
|
}
|
173
174
|
},
|
174
175
|
remove: function(table, c, wo, refreshing) {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*! Widget: vertical-group (BETA) - updated 12/13/2017 (v2.29.1) */
|
2
|
-
/* Requires tablesorter and jQuery
|
2
|
+
/* Requires tablesorter and jQuery
|
3
3
|
* Originally by @aavmurphy (Andrew Murphy)
|
4
4
|
* Adapted for tablesorter by Rob Garrison - see #1469 & #1470
|
5
5
|
*
|
@@ -7,7 +7,7 @@
|
|
7
7
|
*/
|
8
8
|
/* jshint browser:true, jquery:true, unused:false */
|
9
9
|
/* global jQuery:false */
|
10
|
-
;(function($){
|
10
|
+
;(function($) {
|
11
11
|
'use strict';
|
12
12
|
|
13
13
|
var ts = $.tablesorter,
|
@@ -19,11 +19,11 @@
|
|
19
19
|
verticalGroupShow: 'tablesorter-vertical-group-show'
|
20
20
|
});
|
21
21
|
|
22
|
-
ts.addWidget({
|
23
|
-
id: 'vertical-group',
|
22
|
+
ts.addWidget({
|
23
|
+
id: 'vertical-group',
|
24
24
|
priority: 99,
|
25
25
|
init: verticalGroup,
|
26
|
-
format: verticalGroup
|
26
|
+
format: verticalGroup
|
27
27
|
});
|
28
28
|
|
29
29
|
function cleanUp( el ) {
|
@@ -37,7 +37,7 @@
|
|
37
37
|
.addClass( wo.zebra[ indx % 2] );
|
38
38
|
}
|
39
39
|
|
40
|
-
function verticalGroup( table, c, wo
|
40
|
+
function verticalGroup( table, c, wo ) {
|
41
41
|
// -------------------------------------------------------------------------
|
42
42
|
// loop thru the header row,
|
43
43
|
// - look for .vertical-group
|
@@ -51,9 +51,9 @@
|
|
51
51
|
// else if this column does not have '.vertical-group', then this cell is SHOW
|
52
52
|
// else if this cell is NOT the same as the cell-above, then this cell is SHOW
|
53
53
|
// else this cell is HIDE
|
54
|
-
// if this cell is SHOW, set ALWAYS_SHOW
|
55
|
-
// if this cell is SHOW,
|
56
|
-
// then
|
54
|
+
// if this cell is SHOW, set ALWAYS_SHOW
|
55
|
+
// if this cell is SHOW,
|
56
|
+
// then
|
57
57
|
// set the cell class to .vertical_group_show
|
58
58
|
// else
|
59
59
|
// set the cell class to vertical_group_show
|
@@ -69,10 +69,8 @@
|
|
69
69
|
// - the border-color needs to be the same
|
70
70
|
//
|
71
71
|
// ------------------------------------------------------------------------------------------------
|
72
|
-
var
|
73
|
-
zebra_index = -1, // increments at start of loop
|
72
|
+
var zebra_index = -1, // increments at start of loop
|
74
73
|
rows = table.tBodies[0].rows,
|
75
|
-
header = table.tHead.rows,
|
76
74
|
has_zebra = ts.hasWidget( table, 'zebra'),
|
77
75
|
is_vertical_group_col = [],
|
78
76
|
last_row = [];
|