jquery-tablesorter 1.20.6 → 1.20.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 972d76c84db1934d3ec5f7e4adf5f242fd202e25
4
- data.tar.gz: 7e27c43cfd5da2d4724f8d615a46c3584416cc45
3
+ metadata.gz: 3a883912c968abaf85e1a15919affcea7fc240df
4
+ data.tar.gz: 4765dad9e983aeac3cf73be3264aea477c5a530b
5
5
  SHA512:
6
- metadata.gz: 218c62203b87c7352e58d94685e850b9c18c8a92e1a9ab136f72e0f3ef45b882eb30947ced67583798c5aae03516a9d09264166e8371b768e0fd041b847ee8d1
7
- data.tar.gz: 822f868e5bcac7b2e5f9513091872978333a286464b2b7c08d414116613ee587808e26cafcd77b1de4b848c0fd77a38d30cd51019c196072161e866d752db876
6
+ metadata.gz: d9143b451638747d37d6404022d048953b1cad765d74724084f66520a619da206e9128a3abdfced43e040b3cded179fa7933c529adcf798885ddde2417e5140b
7
+ data.tar.gz: 17729d112689e6c8e70606c667e6bf7ef13c8fd4180d6a53323c778350bdda30a93e946a15d61e4995c69439b4fe41efcafe05842a49c82caead5990399739f2
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Simple integration of jquery-tablesorter into the asset pipeline.
6
6
 
7
- Current tablesorter version: 2.25.6 (3/18/2016), [documentation]
7
+ Current tablesorter version: 2.25.7 (4/1/2016), [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 = 20
4
- TINY = 6
4
+ TINY = 7
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 03-18-2016 (v2.25.6)*/
7
+ /*! tablesorter (FORK) - updated 04-01-2016 (v2.25.7)*/
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($) {
18
18
 
19
- /*! TableSorter (FORK) v2.25.6 *//*
19
+ /*! TableSorter (FORK) v2.25.7 *//*
20
20
  * Client-side table sorting with ease!
21
21
  * @requires jQuery v1.2.6+
22
22
  *
@@ -39,7 +39,7 @@
39
39
  'use strict';
40
40
  var ts = $.tablesorter = {
41
41
 
42
- version : '2.25.6',
42
+ version : '2.25.7',
43
43
 
44
44
  parsers : [],
45
45
  widgets : [],
@@ -3097,7 +3097,7 @@
3097
3097
 
3098
3098
  })(jQuery);
3099
3099
 
3100
- /*! Widget: filter - updated 3/18/2016 (v2.25.6) *//*
3100
+ /*! Widget: filter - updated 4/1/2016 (v2.25.7) *//*
3101
3101
  * Requires tablesorter v2.8+ and jQuery 1.7+
3102
3102
  * by Rob Garrison
3103
3103
  */
@@ -4133,6 +4133,7 @@
4133
4133
  },
4134
4134
  matchType: function( c, columnIndex ) {
4135
4135
  var isMatch,
4136
+ wo = c.widgetOptions,
4136
4137
  $el = c.$headerIndexed[ columnIndex ];
4137
4138
  // filter-exact > filter-match > filter_matchType for type
4138
4139
  if ( $el.hasClass( 'filter-exact' ) ) {
@@ -4141,7 +4142,14 @@
4141
4142
  isMatch = true;
4142
4143
  } else {
4143
4144
  // filter-select is not applied when filter_functions are used, so look for a select
4144
- $el = c.$filters.eq( columnIndex ).find( '.' + tscss.filter );
4145
+ if ( wo.filter_columnFilters ) {
4146
+ $el = c.$filters
4147
+ .find( '.' + tscss.filter )
4148
+ .add( wo.filter_$externalFilters )
4149
+ .filter( '[data-column="' + columnIndex + '"]' );
4150
+ } else if ( wo.filter_$externalFilters ) {
4151
+ $el = wo.filter_$externalFilters.filter( '[data-column="' + columnIndex + '"]' );
4152
+ }
4145
4153
  isMatch = $el.length ?
4146
4154
  c.widgetOptions.filter_matchType[ ( $el[ 0 ].nodeName || '' ).toLowerCase() ] === 'match' :
4147
4155
  // default to exact, if no inputs found
@@ -4232,7 +4240,7 @@
4232
4240
 
4233
4241
  // in case select filter option has a different value vs text 'a - z|A through Z'
4234
4242
  ffxn = wo.filter_columnFilters ?
4235
- c.$filters.add( c.$externalFilters )
4243
+ c.$filters.add( wo.filter_$externalFilters )
4236
4244
  .filter( '[data-column="' + columnIndex + '"]' )
4237
4245
  .find( 'select option:selected' )
4238
4246
  .attr( 'data-function-name' ) || '' : '';
@@ -4906,7 +4914,7 @@
4906
4914
 
4907
4915
  })( jQuery );
4908
4916
 
4909
- /*! Widget: stickyHeaders - updated 3/1/2016 (v2.25.5) *//*
4917
+ /*! Widget: stickyHeaders - updated 4/1/2016 (v2.25.7) *//*
4910
4918
  * Requires tablesorter v2.8+ and jQuery 1.4.3+
4911
4919
  * by Rob Garrison
4912
4920
  */
@@ -5174,6 +5182,13 @@
5174
5182
  }
5175
5183
  }
5176
5184
 
5185
+ // resize table (Firefox)
5186
+ if (wo.stickyHeaders_addResizeEvent) {
5187
+ $table.bind('resize' + c.namespace + 'stickyheaders', function() {
5188
+ resizeHeader();
5189
+ });
5190
+ }
5191
+
5177
5192
  $table.triggerHandler('stickyHeadersInit');
5178
5193
 
5179
5194
  },
@@ -5181,7 +5196,7 @@
5181
5196
  var namespace = c.namespace + 'stickyheaders ';
5182
5197
  c.$table
5183
5198
  .removeClass('hasStickyHeaders')
5184
- .unbind( ('pagerComplete filterEnd stickyHeadersUpdate '.split(' ').join(namespace)).replace(/\s+/g, ' ') )
5199
+ .unbind( ('pagerComplete resize filterEnd stickyHeadersUpdate '.split(' ').join(namespace)).replace(/\s+/g, ' ') )
5185
5200
  .next('.' + ts.css.stickyWrap).remove();
5186
5201
  if (wo.$sticky && wo.$sticky.length) { wo.$sticky.remove(); } // remove cloned table
5187
5202
  $(window)
@@ -1,4 +1,4 @@
1
- /*! TableSorter (FORK) v2.25.6 *//*
1
+ /*! TableSorter (FORK) v2.25.7 *//*
2
2
  * Client-side table sorting with ease!
3
3
  * @requires jQuery v1.2.6+
4
4
  *
@@ -21,7 +21,7 @@
21
21
  'use strict';
22
22
  var ts = $.tablesorter = {
23
23
 
24
- version : '2.25.6',
24
+ version : '2.25.7',
25
25
 
26
26
  parsers : [],
27
27
  widgets : [],
@@ -4,7 +4,7 @@
4
4
  ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
5
5
  █████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
6
6
  */
7
- /*! tablesorter (FORK) - updated 03-18-2016 (v2.25.6)*/
7
+ /*! tablesorter (FORK) - updated 04-01-2016 (v2.25.7)*/
8
8
  /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
9
9
  (function(factory) {
10
10
  if (typeof define === 'function' && define.amd) {
@@ -372,7 +372,7 @@
372
372
 
373
373
  })(jQuery);
374
374
 
375
- /*! Widget: filter - updated 3/18/2016 (v2.25.6) *//*
375
+ /*! Widget: filter - updated 4/1/2016 (v2.25.7) *//*
376
376
  * Requires tablesorter v2.8+ and jQuery 1.7+
377
377
  * by Rob Garrison
378
378
  */
@@ -1408,6 +1408,7 @@
1408
1408
  },
1409
1409
  matchType: function( c, columnIndex ) {
1410
1410
  var isMatch,
1411
+ wo = c.widgetOptions,
1411
1412
  $el = c.$headerIndexed[ columnIndex ];
1412
1413
  // filter-exact > filter-match > filter_matchType for type
1413
1414
  if ( $el.hasClass( 'filter-exact' ) ) {
@@ -1416,7 +1417,14 @@
1416
1417
  isMatch = true;
1417
1418
  } else {
1418
1419
  // filter-select is not applied when filter_functions are used, so look for a select
1419
- $el = c.$filters.eq( columnIndex ).find( '.' + tscss.filter );
1420
+ if ( wo.filter_columnFilters ) {
1421
+ $el = c.$filters
1422
+ .find( '.' + tscss.filter )
1423
+ .add( wo.filter_$externalFilters )
1424
+ .filter( '[data-column="' + columnIndex + '"]' );
1425
+ } else if ( wo.filter_$externalFilters ) {
1426
+ $el = wo.filter_$externalFilters.filter( '[data-column="' + columnIndex + '"]' );
1427
+ }
1420
1428
  isMatch = $el.length ?
1421
1429
  c.widgetOptions.filter_matchType[ ( $el[ 0 ].nodeName || '' ).toLowerCase() ] === 'match' :
1422
1430
  // default to exact, if no inputs found
@@ -1507,7 +1515,7 @@
1507
1515
 
1508
1516
  // in case select filter option has a different value vs text 'a - z|A through Z'
1509
1517
  ffxn = wo.filter_columnFilters ?
1510
- c.$filters.add( c.$externalFilters )
1518
+ c.$filters.add( wo.filter_$externalFilters )
1511
1519
  .filter( '[data-column="' + columnIndex + '"]' )
1512
1520
  .find( 'select option:selected' )
1513
1521
  .attr( 'data-function-name' ) || '' : '';
@@ -2181,7 +2189,7 @@
2181
2189
 
2182
2190
  })( jQuery );
2183
2191
 
2184
- /*! Widget: stickyHeaders - updated 3/1/2016 (v2.25.5) *//*
2192
+ /*! Widget: stickyHeaders - updated 4/1/2016 (v2.25.7) *//*
2185
2193
  * Requires tablesorter v2.8+ and jQuery 1.4.3+
2186
2194
  * by Rob Garrison
2187
2195
  */
@@ -2449,6 +2457,13 @@
2449
2457
  }
2450
2458
  }
2451
2459
 
2460
+ // resize table (Firefox)
2461
+ if (wo.stickyHeaders_addResizeEvent) {
2462
+ $table.bind('resize' + c.namespace + 'stickyheaders', function() {
2463
+ resizeHeader();
2464
+ });
2465
+ }
2466
+
2452
2467
  $table.triggerHandler('stickyHeadersInit');
2453
2468
 
2454
2469
  },
@@ -2456,7 +2471,7 @@
2456
2471
  var namespace = c.namespace + 'stickyheaders ';
2457
2472
  c.$table
2458
2473
  .removeClass('hasStickyHeaders')
2459
- .unbind( ('pagerComplete filterEnd stickyHeadersUpdate '.split(' ').join(namespace)).replace(/\s+/g, ' ') )
2474
+ .unbind( ('pagerComplete resize filterEnd stickyHeadersUpdate '.split(' ').join(namespace)).replace(/\s+/g, ' ') )
2460
2475
  .next('.' + ts.css.stickyWrap).remove();
2461
2476
  if (wo.$sticky && wo.$sticky.length) { wo.$sticky.remove(); } // remove cloned table
2462
2477
  $(window)
@@ -1,4 +1,4 @@
1
- /*! Widget: filter - updated 3/18/2016 (v2.25.6) *//*
1
+ /*! Widget: filter - updated 4/1/2016 (v2.25.7) *//*
2
2
  * Requires tablesorter v2.8+ and jQuery 1.7+
3
3
  * by Rob Garrison
4
4
  */
@@ -1034,6 +1034,7 @@
1034
1034
  },
1035
1035
  matchType: function( c, columnIndex ) {
1036
1036
  var isMatch,
1037
+ wo = c.widgetOptions,
1037
1038
  $el = c.$headerIndexed[ columnIndex ];
1038
1039
  // filter-exact > filter-match > filter_matchType for type
1039
1040
  if ( $el.hasClass( 'filter-exact' ) ) {
@@ -1042,7 +1043,14 @@
1042
1043
  isMatch = true;
1043
1044
  } else {
1044
1045
  // filter-select is not applied when filter_functions are used, so look for a select
1045
- $el = c.$filters.eq( columnIndex ).find( '.' + tscss.filter );
1046
+ if ( wo.filter_columnFilters ) {
1047
+ $el = c.$filters
1048
+ .find( '.' + tscss.filter )
1049
+ .add( wo.filter_$externalFilters )
1050
+ .filter( '[data-column="' + columnIndex + '"]' );
1051
+ } else if ( wo.filter_$externalFilters ) {
1052
+ $el = wo.filter_$externalFilters.filter( '[data-column="' + columnIndex + '"]' );
1053
+ }
1046
1054
  isMatch = $el.length ?
1047
1055
  c.widgetOptions.filter_matchType[ ( $el[ 0 ].nodeName || '' ).toLowerCase() ] === 'match' :
1048
1056
  // default to exact, if no inputs found
@@ -1133,7 +1141,7 @@
1133
1141
 
1134
1142
  // in case select filter option has a different value vs text 'a - z|A through Z'
1135
1143
  ffxn = wo.filter_columnFilters ?
1136
- c.$filters.add( c.$externalFilters )
1144
+ c.$filters.add( wo.filter_$externalFilters )
1137
1145
  .filter( '[data-column="' + columnIndex + '"]' )
1138
1146
  .find( 'select option:selected' )
1139
1147
  .attr( 'data-function-name' ) || '' : '';
@@ -1,4 +1,4 @@
1
- /*! Widget: lazyload (BETA) - 3/18/2016 (v2.25.6) *//*
1
+ /*! Widget: lazyload (BETA) - 4/1/2016 (v2.25.7) *//*
2
2
  * Requires tablesorter v2.8+ and jQuery 1.7+
3
3
  * by Rob Garrison
4
4
  */
@@ -16,8 +16,12 @@
16
16
  }
17
17
  ts.lazyload.update( c, wo );
18
18
  var namespace = c.namespace + 'lazyload ',
19
- events = [ wo.lazyload_update, 'pagerUpdate', wo.columnSelector_updated || 'columnUpdate', '' ]
20
- .join( namespace );
19
+ events = [
20
+ wo.lazyload_update,
21
+ 'pagerUpdate',
22
+ wo.columnSelector_updated || 'columnUpdate',
23
+ ''
24
+ ].join( namespace );
21
25
  c.$table
22
26
  .on( events, function() {
23
27
  ts.lazyload.update( c, c.widgetOptions );
@@ -42,6 +46,10 @@
42
46
  load : wo.lazyload_load,
43
47
  placeholder : wo.lazyload_placeholder
44
48
  });
49
+ // give lazyload a nudge after updating the table. Fixes #1169
50
+ setTimeout(function() {
51
+ $(window).scroll();
52
+ }, 1);
45
53
  },
46
54
  remove : function( c, wo ) {
47
55
  c.$table.off( c.namespace + 'lazyload' );
@@ -1,4 +1,4 @@
1
- /*! Widget: scroller - updated 3/1/2016 (v2.25.5) *//*
1
+ /*! Widget: scroller - updated 4/1/2016 (v2.25.7) *//*
2
2
  Copyright (C) 2011 T. Connell & Associates, Inc.
3
3
 
4
4
  Dual-licensed under the MIT and GPL licenses
@@ -363,7 +363,7 @@
363
363
 
364
364
  resize : function( c, wo ) {
365
365
  if ( wo.scroller_isBusy ) { return; }
366
- var index, borderWidth, setWidth, $hCells, $bCells, $fCells, $headers, $this, temp,
366
+ var index, borderWidth, setWidth, $headers, $this, temp,
367
367
  tsScroller = ts.scroller,
368
368
  $container = wo.scroller_$container,
369
369
  $table = c.$table,
@@ -563,6 +563,28 @@
563
563
 
564
564
  },
565
565
 
566
+ // https://remysharp.com/2010/07/21/throttling-function-calls
567
+ throttle : function(fn, threshhold, scope) {
568
+ threshhold = threshhold || 50;
569
+ var last, deferTimer;
570
+ return function() {
571
+ var context = scope || this,
572
+ now = +(new Date()),
573
+ args = arguments;
574
+ if (last && now < last + threshhold) {
575
+ // hold on to it
576
+ clearTimeout(deferTimer);
577
+ deferTimer = setTimeout(function() {
578
+ last = now;
579
+ fn.apply(context, args);
580
+ }, threshhold);
581
+ } else {
582
+ last = now;
583
+ fn.apply(context, args);
584
+ }
585
+ };
586
+ },
587
+
566
588
  bindFixedColumnEvents : function( c, wo ) {
567
589
  // update thead & tbody in fixed column
568
590
  var tsScroller = ts.scroller,
@@ -576,10 +598,9 @@
576
598
  .parent()
577
599
  // *** SCROLL *** scroll fixed column along with main
578
600
  .off( events )
579
- .on( events, function() {
580
- if ( wo.scroller_isBusy ) { return; }
601
+ .on( events, tsScroller.throttle(function() {
581
602
  // using flags to prevent firing the scroll event excessively leading to slow scrolling in Firefox
582
- if ( !wo.scroller_isBusy && ( fixedScroll || !( tsScroller.isFirefox || tsScroller.isIE ) ) ) {
603
+ if ( !wo.scroller_isBusy && fixedScroll ) {
583
604
  tableScroll = false;
584
605
  var $this = $( this );
585
606
  $fixedTbody[0].scrollTop = wo.scroller_saved[1] = $this.scrollTop();
@@ -588,21 +609,20 @@
588
609
  tableScroll = true;
589
610
  }, 20 );
590
611
  }
591
- });
612
+ }));
592
613
  // scroll main along with fixed column
593
614
  $fixedTbody
594
615
  .off( events )
595
- .on( events, function() {
616
+ .on( events, tsScroller.throttle(function() {
596
617
  // using flags to prevent firing the scroll event excessively leading to slow scrolling in Firefox
597
- if ( !wo.scroller_isBusy && ( tableScroll || !( tsScroller.isFirefox || tsScroller.isIE ) ) ) {
618
+ if ( !wo.scroller_isBusy && tableScroll ) {
598
619
  fixedScroll = false;
599
- var $this = $( this );
600
- c.$table.parent()[0].scrollTop = wo.scroller_saved[1] = $this.scrollTop();
620
+ c.$table.parent()[0].scrollTop = wo.scroller_saved[1] = $( this ).scrollTop();
601
621
  setTimeout( function() {
602
622
  fixedScroll = true;
603
623
  }, 20 );
604
624
  }
605
- })
625
+ }))
606
626
  .scroll();
607
627
 
608
628
  // *** ROW HIGHLIGHT ***
@@ -685,8 +705,7 @@
685
705
  }
686
706
 
687
707
  // scroller_fixedColumns
688
- var index, tbodyIndex, rowIndex, $tbody, $adjCol, $fb, $fixHead, $fixBody, $fixFoot,
689
- totalRows, row,
708
+ var index, tbodyIndex, rowIndex, $tbody, $adjCol, $fb, totalRows,
690
709
 
691
710
  // source cells for measurement
692
711
  $mainTbodies = wo.scroller_$container
@@ -1,4 +1,4 @@
1
- /*! Widget: stickyHeaders - updated 3/1/2016 (v2.25.5) *//*
1
+ /*! Widget: stickyHeaders - updated 4/1/2016 (v2.25.7) *//*
2
2
  * Requires tablesorter v2.8+ and jQuery 1.4.3+
3
3
  * by Rob Garrison
4
4
  */
@@ -266,6 +266,13 @@
266
266
  }
267
267
  }
268
268
 
269
+ // resize table (Firefox)
270
+ if (wo.stickyHeaders_addResizeEvent) {
271
+ $table.bind('resize' + c.namespace + 'stickyheaders', function() {
272
+ resizeHeader();
273
+ });
274
+ }
275
+
269
276
  $table.triggerHandler('stickyHeadersInit');
270
277
 
271
278
  },
@@ -273,7 +280,7 @@
273
280
  var namespace = c.namespace + 'stickyheaders ';
274
281
  c.$table
275
282
  .removeClass('hasStickyHeaders')
276
- .unbind( ('pagerComplete filterEnd stickyHeadersUpdate '.split(' ').join(namespace)).replace(/\s+/g, ' ') )
283
+ .unbind( ('pagerComplete resize filterEnd stickyHeadersUpdate '.split(' ').join(namespace)).replace(/\s+/g, ' ') )
277
284
  .next('.' + ts.css.stickyWrap).remove();
278
285
  if (wo.$sticky && wo.$sticky.length) { wo.$sticky.remove(); } // remove cloned table
279
286
  $(window)
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.20.6
4
+ version: 1.20.7
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: 2016-03-21 00:00:00.000000000 Z
12
+ date: 2016-04-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties