jquery-tablesorter 1.25.3 → 1.25.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 399ce1eb8dfcc00ed8a3e379abb73b09a06d1522fd5733979fb6035b3ab6020d
4
- data.tar.gz: 8abb6a4ae65d197c0d8a6c2d60f14993d5832fff1fa12c9187061c900353ce75
3
+ metadata.gz: 81c1255db7be5f56f3aa65b8080d8a258c22ca1c7b2ea3c046aa71ad320b4544
4
+ data.tar.gz: 555b348e35c4921588c2138c54f99f8f9159b055a2a440bebf2f90235ad8e013
5
5
  SHA512:
6
- metadata.gz: ea64ee05e5a9405e6d0790b0240eac7d29d3425b29ebab8f17271f8ddeb0feed417219b21418c9424c4856bef7cce30fb6fb0624b53f501ae91126c7083ea38f
7
- data.tar.gz: 845d8c0a53b82ad2a945b26658838c53a739ac825b6b906fa3cb8ba096fe8c2f9601a9b1cc9ab81168fbb7e417027a979faa8b275c1bc7ec94f8379afdc0671f
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.5 (2018-05-28) [documentation]
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
 
@@ -1,7 +1,7 @@
1
1
  module JqueryTablesorter
2
2
  MAJOR = 1
3
3
  MINOR = 25
4
- TINY = 3
4
+ TINY = 4
5
5
 
6
6
  VERSION = [MAJOR, MINOR, TINY].compact.join('.')
7
7
  end
@@ -4,7 +4,7 @@
4
4
  ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
5
5
  █████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
6
6
  */
7
- /*! tablesorter (FORK) - updated 2018-05-28 (v2.30.5)*/
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.5 *//*
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.5',
43
+ version : '2.30.6',
44
44
 
45
45
  parsers : [],
46
46
  widgets : [],
@@ -1,4 +1,4 @@
1
- /*! TableSorter (FORK) v2.30.5 *//*
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.5',
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-05-28 (v2.30.5)*/
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-03-03 (v2.30.2) *//*
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 5/24/2017 (v2.28.11) *//*
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
- ts.addWidget({
11
- id: 'cssStickyHeaders',
12
- priority: 10,
13
- options: {
14
- cssStickyHeaders_offset : 0,
15
- cssStickyHeaders_addCaption : false,
16
- // jQuery selector or object to attach sticky header to
17
- cssStickyHeaders_attachTo : null,
18
- cssStickyHeaders_filteredToTop : true
19
- },
20
- init : function(table, thisWidget, c, wo) {
21
- var offst, adjustY,
22
- $table = c.$table,
23
- $attach = $(wo.cssStickyHeaders_attachTo),
24
- // target all versions of IE
25
- isIE = 'ActiveXObject' in window || window.navigator.userAgent.indexOf('Edge') > -1,
26
- namespace = c.namespace + 'cssstickyheader ',
27
- $thead = $table.children('thead'),
28
- $caption = $table.children('caption'),
29
- $win = $attach.length ? $attach : $(window),
30
- $parent = $table.parent().closest('table.' + ts.css.table),
31
- $parentThead = $parent.length && ts.hasWidget($parent[0], 'cssStickyHeaders') ? $parent.children('thead') : [],
32
- borderTopWidth = ( parseInt( $table.css('border-top-width'), 10 ) || 0 ),
33
- // Fixes for Safari
34
- tableH = $table.height(),
35
- lastCaptionSetting = wo.cssStickyHeaders_addCaption,
36
- // table offset top changes while scrolling in FF
37
- adjustOffsetTop = false,
38
- addCaptionHeight = false,
39
- setTransform = function( $elms, y ) {
40
- var translate = y === 0 ? '' : 'translate(0px,' + y + 'px)';
41
- $elms.css({
42
- 'transform' : translate,
43
- '-ms-transform' : translate,
44
- '-webkit-transform' : translate
45
- });
46
- };
47
-
48
- // Firefox fixes
49
- if ($caption.length) {
50
- // Firefox does not include the caption height when getting the table height
51
- // see https://bugzilla.mozilla.org/show_bug.cgi?id=820891, so lets detect it instead of browser sniff
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
- $win
64
- .unbind( ('scroll resize '.split(' ').join(namespace)).replace(/\s+/g, ' ') )
65
- .bind('scroll resize '.split(' ').join(namespace), function() {
66
- // make sure "wo" is current otherwise changes to widgetOptions
67
- // are not dynamic (like the add caption button in the demo)
68
- wo = c.widgetOptions;
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
- if ( adjustOffsetTop ) {
71
- // remove transform from caption to get the correct offset().top value
72
- setTransform( $caption, 0 );
73
- adjustY = $table.offset().top;
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
- // Fix for safari, when caption present, table
77
- // height changes while scrolling
78
- if ($win.scrollTop() < $caption.outerHeight(true)) {
79
- tableH = $table.height();
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
- var top = $attach.length ? $attach.offset().top : $win.scrollTop(),
83
- // add caption height; include table padding top & border-spacing or text may be above the fold (jQuery UI themes)
84
- // border-spacing needed in Firefox, but not webkit... not sure if I should account for that
85
- captionHeight = ( $caption.outerHeight(true) || 0 ) +
86
- ( parseInt( $table.css('padding-top'), 10 ) || 0 ) +
87
- ( parseInt( $table.css('border-spacing'), 10 ) || 0 ),
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
- bottom = tableH + ( addCaptionHeight && wo.cssStickyHeaders_addCaption ? captionHeight : 0 ) -
90
- $thead.height() - ( $table.children('tfoot').height() || 0 ) -
91
- ( wo.cssStickyHeaders_addCaption ? captionHeight : ( addCaptionHeight ? 0 : captionHeight ) ),
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
- parentTheadHeight = $parentThead.length ? $parentThead.height() : 0,
83
+ parentTheadHeight = $parentThead.length ? $parentThead.height() : 0,
94
84
 
95
- // get bottom of nested sticky headers
96
- nestedStickyBottom = $parentThead.length ? (
97
- isIE ? $parent.data('cssStickyHeaderBottom') + parentTheadHeight :
98
- $parentThead.offset().top + parentTheadHeight - $win.scrollTop()
99
- ) : 0,
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
- // in this case FF's offsetTop changes while scrolling, so we get a saved offsetTop before scrolling occurs
102
- // but when the table is inside a wrapper ($attach) we need to continually update the offset top
103
- tableOffsetTop = adjustOffsetTop ? adjustY : $table.offset().top,
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
- offsetTop = addCaptionHeight ? tableOffsetTop - ( wo.cssStickyHeaders_addCaption ? captionHeight : 0 ) : tableOffsetTop,
95
+ offsetTop = addCaptionHeight ? tableOffsetTop - ( wo.cssStickyHeaders_addCaption ? captionHeight : 0 ) : tableOffsetTop,
106
96
 
107
- // Detect nested tables - fixes #724
108
- deltaY = top - offsetTop + nestedStickyBottom + borderTopWidth + ( wo.cssStickyHeaders_offset || 0 ) -
109
- ( wo.cssStickyHeaders_addCaption ? ( addCaptionHeight ? captionHeight : 0 ) : captionHeight ),
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
- finalY = deltaY > 0 && deltaY <= bottom ? deltaY : 0,
101
+ finalY = deltaY > 0 && deltaY <= bottom ? deltaY : 0,
112
102
 
113
- // All IE (even IE11) can only transform header cells - fixes #447 thanks to @gakreol!
114
- $cells = isIE ? $thead.children().children() : $thead;
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
- // more crazy IE stuff...
117
- if (isIE) {
118
- // I didn't bother testing 3 nested tables deep in IE, because I hate it
119
- c.$table.data( 'cssStickyHeaderBottom', ( $parentThead.length ? parentTheadHeight : 0 ) -
120
- ( wo.cssStickyHeaders_addCaption ? captionHeight : 0 ) );
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
- if (wo.cssStickyHeaders_addCaption) {
124
- $cells = $cells.add($caption);
125
- }
126
- if (lastCaptionSetting !== wo.cssStickyHeaders_addCaption) {
127
- lastCaptionSetting = wo.cssStickyHeaders_addCaption;
128
- // reset caption position if addCaption option is dynamically changed to false
129
- if (!lastCaptionSetting) {
130
- setTransform( $caption, 0 );
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
- setTransform( $cells, finalY );
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
- $table
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.3
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-03 00:00:00.000000000 Z
12
+ date: 2018-06-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties