jquery-tablesorter 1.23.13 → 1.23.14

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: 4599b415cfd55b6691b1ab65afe7fd151d5eca4b
4
- data.tar.gz: 79c6f86cee61f56dcbd3ab71f9ca834cf55301b9
3
+ metadata.gz: dc9475e0e21aea0b90af7bf0a33f6b75d431ea61
4
+ data.tar.gz: a9e087b3c5de2ca3a2a1f36e99aa6a9d3d053482
5
5
  SHA512:
6
- metadata.gz: 0466a10d6c849257f48466028714faae3795993dc7d334233ed0832cd59519147adffc3b32777b1b4647000131b4de0f49b041595ab4e3d4a16ed6121f6a5fb5
7
- data.tar.gz: 01217de0c92d25f0e849989ae7fe9a218a595be7692b0d9fa51f8204cb9ba5ba54d87506693ce988a7e9dc9cd41c18719d838e6184431998ba447e0f618aabd9
6
+ metadata.gz: 11042f14240738761e9aebae6260800334d0639ad13c1c6042c91726a707db45b5cb3b8c06e60951fd4088365414623142ba2a7ebd6a1dcb4445bae42bff27dd
7
+ data.tar.gz: 20a77145b237423b2afb805affc17bd0984a5bdbe4fd4d5eab1ded75f54117d190cbcf7ff759750b1356cee86f3a08e42b91e191aa07e23a41e1ecc5ed50e507
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.28.13 (6/2/2017) [documentation]
7
+ Current tablesorter version: 2.28.15 (7/4/2017) [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 = 23
4
- TINY = 13
4
+ TINY = 14
5
5
 
6
6
  VERSION = [MAJOR, MINOR, TINY].compact.join('.')
7
7
  end
@@ -321,16 +321,22 @@
321
321
  },
322
322
 
323
323
  fixHeight = function(table, p) {
324
- var d, h,
324
+ var d, h, bs,
325
325
  c = table.config,
326
326
  $b = c.$tbodies.eq(0);
327
327
  $b.find('tr.pagerSavedHeightSpacer').remove();
328
328
  if (p.fixedHeight && !p.isDisabled) {
329
329
  h = $.data(table, 'pagerSavedHeight');
330
330
  if (h) {
331
- d = h - $b.height();
332
- if ( d > 5 && $.data(table, 'pagerLastSize') === p.size &&
333
- $b.children('tr:visible').length < (p.size === 'all' ? p.totalRows : p.size) ) {
331
+ bs = 0;
332
+ if ($(table).css('border-spacing').split(' ').length > 1) {
333
+ bs = $(table).css('border-spacing').split(' ')[1].replace(/[^-\d\.]/g, '');
334
+ }
335
+ d = h - $b.height() + (bs * p.size) - bs;
336
+ if (
337
+ d > 5 && $.data(table, 'pagerLastSize') === p.size &&
338
+ $b.children('tr:visible').length < (p.size === 'all' ? p.totalRows : p.size)
339
+ ) {
334
340
  $b.append('<tr class="pagerSavedHeightSpacer ' + c.selectorRemove.slice(1) + '" style="height:' + d + 'px;"></tr>');
335
341
  }
336
342
  }
@@ -969,6 +975,10 @@
969
975
  .bind('filterInit filterStart '.split(' ').join(namespace + ' '), function(e, filters) {
970
976
  p.currentFilters = $.isArray(filters) ? filters : c.$table.data('lastSearch');
971
977
  var filtersEqual;
978
+ if (p.ajax && e.type === 'filterInit') {
979
+ // ensure pager ajax is called after filter widget has initialized
980
+ return moveToPage( table, p, false );
981
+ }
972
982
  if (ts.filter.equalFilters) {
973
983
  filtersEqual = ts.filter.equalFilters(c, c.lastSearch, p.currentFilters);
974
984
  } else {
@@ -1188,7 +1198,7 @@
1188
1198
  valid = true,
1189
1199
  message = '',
1190
1200
  removeRow = function(){
1191
- c.$table.find( 'thead' ).find( '.' + errorRow ).remove();
1201
+ c.$table.find( 'thead' ).find( c.selectorRemove ).remove();
1192
1202
  };
1193
1203
 
1194
1204
  if ( !$table.length ) {
@@ -4,7 +4,7 @@
4
4
  ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
5
5
  █████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
6
6
  */
7
- /*! tablesorter (FORK) - updated 06-02-2017 (v2.28.13)*/
7
+ /*! tablesorter (FORK) - updated 06-08-2017 (v2.28.14)*/
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.28.13 *//*
19
+ /*! TableSorter (FORK) v2.28.14 *//*
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.28.13',
43
+ version : '2.28.14',
44
44
 
45
45
  parsers : [],
46
46
  widgets : [],
@@ -2293,9 +2293,42 @@
2293
2293
  }
2294
2294
  }
2295
2295
  }
2296
+ ts.checkColumnCount($rows, matrix, matrixrow.length);
2296
2297
  return matrixrow.length;
2297
2298
  },
2298
2299
 
2300
+ checkColumnCount : function($rows, matrix, columns) {
2301
+ // this DOES NOT report any tbody column issues, except for the math and
2302
+ // and column selector widgets
2303
+ var i, len,
2304
+ valid = true,
2305
+ cells = [];
2306
+ for ( i = 0; i < matrix.length; i++ ) {
2307
+ // some matrix entries are undefined when testing the footer because
2308
+ // it is using the rowIndex property
2309
+ if ( matrix[i] ) {
2310
+ len = matrix[i].length;
2311
+ if ( matrix[i].length !== columns ) {
2312
+ valid = false;
2313
+ break;
2314
+ }
2315
+ }
2316
+ }
2317
+ if ( !valid ) {
2318
+ $rows.each( function( indx, el ) {
2319
+ var cell = el.parentElement.nodeName;
2320
+ if ( cells.indexOf( cell ) ) {
2321
+ cells.push( cell );
2322
+ }
2323
+ });
2324
+ console.error(
2325
+ 'Invalid or incorrect number of columns in the ' +
2326
+ cells.join( ' or ' ) + '; expected ' + columns +
2327
+ ', but found ' + len + ' columns'
2328
+ );
2329
+ }
2330
+ },
2331
+
2299
2332
  // automatically add a colgroup with col elements set to a percentage width
2300
2333
  fixColumnWidth : function( table ) {
2301
2334
  table = $( table )[ 0 ];
@@ -1,4 +1,4 @@
1
- /*! TableSorter (FORK) v2.28.13 *//*
1
+ /*! TableSorter (FORK) v2.28.14 *//*
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.28.13',
25
+ version : '2.28.14',
26
26
 
27
27
  parsers : [],
28
28
  widgets : [],
@@ -2275,9 +2275,42 @@
2275
2275
  }
2276
2276
  }
2277
2277
  }
2278
+ ts.checkColumnCount($rows, matrix, matrixrow.length);
2278
2279
  return matrixrow.length;
2279
2280
  },
2280
2281
 
2282
+ checkColumnCount : function($rows, matrix, columns) {
2283
+ // this DOES NOT report any tbody column issues, except for the math and
2284
+ // and column selector widgets
2285
+ var i, len,
2286
+ valid = true,
2287
+ cells = [];
2288
+ for ( i = 0; i < matrix.length; i++ ) {
2289
+ // some matrix entries are undefined when testing the footer because
2290
+ // it is using the rowIndex property
2291
+ if ( matrix[i] ) {
2292
+ len = matrix[i].length;
2293
+ if ( matrix[i].length !== columns ) {
2294
+ valid = false;
2295
+ break;
2296
+ }
2297
+ }
2298
+ }
2299
+ if ( !valid ) {
2300
+ $rows.each( function( indx, el ) {
2301
+ var cell = el.parentElement.nodeName;
2302
+ if ( cells.indexOf( cell ) ) {
2303
+ cells.push( cell );
2304
+ }
2305
+ });
2306
+ console.error(
2307
+ 'Invalid or incorrect number of columns in the ' +
2308
+ cells.join( ' or ' ) + '; expected ' + columns +
2309
+ ', but found ' + len + ' columns'
2310
+ );
2311
+ }
2312
+ },
2313
+
2281
2314
  // automatically add a colgroup with col elements set to a percentage width
2282
2315
  fixColumnWidth : function( table ) {
2283
2316
  table = $( table )[ 0 ];
@@ -4,7 +4,7 @@
4
4
  ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
5
5
  █████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
6
6
  */
7
- /*! tablesorter (FORK) - updated 06-02-2017 (v2.28.13)*/
7
+ /*! tablesorter (FORK) - updated 06-08-2017 (v2.28.14)*/
8
8
  /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
9
9
  (function(factory) {
10
10
  if (typeof define === 'function' && define.amd) {
@@ -611,7 +611,7 @@
611
611
  },
612
612
 
613
613
  fixHeight: function( c ) {
614
- var d, h,
614
+ var d, h, bs,
615
615
  table = c.table,
616
616
  p = c.pager,
617
617
  wo = c.widgetOptions,
@@ -620,9 +620,15 @@
620
620
  if ( wo.pager_fixedHeight && !p.isDisabled ) {
621
621
  h = $.data( table, 'pagerSavedHeight' );
622
622
  if ( h ) {
623
- d = h - $b.height();
624
- if ( d > 5 && $.data( table, 'pagerLastSize' ) === p.size &&
625
- $b.children( 'tr:visible' ).length < ( p.size === 'all' ? p.totalRows : p.size ) ) {
623
+ bs = 0;
624
+ if ( $(table).css('border-spacing').split(' ').length > 1 ) {
625
+ bs = $(table).css('border-spacing').split(' ')[1].replace( /[^-\d\.]/g, '' );
626
+ }
627
+ d = h - $b.height() + (bs * p.size) - bs;
628
+ if (
629
+ d > 5 && $.data( table, 'pagerLastSize' ) === p.size &&
630
+ $b.children( 'tr:visible' ).length < ( p.size === 'all' ? p.totalRows : p.size )
631
+ ) {
626
632
  $b.append( '<tr class="pagerSavedHeightSpacer ' + c.selectorRemove.slice( 1 ) +
627
633
  '" style="height:' + d + 'px;"></tr>' );
628
634
  }
@@ -1301,7 +1307,7 @@
1301
1307
  valid = true,
1302
1308
  message = '',
1303
1309
  removeRow = function() {
1304
- c.$table.find( 'thead' ).find( '.' + errorRow ).remove();
1310
+ c.$table.find( 'thead' ).find( c.selectorRemove ).remove();
1305
1311
  };
1306
1312
 
1307
1313
  if ( !$table.length ) {
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.23.13
4
+ version: 1.23.14
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: 2017-06-06 00:00:00.000000000 Z
12
+ date: 2017-07-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties