jquery-tablesorter 1.25.3 → 1.25.4
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 +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.combined.js +3 -3
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.js +2 -2
- data/vendor/assets/javascripts/jquery-tablesorter/jquery.tablesorter.widgets.js +1 -1
- data/vendor/assets/javascripts/jquery-tablesorter/parsers/parser-input-select.js +2 -2
- data/vendor/assets/javascripts/jquery-tablesorter/widgets/widget-cssStickyHeaders.js +125 -119
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 81c1255db7be5f56f3aa65b8080d8a258c22ca1c7b2ea3c046aa71ad320b4544
|
4
|
+
data.tar.gz: 555b348e35c4921588c2138c54f99f8f9159b055a2a440bebf2f90235ad8e013
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ccf460ddda3923e4e2be60fdecc39855c554c17aeec9191e8d5c925616e81888de385faf3f037057beb16aea824e4109b9988101c61400441778b5efb097290
|
7
|
+
data.tar.gz: 88debfb7127e6ce4d970efb6d14a2f25d44a1365ca7084b78940a886014a3ac5971246fa4698e671dea6c1469f1ba4ec280082cb3664b1d8b8f5277b33e3530b
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Simple integration of jQuery tablesorter ([Mottie's fork]) into the asset pipeline.
|
6
6
|
|
7
|
-
Current tablesorter version: 2.30.
|
7
|
+
Current tablesorter version: 2.30.6 (2018-06-16) [documentation]
|
8
8
|
|
9
9
|
Any issue associated with the js/css files, please report to [Mottie's fork].
|
10
10
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
5
5
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
6
6
|
*/
|
7
|
-
/*! tablesorter (FORK) - updated 2018-
|
7
|
+
/*! tablesorter (FORK) - updated 2018-06-16 (v2.30.6)*/
|
8
8
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
9
9
|
(function(factory) {
|
10
10
|
if (typeof define === 'function' && define.amd) {
|
@@ -16,7 +16,7 @@
|
|
16
16
|
}
|
17
17
|
}(function(jQuery) {
|
18
18
|
|
19
|
-
/*! TableSorter (FORK) v2.30.
|
19
|
+
/*! TableSorter (FORK) v2.30.6 *//*
|
20
20
|
* Client-side table sorting with ease!
|
21
21
|
* @requires jQuery v1.2.6+
|
22
22
|
*
|
@@ -40,7 +40,7 @@
|
|
40
40
|
'use strict';
|
41
41
|
var ts = $.tablesorter = {
|
42
42
|
|
43
|
-
version : '2.30.
|
43
|
+
version : '2.30.6',
|
44
44
|
|
45
45
|
parsers : [],
|
46
46
|
widgets : [],
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! TableSorter (FORK) v2.30.
|
1
|
+
/*! TableSorter (FORK) v2.30.6 *//*
|
2
2
|
* Client-side table sorting with ease!
|
3
3
|
* @requires jQuery v1.2.6+
|
4
4
|
*
|
@@ -22,7 +22,7 @@
|
|
22
22
|
'use strict';
|
23
23
|
var ts = $.tablesorter = {
|
24
24
|
|
25
|
-
version : '2.30.
|
25
|
+
version : '2.30.6',
|
26
26
|
|
27
27
|
parsers : [],
|
28
28
|
widgets : [],
|
@@ -4,7 +4,7 @@
|
|
4
4
|
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
|
5
5
|
█████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
|
6
6
|
*/
|
7
|
-
/*! tablesorter (FORK) - updated 2018-
|
7
|
+
/*! tablesorter (FORK) - updated 2018-06-16 (v2.30.6)*/
|
8
8
|
/* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
|
9
9
|
(function(factory) {
|
10
10
|
if (typeof define === 'function' && define.amd) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Parser: input & select - updated 2018-
|
1
|
+
/*! Parser: input & select - updated 2018-06-16 (v2.30.6) *//*
|
2
2
|
* for jQuery 1.7+ & tablesorter 2.7.11+
|
3
3
|
* Demo: http://mottie.github.com/tablesorter/docs/example-widget-grouping.html
|
4
4
|
*/
|
@@ -145,7 +145,7 @@
|
|
145
145
|
}
|
146
146
|
},
|
147
147
|
updateCheckbox = function($el, state) {
|
148
|
-
if ($el[0].nodeName !== 'INPUT') {
|
148
|
+
if ($el.length && $el[0].nodeName !== 'INPUT') {
|
149
149
|
$el = $el.find( 'input[type="checkbox"]' );
|
150
150
|
}
|
151
151
|
if ($el.length) {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
/*! Widget: cssStickyHeaders - updated
|
1
|
+
/*! Widget: cssStickyHeaders - updated 6/16/2018 (v2.30.6) *//*
|
2
2
|
* Requires a modern browser, tablesorter v2.8+
|
3
3
|
*/
|
4
4
|
/*jshint jquery:true, unused:false */
|
@@ -7,149 +7,155 @@
|
|
7
7
|
|
8
8
|
var ts = $.tablesorter;
|
9
9
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
$
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
$caption.hide();
|
53
|
-
addCaptionHeight = $table.height() === tableH;
|
54
|
-
$caption.show();
|
55
|
-
|
56
|
-
// Firefox changes the offset().top when translating the table caption
|
57
|
-
offst = $table.offset().top;
|
58
|
-
setTransform( $caption, 20 );
|
59
|
-
adjustOffsetTop = $table.offset().top !== offst;
|
60
|
-
setTransform( $caption, 0 );
|
61
|
-
}
|
10
|
+
function cssStickyHeadersInit(c, wo) {
|
11
|
+
var offst, adjustY,
|
12
|
+
$table = c.$table,
|
13
|
+
$attach = $(wo.cssStickyHeaders_attachTo),
|
14
|
+
// target all versions of IE
|
15
|
+
isIE = 'ActiveXObject' in window || window.navigator.userAgent.indexOf('Edge') > -1,
|
16
|
+
namespace = c.namespace + 'cssstickyheader ',
|
17
|
+
$thead = $table.children('thead'),
|
18
|
+
$caption = $table.children('caption'),
|
19
|
+
$win = $attach.length ? $attach : $(window),
|
20
|
+
$parent = $table.parent().closest('table.' + ts.css.table),
|
21
|
+
$parentThead = $parent.length && ts.hasWidget($parent[0], 'cssStickyHeaders') ? $parent.children('thead') : [],
|
22
|
+
borderTopWidth = ( parseInt( $table.css('border-top-width'), 10 ) || 0 ),
|
23
|
+
// Fixes for Safari
|
24
|
+
tableH = $table.height(),
|
25
|
+
lastCaptionSetting = wo.cssStickyHeaders_addCaption,
|
26
|
+
// table offset top changes while scrolling in FF
|
27
|
+
adjustOffsetTop = false,
|
28
|
+
addCaptionHeight = false,
|
29
|
+
setTransform = function( $elms, y ) {
|
30
|
+
var translate = y === 0 ? '' : 'translate(0px,' + y + 'px)';
|
31
|
+
$elms.css({
|
32
|
+
'transform' : translate,
|
33
|
+
'-ms-transform' : translate,
|
34
|
+
'-webkit-transform' : translate
|
35
|
+
});
|
36
|
+
};
|
37
|
+
|
38
|
+
// Firefox fixes
|
39
|
+
if ($caption.length) {
|
40
|
+
// Firefox does not include the caption height when getting the table height
|
41
|
+
// see https://bugzilla.mozilla.org/show_bug.cgi?id=820891, so lets detect it instead of browser sniff
|
42
|
+
$caption.hide();
|
43
|
+
addCaptionHeight = $table.height() === tableH;
|
44
|
+
$caption.show();
|
45
|
+
|
46
|
+
// Firefox changes the offset().top when translating the table caption
|
47
|
+
offst = $table.offset().top;
|
48
|
+
setTransform( $caption, 20 );
|
49
|
+
adjustOffsetTop = $table.offset().top !== offst;
|
50
|
+
setTransform( $caption, 0 );
|
51
|
+
}
|
62
52
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
53
|
+
$win
|
54
|
+
.unbind( ('scroll resize '.split(' ').join(namespace)).replace(/\s+/g, ' ') )
|
55
|
+
.bind('scroll resize '.split(' ').join(namespace), function() {
|
56
|
+
// make sure "wo" is current otherwise changes to widgetOptions
|
57
|
+
// are not dynamic (like the add caption button in the demo)
|
58
|
+
wo = c.widgetOptions;
|
69
59
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
60
|
+
if ( adjustOffsetTop ) {
|
61
|
+
// remove transform from caption to get the correct offset().top value
|
62
|
+
setTransform( $caption, 0 );
|
63
|
+
adjustY = $table.offset().top;
|
64
|
+
}
|
75
65
|
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
66
|
+
// Fix for safari, when caption present, table
|
67
|
+
// height changes while scrolling
|
68
|
+
if ($win.scrollTop() < $caption.outerHeight(true)) {
|
69
|
+
tableH = $table.height();
|
70
|
+
}
|
81
71
|
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
72
|
+
var top = $attach.length ? $attach.offset().top : $win.scrollTop(),
|
73
|
+
// add caption height; include table padding top & border-spacing or text may be above the fold (jQuery UI themes)
|
74
|
+
// border-spacing needed in Firefox, but not webkit... not sure if I should account for that
|
75
|
+
captionHeight = ( $caption.outerHeight(true) || 0 ) +
|
76
|
+
( parseInt( $table.css('padding-top'), 10 ) || 0 ) +
|
77
|
+
( parseInt( $table.css('border-spacing'), 10 ) || 0 ),
|
88
78
|
|
89
|
-
|
90
|
-
|
91
|
-
|
79
|
+
bottom = tableH + ( addCaptionHeight && wo.cssStickyHeaders_addCaption ? captionHeight : 0 ) -
|
80
|
+
$thead.height() - ( $table.children('tfoot').height() || 0 ) -
|
81
|
+
( wo.cssStickyHeaders_addCaption ? captionHeight : ( addCaptionHeight ? 0 : captionHeight ) ),
|
92
82
|
|
93
|
-
|
83
|
+
parentTheadHeight = $parentThead.length ? $parentThead.height() : 0,
|
94
84
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
85
|
+
// get bottom of nested sticky headers
|
86
|
+
nestedStickyBottom = $parentThead.length ? (
|
87
|
+
isIE ? $parent.data('cssStickyHeaderBottom') + parentTheadHeight :
|
88
|
+
$parentThead.offset().top + parentTheadHeight - $win.scrollTop()
|
89
|
+
) : 0,
|
100
90
|
|
101
|
-
|
102
|
-
|
103
|
-
|
91
|
+
// in this case FF's offsetTop changes while scrolling, so we get a saved offsetTop before scrolling occurs
|
92
|
+
// but when the table is inside a wrapper ($attach) we need to continually update the offset top
|
93
|
+
tableOffsetTop = adjustOffsetTop ? adjustY : $table.offset().top,
|
104
94
|
|
105
|
-
|
95
|
+
offsetTop = addCaptionHeight ? tableOffsetTop - ( wo.cssStickyHeaders_addCaption ? captionHeight : 0 ) : tableOffsetTop,
|
106
96
|
|
107
|
-
|
108
|
-
|
109
|
-
|
97
|
+
// Detect nested tables - fixes #724
|
98
|
+
deltaY = top - offsetTop + nestedStickyBottom + borderTopWidth + ( wo.cssStickyHeaders_offset || 0 ) -
|
99
|
+
( wo.cssStickyHeaders_addCaption ? ( addCaptionHeight ? captionHeight : 0 ) : captionHeight ),
|
110
100
|
|
111
|
-
|
101
|
+
finalY = deltaY > 0 && deltaY <= bottom ? deltaY : 0,
|
112
102
|
|
113
|
-
|
114
|
-
|
103
|
+
// All IE (even IE11) can only transform header cells - fixes #447 thanks to @gakreol!
|
104
|
+
$cells = isIE ? $thead.children().children() : $thead;
|
115
105
|
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
106
|
+
// more crazy IE stuff...
|
107
|
+
if (isIE) {
|
108
|
+
// I didn't bother testing 3 nested tables deep in IE, because I hate it
|
109
|
+
c.$table.data( 'cssStickyHeaderBottom', ( $parentThead.length ? parentTheadHeight : 0 ) -
|
110
|
+
( wo.cssStickyHeaders_addCaption ? captionHeight : 0 ) );
|
111
|
+
}
|
122
112
|
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
}
|
113
|
+
if (wo.cssStickyHeaders_addCaption) {
|
114
|
+
$cells = $cells.add($caption);
|
115
|
+
}
|
116
|
+
if (lastCaptionSetting !== wo.cssStickyHeaders_addCaption) {
|
117
|
+
lastCaptionSetting = wo.cssStickyHeaders_addCaption;
|
118
|
+
// reset caption position if addCaption option is dynamically changed to false
|
119
|
+
if (!lastCaptionSetting) {
|
120
|
+
setTransform( $caption, 0 );
|
132
121
|
}
|
122
|
+
}
|
133
123
|
|
134
|
-
|
124
|
+
setTransform( $cells, finalY );
|
135
125
|
|
126
|
+
});
|
127
|
+
$table
|
128
|
+
.unbind( ('filterEnd updateComplete '.split(' ').join(namespace)).replace(/\s+/g, ' ') )
|
129
|
+
.bind('filterEnd' + namespace, function() {
|
130
|
+
if (wo.cssStickyHeaders_filteredToTop) {
|
131
|
+
// scroll top of table into view
|
132
|
+
window.scrollTo(0, $table.position().top);
|
133
|
+
}
|
134
|
+
})
|
135
|
+
.bind('updateComplete' + namespace, function() {
|
136
|
+
cssStickyHeadersInit(c, c.widgetOptions);
|
136
137
|
});
|
137
|
-
|
138
|
-
.unbind( ('filterEnd' + namespace).replace(/\s+/g, ' ') )
|
139
|
-
.bind('filterEnd' + namespace, function() {
|
140
|
-
if (wo.cssStickyHeaders_filteredToTop) {
|
141
|
-
// scroll top of table into view
|
142
|
-
window.scrollTo(0, $table.position().top);
|
143
|
-
}
|
144
|
-
});
|
138
|
+
}
|
145
139
|
|
140
|
+
ts.addWidget({
|
141
|
+
id: 'cssStickyHeaders',
|
142
|
+
priority: 10,
|
143
|
+
options: {
|
144
|
+
cssStickyHeaders_offset : 0,
|
145
|
+
cssStickyHeaders_addCaption : false,
|
146
|
+
// jQuery selector or object to attach sticky header to
|
147
|
+
cssStickyHeaders_attachTo : null,
|
148
|
+
cssStickyHeaders_filteredToTop : true
|
149
|
+
},
|
150
|
+
init : function(table, thisWidget, c, wo) {
|
151
|
+
cssStickyHeadersInit(c, wo);
|
146
152
|
},
|
147
153
|
remove: function(table, c, wo, refreshing) {
|
148
154
|
if (refreshing) { return; }
|
149
155
|
var namespace = c.namespace + 'cssstickyheader ';
|
150
156
|
$(window).unbind( ('scroll resize '.split(' ').join(namespace)).replace(/\s+/g, ' ') );
|
151
157
|
c.$table
|
152
|
-
.unbind( ('filterEnd scroll resize '.split(' ').join(namespace)).replace(/\s+/g, ' ') )
|
158
|
+
.unbind( ('filterEnd scroll resize updateComplete '.split(' ').join(namespace)).replace(/\s+/g, ' ') )
|
153
159
|
.add( c.$table.children('thead').children().children() )
|
154
160
|
.children('thead, caption').css({
|
155
161
|
'transform' : '',
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery-tablesorter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.25.
|
4
|
+
version: 1.25.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jun Lin
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-06-
|
12
|
+
date: 2018-06-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|