jquery-tablesorter 1.22.1 → 1.22.2

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
  SHA1:
3
- metadata.gz: a5bf001ed70299eae9f6ffd84a1878ee97720de1
4
- data.tar.gz: 7e41fa76354dacaa78786aad45c2d11e4a5cd7a3
3
+ metadata.gz: 35dc90e1f792d4a46f45d7a88b76958bddc061a1
4
+ data.tar.gz: cb29ed17770ac1af85805cb0efd7266cc5ebfaad
5
5
  SHA512:
6
- metadata.gz: ff3f5c1f4e9ac6fe2fbf3839dd377fa2d10430c901a45925fadcc54394629b0ebf006c7032be0e54a325bb9f62e9aca8d9bb2239f510f3d2541cbe2298a8a596
7
- data.tar.gz: 4fcc3afc79a9ea41f9d43b680a8f674fb4541107afd52d75787e252ef5b9e408bc665f8e5edf7449847af96fc79ea7c84f27f6d09ecf7efe38a0ddc20a3986c7
6
+ metadata.gz: 9930a25b62b622e444700fc3781e0b9fca08901cf97fc571ba70235cddc3b95608cf569340cdfa61aeb48cdd18b5fb79eebf3b4dc9b5e037b390d84e77c81c1b
7
+ data.tar.gz: 39fca626e49d9ffad96cd5e2ed9739fea3a90c8520a760e81389d301de741a9a52a0502a4d8a274eb7bc74a43f4185a0f0b9f70a81f505b7e15d56781c24fb01
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.27.2 (8/2/2016), [documentation]
7
+ Current tablesorter version: 2.27.3 (8/17/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 = 22
4
- TINY = 1
4
+ TINY = 2
5
5
 
6
6
  VERSION = [MAJOR, MINOR, TINY].compact.join('.')
7
7
  end
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * tablesorter (FORK) pager plugin
3
- * updated 7/11/2016 (v2.26.6)
3
+ * updated 8/17/2016 (v2.27.3)
4
4
  */
5
5
  /*jshint browser:true, jquery:true, unused:false */
6
6
  ;(function($) {
@@ -145,7 +145,7 @@
145
145
  var normalized, indx, len,
146
146
  c = table.config,
147
147
  hasFilters = c.$table.hasClass('hasFilters');
148
- if (hasFilters && !p.ajaxUrl) {
148
+ if (hasFilters && !p.ajax) {
149
149
  if (ts.isEmptyObject(c.cache)) {
150
150
  // delayInit: true so nothing is in the cache
151
151
  p.filteredRows = p.totalRows = c.$tbodies.eq(0).children('tr').not( p.countChildRows ? '' : '.' + c.cssChildRow ).length;
@@ -4,7 +4,7 @@
4
4
  ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
5
5
  █████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
6
6
  */
7
- /*! tablesorter (FORK) - updated 08-02-2016 (v2.27.2)*/
7
+ /*! tablesorter (FORK) - updated 08-17-2016 (v2.27.3)*/
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.27.2 *//*
19
+ /*! TableSorter (FORK) v2.27.3 *//*
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.27.2',
43
+ version : '2.27.3',
44
44
 
45
45
  parsers : [],
46
46
  widgets : [],
@@ -2297,7 +2297,7 @@
2297
2297
  // c.$headerIndexed is not defined initially
2298
2298
  $cell = c.$headerIndexed && c.$headerIndexed[ indx ] ||
2299
2299
  $cells.filter( '[data-column="' + indx + '"]:last' );
2300
- if ( obj[ indx ] ) {
2300
+ if ( typeof obj[ indx ] !== 'undefined' ) {
2301
2301
  return getCell ? obj[ indx ] : obj[ $cells.index( $cell ) ];
2302
2302
  }
2303
2303
  for ( key in obj ) {
@@ -3126,7 +3126,7 @@
3126
3126
 
3127
3127
  })(jQuery);
3128
3128
 
3129
- /*! Widget: filter - updated 7/31/2016 (v2.27.0) *//*
3129
+ /*! Widget: filter - updated 8/17/2016 (v2.27.3) *//*
3130
3130
  * Requires tablesorter v2.8+ and jQuery 1.7+
3131
3131
  * by Rob Garrison
3132
3132
  */
@@ -3565,8 +3565,10 @@
3565
3565
  // force a new search since content has changed
3566
3566
  c.lastCombinedFilter = null;
3567
3567
  c.lastSearch = [];
3568
- // update filterFormatters after update - Fixes #1237
3569
- c.$table.triggerHandler( 'filterFomatterUpdate' );
3568
+ // update filterFormatters after update (& small delay) - Fixes #1237
3569
+ setTimeout(function(){
3570
+ c.$table.triggerHandler( 'filterFomatterUpdate' );
3571
+ }, 100);
3570
3572
  }
3571
3573
  // pass true ( skipFirst ) to prevent the tablesorter.setFilters function from skipping the first
3572
3574
  // input ensures all inputs are updated when a search is triggered on the table
@@ -3924,19 +3926,24 @@
3924
3926
  })
3925
3927
  .bind( 'keyup' + namespace, function( event ) {
3926
3928
  wo = table.config.widgetOptions; // make sure "wo" isn't cached
3927
- var column = parseInt( $( this ).attr( 'data-column' ), 10 );
3929
+ var column = parseInt( $( this ).attr( 'data-column' ), 10 ),
3930
+ liveSearch = typeof wo.filter_liveSearch === 'boolean' ? wo.filter_liveSearch :
3931
+ ts.getColumnData( table, wo.filter_liveSearch, column );
3932
+ if ( typeof liveSearch === 'undefined' ) {
3933
+ liveSearch = wo.filter_liveSearch.fallback || false;
3934
+ }
3928
3935
  $( this ).attr( 'data-lastSearchTime', new Date().getTime() );
3929
3936
  // emulate what webkit does.... escape clears the filter
3930
3937
  if ( event.which === tskeyCodes.escape ) {
3931
3938
  // make sure to restore the last value on escape
3932
3939
  this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column];
3933
3940
  // live search
3934
- } else if ( wo.filter_liveSearch === false ) {
3941
+ } else if ( liveSearch === false ) {
3935
3942
  return;
3936
3943
  // don't return if the search value is empty ( all rows need to be revealed )
3937
3944
  } else if ( this.value !== '' && (
3938
3945
  // liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
3939
- ( typeof wo.filter_liveSearch === 'number' && this.value.length < wo.filter_liveSearch ) ||
3946
+ ( typeof liveSearch === 'number' && this.value.length < liveSearch ) ||
3940
3947
  // let return & backspace continue on, but ignore arrows & non-valid characters
3941
3948
  ( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace &&
3942
3949
  ( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) {
@@ -3958,18 +3965,31 @@
3958
3965
  event.preventDefault();
3959
3966
  // init search with no delay
3960
3967
  $( this ).attr( 'data-lastSearchTime', new Date().getTime() );
3961
- tsf.searching( table, event.type !== 'keypress', true );
3968
+ tsf.searching( table, event.type !== 'keypress', true, column );
3962
3969
  }
3963
3970
  });
3964
3971
  },
3965
- searching: function( table, filter, skipFirst ) {
3966
- var wo = table.config.widgetOptions;
3972
+ searching: function( table, filter, skipFirst, column ) {
3973
+ var liveSearch,
3974
+ wo = table.config.widgetOptions;
3975
+ if (typeof column === 'undefined') {
3976
+ // no delay
3977
+ liveSearch = false;
3978
+ } else {
3979
+ liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
3980
+ wo.filter_liveSearch :
3981
+ // get column setting, or set to fallback value, or default to false
3982
+ ts.getColumnData( table, wo.filter_liveSearch, column );
3983
+ if ( typeof liveSearch !== 'undefined' ) {
3984
+ liveSearch = wo.filter_liveSearch.fallback || false;
3985
+ }
3986
+ }
3967
3987
  clearTimeout( wo.filter_searchTimer );
3968
3988
  if ( typeof filter === 'undefined' || filter === true ) {
3969
3989
  // delay filtering
3970
3990
  wo.filter_searchTimer = setTimeout( function() {
3971
3991
  tsf.checkFilters( table, filter, skipFirst );
3972
- }, wo.filter_liveSearch ? wo.filter_searchDelay : 10 );
3992
+ }, liveSearch ? wo.filter_searchDelay : 10 );
3973
3993
  } else {
3974
3994
  // skip delay
3975
3995
  tsf.checkFilters( table, filter, skipFirst );
@@ -1,4 +1,4 @@
1
- /*! TableSorter (FORK) v2.27.2 *//*
1
+ /*! TableSorter (FORK) v2.27.3 *//*
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.27.2',
25
+ version : '2.27.3',
26
26
 
27
27
  parsers : [],
28
28
  widgets : [],
@@ -2279,7 +2279,7 @@
2279
2279
  // c.$headerIndexed is not defined initially
2280
2280
  $cell = c.$headerIndexed && c.$headerIndexed[ indx ] ||
2281
2281
  $cells.filter( '[data-column="' + indx + '"]:last' );
2282
- if ( obj[ indx ] ) {
2282
+ if ( typeof obj[ indx ] !== 'undefined' ) {
2283
2283
  return getCell ? obj[ indx ] : obj[ $cells.index( $cell ) ];
2284
2284
  }
2285
2285
  for ( key in obj ) {
@@ -4,7 +4,7 @@
4
4
  ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
5
5
  █████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
6
6
  */
7
- /*! tablesorter (FORK) - updated 08-02-2016 (v2.27.2)*/
7
+ /*! tablesorter (FORK) - updated 08-17-2016 (v2.27.3)*/
8
8
  /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
9
9
  (function(factory) {
10
10
  if (typeof define === 'function' && define.amd) {
@@ -382,7 +382,7 @@
382
382
 
383
383
  })(jQuery);
384
384
 
385
- /*! Widget: filter - updated 7/31/2016 (v2.27.0) *//*
385
+ /*! Widget: filter - updated 8/17/2016 (v2.27.3) *//*
386
386
  * Requires tablesorter v2.8+ and jQuery 1.7+
387
387
  * by Rob Garrison
388
388
  */
@@ -821,8 +821,10 @@
821
821
  // force a new search since content has changed
822
822
  c.lastCombinedFilter = null;
823
823
  c.lastSearch = [];
824
- // update filterFormatters after update - Fixes #1237
825
- c.$table.triggerHandler( 'filterFomatterUpdate' );
824
+ // update filterFormatters after update (& small delay) - Fixes #1237
825
+ setTimeout(function(){
826
+ c.$table.triggerHandler( 'filterFomatterUpdate' );
827
+ }, 100);
826
828
  }
827
829
  // pass true ( skipFirst ) to prevent the tablesorter.setFilters function from skipping the first
828
830
  // input ensures all inputs are updated when a search is triggered on the table
@@ -1180,19 +1182,24 @@
1180
1182
  })
1181
1183
  .bind( 'keyup' + namespace, function( event ) {
1182
1184
  wo = table.config.widgetOptions; // make sure "wo" isn't cached
1183
- var column = parseInt( $( this ).attr( 'data-column' ), 10 );
1185
+ var column = parseInt( $( this ).attr( 'data-column' ), 10 ),
1186
+ liveSearch = typeof wo.filter_liveSearch === 'boolean' ? wo.filter_liveSearch :
1187
+ ts.getColumnData( table, wo.filter_liveSearch, column );
1188
+ if ( typeof liveSearch === 'undefined' ) {
1189
+ liveSearch = wo.filter_liveSearch.fallback || false;
1190
+ }
1184
1191
  $( this ).attr( 'data-lastSearchTime', new Date().getTime() );
1185
1192
  // emulate what webkit does.... escape clears the filter
1186
1193
  if ( event.which === tskeyCodes.escape ) {
1187
1194
  // make sure to restore the last value on escape
1188
1195
  this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column];
1189
1196
  // live search
1190
- } else if ( wo.filter_liveSearch === false ) {
1197
+ } else if ( liveSearch === false ) {
1191
1198
  return;
1192
1199
  // don't return if the search value is empty ( all rows need to be revealed )
1193
1200
  } else if ( this.value !== '' && (
1194
1201
  // liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
1195
- ( typeof wo.filter_liveSearch === 'number' && this.value.length < wo.filter_liveSearch ) ||
1202
+ ( typeof liveSearch === 'number' && this.value.length < liveSearch ) ||
1196
1203
  // let return & backspace continue on, but ignore arrows & non-valid characters
1197
1204
  ( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace &&
1198
1205
  ( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) {
@@ -1214,18 +1221,31 @@
1214
1221
  event.preventDefault();
1215
1222
  // init search with no delay
1216
1223
  $( this ).attr( 'data-lastSearchTime', new Date().getTime() );
1217
- tsf.searching( table, event.type !== 'keypress', true );
1224
+ tsf.searching( table, event.type !== 'keypress', true, column );
1218
1225
  }
1219
1226
  });
1220
1227
  },
1221
- searching: function( table, filter, skipFirst ) {
1222
- var wo = table.config.widgetOptions;
1228
+ searching: function( table, filter, skipFirst, column ) {
1229
+ var liveSearch,
1230
+ wo = table.config.widgetOptions;
1231
+ if (typeof column === 'undefined') {
1232
+ // no delay
1233
+ liveSearch = false;
1234
+ } else {
1235
+ liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
1236
+ wo.filter_liveSearch :
1237
+ // get column setting, or set to fallback value, or default to false
1238
+ ts.getColumnData( table, wo.filter_liveSearch, column );
1239
+ if ( typeof liveSearch !== 'undefined' ) {
1240
+ liveSearch = wo.filter_liveSearch.fallback || false;
1241
+ }
1242
+ }
1223
1243
  clearTimeout( wo.filter_searchTimer );
1224
1244
  if ( typeof filter === 'undefined' || filter === true ) {
1225
1245
  // delay filtering
1226
1246
  wo.filter_searchTimer = setTimeout( function() {
1227
1247
  tsf.checkFilters( table, filter, skipFirst );
1228
- }, wo.filter_liveSearch ? wo.filter_searchDelay : 10 );
1248
+ }, liveSearch ? wo.filter_searchDelay : 10 );
1229
1249
  } else {
1230
1250
  // skip delay
1231
1251
  tsf.checkFilters( table, filter, skipFirst );
@@ -1,4 +1,4 @@
1
- /*! Widget: filter - updated 7/31/2016 (v2.27.0) *//*
1
+ /*! Widget: filter - updated 8/17/2016 (v2.27.3) *//*
2
2
  * Requires tablesorter v2.8+ and jQuery 1.7+
3
3
  * by Rob Garrison
4
4
  */
@@ -437,8 +437,10 @@
437
437
  // force a new search since content has changed
438
438
  c.lastCombinedFilter = null;
439
439
  c.lastSearch = [];
440
- // update filterFormatters after update - Fixes #1237
441
- c.$table.triggerHandler( 'filterFomatterUpdate' );
440
+ // update filterFormatters after update (& small delay) - Fixes #1237
441
+ setTimeout(function(){
442
+ c.$table.triggerHandler( 'filterFomatterUpdate' );
443
+ }, 100);
442
444
  }
443
445
  // pass true ( skipFirst ) to prevent the tablesorter.setFilters function from skipping the first
444
446
  // input ensures all inputs are updated when a search is triggered on the table
@@ -796,19 +798,24 @@
796
798
  })
797
799
  .bind( 'keyup' + namespace, function( event ) {
798
800
  wo = table.config.widgetOptions; // make sure "wo" isn't cached
799
- var column = parseInt( $( this ).attr( 'data-column' ), 10 );
801
+ var column = parseInt( $( this ).attr( 'data-column' ), 10 ),
802
+ liveSearch = typeof wo.filter_liveSearch === 'boolean' ? wo.filter_liveSearch :
803
+ ts.getColumnData( table, wo.filter_liveSearch, column );
804
+ if ( typeof liveSearch === 'undefined' ) {
805
+ liveSearch = wo.filter_liveSearch.fallback || false;
806
+ }
800
807
  $( this ).attr( 'data-lastSearchTime', new Date().getTime() );
801
808
  // emulate what webkit does.... escape clears the filter
802
809
  if ( event.which === tskeyCodes.escape ) {
803
810
  // make sure to restore the last value on escape
804
811
  this.value = wo.filter_resetOnEsc ? '' : c.lastSearch[column];
805
812
  // live search
806
- } else if ( wo.filter_liveSearch === false ) {
813
+ } else if ( liveSearch === false ) {
807
814
  return;
808
815
  // don't return if the search value is empty ( all rows need to be revealed )
809
816
  } else if ( this.value !== '' && (
810
817
  // liveSearch can contain a min value length; ignore arrow and meta keys, but allow backspace
811
- ( typeof wo.filter_liveSearch === 'number' && this.value.length < wo.filter_liveSearch ) ||
818
+ ( typeof liveSearch === 'number' && this.value.length < liveSearch ) ||
812
819
  // let return & backspace continue on, but ignore arrows & non-valid characters
813
820
  ( event.which !== tskeyCodes.enter && event.which !== tskeyCodes.backSpace &&
814
821
  ( event.which < tskeyCodes.space || ( event.which >= tskeyCodes.left && event.which <= tskeyCodes.down ) ) ) ) ) {
@@ -830,18 +837,31 @@
830
837
  event.preventDefault();
831
838
  // init search with no delay
832
839
  $( this ).attr( 'data-lastSearchTime', new Date().getTime() );
833
- tsf.searching( table, event.type !== 'keypress', true );
840
+ tsf.searching( table, event.type !== 'keypress', true, column );
834
841
  }
835
842
  });
836
843
  },
837
- searching: function( table, filter, skipFirst ) {
838
- var wo = table.config.widgetOptions;
844
+ searching: function( table, filter, skipFirst, column ) {
845
+ var liveSearch,
846
+ wo = table.config.widgetOptions;
847
+ if (typeof column === 'undefined') {
848
+ // no delay
849
+ liveSearch = false;
850
+ } else {
851
+ liveSearch = typeof wo.filter_liveSearch === 'boolean' ?
852
+ wo.filter_liveSearch :
853
+ // get column setting, or set to fallback value, or default to false
854
+ ts.getColumnData( table, wo.filter_liveSearch, column );
855
+ if ( typeof liveSearch !== 'undefined' ) {
856
+ liveSearch = wo.filter_liveSearch.fallback || false;
857
+ }
858
+ }
839
859
  clearTimeout( wo.filter_searchTimer );
840
860
  if ( typeof filter === 'undefined' || filter === true ) {
841
861
  // delay filtering
842
862
  wo.filter_searchTimer = setTimeout( function() {
843
863
  tsf.checkFilters( table, filter, skipFirst );
844
- }, wo.filter_liveSearch ? wo.filter_searchDelay : 10 );
864
+ }, liveSearch ? wo.filter_searchDelay : 10 );
845
865
  } else {
846
866
  // skip delay
847
867
  tsf.checkFilters( table, filter, skipFirst );
@@ -1,4 +1,4 @@
1
- /*! Widget: Pager - updated 7/11/2016 (v2.26.6) */
1
+ /*! Widget: Pager - updated 8/17/2016 (v2.27.3) */
2
2
  /* Requires tablesorter v2.8+ and jQuery 1.7+
3
3
  * by Rob Garrison
4
4
  */
@@ -417,7 +417,7 @@
417
417
  wo = c.widgetOptions,
418
418
  p = c.pager,
419
419
  hasFilters = c.$table.hasClass( 'hasFilters' );
420
- if ( hasFilters && !wo.pager_ajaxUrl ) {
420
+ if ( hasFilters && !p.ajax ) {
421
421
  if ( $.isEmptyObject( c.cache ) ) {
422
422
  // delayInit: true so nothing is in the cache
423
423
  p.filteredRows = p.totalRows = c.$tbodies.eq( 0 )
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.22.1
4
+ version: 1.22.2
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-08-02 00:00:00.000000000 Z
12
+ date: 2016-08-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties