jquery-tablesorter 1.20.0 → 1.20.1

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: 0bb24b3d314deeb03638a037f362320f2f5365f7
4
- data.tar.gz: d1c41f726992f0decb2314301175632b19617f54
3
+ metadata.gz: be1871fe019187a3a9ede62fe42793b65d00594e
4
+ data.tar.gz: 016ffee69c030c956b4f7a38b04b2d9489a29a2c
5
5
  SHA512:
6
- metadata.gz: 60fdbbd689bac3c8735ff9b1441d79214cc485e813732cd1e6f60c76581b76d81f3fa0d7da3b6deadc851330dc58eb3a5f1b64faf3b70cff61eaf4580e7afca5
7
- data.tar.gz: bd7b06f94826a186207e885d70a1967a8a5e652f2bf47ae3c2a00a2bc98ecd7019b00fc11db0310b24bec6f3fa753d914a56be35e7f722990f41b3a2a378c563
6
+ metadata.gz: 8994b468e65125354e889fef34523bd1bd325b10aa2cf2999c5534fcd99e0d9b00fb16e45d44ee09bfb45b9ffea795c403aa32bed780d7b23395a5dfacc2de6c
7
+ data.tar.gz: ba2cff70a88e65d42c2015fdf47d6b8bf7b8069b3e889aae2c74f57ef5e96b226bac537565c76581e765bc6c58ae97df135ffec8efc9df7a93400ac2520918d2
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2015 Jun Lin, Erik-B. Ernst
1
+ Copyright 2016 Jun Lin, Erik-B. Ernst
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
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.0 (12/13/2015), [documentation]
7
+ Current tablesorter version: 2.25.1 (1/10/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 = 0
4
+ TINY = 1
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 12-13-2015 (v2.25.0)*/
7
+ /*! tablesorter (FORK) - updated 01-10-2016 (v2.25.1)*/
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.0 *//*
19
+ /*! TableSorter (FORK) v2.25.1 *//*
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.0',
42
+ version : '2.25.1',
43
43
 
44
44
  parsers : [],
45
45
  widgets : [],
@@ -1064,8 +1064,8 @@
1064
1064
  // find the footer
1065
1065
  $headers = c.$table
1066
1066
  .find( 'tfoot tr' )
1067
- .children()
1068
- .add( $( c.namespace + '_extra_headers' ) )
1067
+ .add( $( c.namespace + '_extra_headers' ).children( 'tr' ) )
1068
+ .children( 'td, th' )
1069
1069
  .removeClass( css.join( ' ' ) );
1070
1070
  // remove all header information
1071
1071
  c.$headers
@@ -1898,15 +1898,19 @@
1898
1898
  var len, indx,
1899
1899
  c = table.config,
1900
1900
  // look for widgets to apply from table class
1901
- // stop using \b otherwise this matches 'ui-widget-content' & adds 'content' widget
1902
- regex = '\\s' + c.widgetClass.replace( ts.regex.templateName, '([\\w-]+)' ) + '\\s',
1901
+ // don't match from 'ui-widget-content'; use \S instead of \w to include widgets
1902
+ // with dashes in the name, e.g. "widget-test-2" extracts out "test-2"
1903
+ regex = '^' + c.widgetClass.replace( ts.regex.templateName, '(\\S+)+' ) + '$',
1903
1904
  widgetClass = new RegExp( regex, 'g' ),
1904
- // extract out the widget id from the table class (widget id's can include dashes)
1905
- widget = ( ' ' + c.table.className + ' ' ).match( widgetClass );
1906
- if ( widget ) {
1907
- len = widget.length;
1905
+ // split up table class (widget id's can include dashes) - stop using match
1906
+ // otherwise only one widget gets extracted, see #1109
1907
+ widgets = ( table.className || '' ).split( ts.regex.spaces );
1908
+ if ( widgets.length ) {
1909
+ len = widgets.length;
1908
1910
  for ( indx = 0; indx < len; indx++ ) {
1909
- c.widgets.push( widget[ indx ].replace( widgetClass, '$1' ) );
1911
+ if ( widgets[ indx ].match( widgetClass ) ) {
1912
+ c.widgets.push( widgets[ indx ].replace( widgetClass, '$1' ) );
1913
+ }
1910
1914
  }
1911
1915
  }
1912
1916
  },
@@ -2642,7 +2646,7 @@
2642
2646
  });
2643
2647
 
2644
2648
  // match 24 hour time & 12 hours time + am/pm - see http://regexr.com/3c3tk
2645
- ts.regex.timeTest = /^([1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)$/i;
2649
+ ts.regex.timeTest = /^([1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i;
2646
2650
  ts.regex.timeMatch = /([1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i;
2647
2651
  ts.addParser({
2648
2652
  id : 'time',
@@ -3082,7 +3086,7 @@
3082
3086
 
3083
3087
  })(jQuery);
3084
3088
 
3085
- /*! Widget: filter - updated 12/13/2015 (v2.25.0) *//*
3089
+ /*! Widget: filter - updated 1/10/2016 (v2.25.1) *//*
3086
3090
  * Requires tablesorter v2.8+ and jQuery 1.7+
3087
3091
  * by Rob Garrison
3088
3092
  */
@@ -3451,7 +3455,7 @@
3451
3455
  toSplit : new RegExp( '(?:\\s+(?:-|' + ts.language.to + ')\\s+)', 'gi' ),
3452
3456
  andTest : new RegExp( '\\s+(' + ts.language.and + '|&&)\\s+', 'i' ),
3453
3457
  andSplit : new RegExp( '(?:\\s+(?:' + ts.language.and + '|&&)\\s+)', 'gi' ),
3454
- orTest : /\|/,
3458
+ orTest : new RegExp( '(\\||\\s+' + ts.language.or + '\\s+)', 'i' ),
3455
3459
  orSplit : new RegExp( '(?:\\s+(?:' + ts.language.or + ')\\s+|\\|)', 'gi' ),
3456
3460
  iQuery : new RegExp( val, 'i' ),
3457
3461
  igQuery : new RegExp( val, 'ig' ),
@@ -3926,7 +3930,7 @@
3926
3930
  filters = Array.prototype.map ?
3927
3931
  filters.map( String ) :
3928
3932
  // for IE8 & older browsers - maybe not the best method
3929
- filters.join( '\u0000' ).split( '\u0000' );
3933
+ filters.join( '\ufffd' ).split( '\ufffd' );
3930
3934
 
3931
3935
  if ( wo.filter_initialized ) {
3932
3936
  c.$table.triggerHandler( 'filterStart', [ filters ] );
@@ -4132,7 +4136,6 @@
4132
4136
 
4133
4137
  vars.excludeMatch = vars.noAnyMatch;
4134
4138
  filterMatched = tsf.processTypes( c, data, vars );
4135
-
4136
4139
  if ( filterMatched !== null ) {
4137
4140
  showRow = filterMatched;
4138
4141
  } else {
@@ -4165,13 +4168,8 @@
4165
4168
  // ignore if filter is empty or disabled
4166
4169
  if ( data.filter ) {
4167
4170
  data.cache = data.cacheArray[ columnIndex ];
4168
- // check if column data should be from the cell or from parsed data
4169
- if ( wo.filter_useParsedData || data.parsed[ columnIndex ] ) {
4170
- data.exact = data.cache;
4171
- } else {
4172
- result = data.rawArray[ columnIndex ] || '';
4173
- data.exact = c.sortLocaleCompare ? ts.replaceAccents( result ) : result; // issue #405
4174
- }
4171
+ result = data.rawArray[ columnIndex ] || '';
4172
+ data.exact = c.sortLocaleCompare ? ts.replaceAccents( result ) : result; // issue #405
4175
4173
  data.iExact = !tsfRegex.type.test( typeof data.exact ) && wo.filter_ignoreCase ?
4176
4174
  data.exact.toLowerCase() : data.exact;
4177
4175
 
@@ -4226,8 +4224,7 @@
4226
4224
  result = filterMatched;
4227
4225
  // Look for match, and add child row data for matching
4228
4226
  } else {
4229
- txt = ( data.iExact + data.childRowText )
4230
- .indexOf( tsf.parseFilter( c, data.iFilter, data ) );
4227
+ txt = ( data.iExact + data.childRowText ).indexOf( tsf.parseFilter( c, data.iFilter, data ) );
4231
4228
  result = ( ( !wo.filter_startsWith && txt >= 0 ) || ( wo.filter_startsWith && txt === 0 ) );
4232
4229
  }
4233
4230
  } else {
@@ -4267,18 +4264,17 @@
4267
4264
  };
4268
4265
 
4269
4266
  // parse columns after formatter, in case the class is added at that point
4270
- data.parsed = c.$headers.map( function( columnIndex ) {
4271
- return c.parsers && c.parsers[ columnIndex ] &&
4272
- // force parsing if parser type is numeric
4273
- c.parsers[ columnIndex ].parsed ||
4274
- // getData won't return 'parsed' if other 'filter-' class names exist
4267
+ data.parsed = [];
4268
+ for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
4269
+ data.parsed[ columnIndex ] = wo.filter_useParsedData ||
4270
+ // parser has a "parsed" parameter
4271
+ ( c.parsers && c.parsers[ columnIndex ] && c.parsers[ columnIndex ].parsed ||
4272
+ // getData may not return 'parsed' if other 'filter-' class names exist
4275
4273
  // ( e.g. <th class="filter-select filter-parsed"> )
4276
4274
  ts.getData && ts.getData( c.$headerIndexed[ columnIndex ],
4277
4275
  ts.getColumnData( table, c.headers, columnIndex ), 'filter' ) === 'parsed' ||
4278
- $( this ).hasClass( 'filter-parsed' );
4279
- }).get();
4276
+ c.$headerIndexed[ columnIndex ].hasClass( 'filter-parsed' ) );
4280
4277
 
4281
- for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
4282
4278
  vars.functions[ columnIndex ] =
4283
4279
  ts.getColumnData( table, wo.filter_functions, columnIndex );
4284
4280
  vars.defaultColFilter[ columnIndex ] =
@@ -4436,7 +4432,7 @@
4436
4432
 
4437
4433
  // don't pass reference to val
4438
4434
  val = showParent ? true : false;
4439
- childRow = rowData.$row.filter( ':gt( 0 )' );
4435
+ childRow = rowData.$row.filter( ':gt(0)' );
4440
4436
  if ( wo.filter_childRows && childRow.length ) {
4441
4437
  if ( wo.filter_childByColumn ) {
4442
4438
  if ( !wo.filter_childWithSibs ) {
@@ -1,4 +1,4 @@
1
- /*! TableSorter (FORK) v2.25.0 *//*
1
+ /*! TableSorter (FORK) v2.25.1 *//*
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.0',
24
+ version : '2.25.1',
25
25
 
26
26
  parsers : [],
27
27
  widgets : [],
@@ -1046,8 +1046,8 @@
1046
1046
  // find the footer
1047
1047
  $headers = c.$table
1048
1048
  .find( 'tfoot tr' )
1049
- .children()
1050
- .add( $( c.namespace + '_extra_headers' ) )
1049
+ .add( $( c.namespace + '_extra_headers' ).children( 'tr' ) )
1050
+ .children( 'td, th' )
1051
1051
  .removeClass( css.join( ' ' ) );
1052
1052
  // remove all header information
1053
1053
  c.$headers
@@ -1880,15 +1880,19 @@
1880
1880
  var len, indx,
1881
1881
  c = table.config,
1882
1882
  // look for widgets to apply from table class
1883
- // stop using \b otherwise this matches 'ui-widget-content' & adds 'content' widget
1884
- regex = '\\s' + c.widgetClass.replace( ts.regex.templateName, '([\\w-]+)' ) + '\\s',
1883
+ // don't match from 'ui-widget-content'; use \S instead of \w to include widgets
1884
+ // with dashes in the name, e.g. "widget-test-2" extracts out "test-2"
1885
+ regex = '^' + c.widgetClass.replace( ts.regex.templateName, '(\\S+)+' ) + '$',
1885
1886
  widgetClass = new RegExp( regex, 'g' ),
1886
- // extract out the widget id from the table class (widget id's can include dashes)
1887
- widget = ( ' ' + c.table.className + ' ' ).match( widgetClass );
1888
- if ( widget ) {
1889
- len = widget.length;
1887
+ // split up table class (widget id's can include dashes) - stop using match
1888
+ // otherwise only one widget gets extracted, see #1109
1889
+ widgets = ( table.className || '' ).split( ts.regex.spaces );
1890
+ if ( widgets.length ) {
1891
+ len = widgets.length;
1890
1892
  for ( indx = 0; indx < len; indx++ ) {
1891
- c.widgets.push( widget[ indx ].replace( widgetClass, '$1' ) );
1893
+ if ( widgets[ indx ].match( widgetClass ) ) {
1894
+ c.widgets.push( widgets[ indx ].replace( widgetClass, '$1' ) );
1895
+ }
1892
1896
  }
1893
1897
  }
1894
1898
  },
@@ -2624,7 +2628,7 @@
2624
2628
  });
2625
2629
 
2626
2630
  // match 24 hour time & 12 hours time + am/pm - see http://regexr.com/3c3tk
2627
- ts.regex.timeTest = /^([1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)$/i;
2631
+ ts.regex.timeTest = /^([1-9]|1[0-2]):([0-5]\d)(\s[AP]M)$|^((?:[01]\d|[2][0-4]):[0-5]\d)$/i;
2628
2632
  ts.regex.timeMatch = /([1-9]|1[0-2]):([0-5]\d)(\s[AP]M)|((?:[01]\d|[2][0-4]):[0-5]\d)/i;
2629
2633
  ts.addParser({
2630
2634
  id : 'time',
@@ -4,7 +4,7 @@
4
4
  ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
5
5
  █████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
6
6
  */
7
- /*! tablesorter (FORK) - updated 12-13-2015 (v2.25.0)*/
7
+ /*! tablesorter (FORK) - updated 01-10-2016 (v2.25.1)*/
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 12/13/2015 (v2.25.0) *//*
375
+ /*! Widget: filter - updated 1/10/2016 (v2.25.1) *//*
376
376
  * Requires tablesorter v2.8+ and jQuery 1.7+
377
377
  * by Rob Garrison
378
378
  */
@@ -741,7 +741,7 @@
741
741
  toSplit : new RegExp( '(?:\\s+(?:-|' + ts.language.to + ')\\s+)', 'gi' ),
742
742
  andTest : new RegExp( '\\s+(' + ts.language.and + '|&&)\\s+', 'i' ),
743
743
  andSplit : new RegExp( '(?:\\s+(?:' + ts.language.and + '|&&)\\s+)', 'gi' ),
744
- orTest : /\|/,
744
+ orTest : new RegExp( '(\\||\\s+' + ts.language.or + '\\s+)', 'i' ),
745
745
  orSplit : new RegExp( '(?:\\s+(?:' + ts.language.or + ')\\s+|\\|)', 'gi' ),
746
746
  iQuery : new RegExp( val, 'i' ),
747
747
  igQuery : new RegExp( val, 'ig' ),
@@ -1216,7 +1216,7 @@
1216
1216
  filters = Array.prototype.map ?
1217
1217
  filters.map( String ) :
1218
1218
  // for IE8 & older browsers - maybe not the best method
1219
- filters.join( '\u0000' ).split( '\u0000' );
1219
+ filters.join( '\ufffd' ).split( '\ufffd' );
1220
1220
 
1221
1221
  if ( wo.filter_initialized ) {
1222
1222
  c.$table.triggerHandler( 'filterStart', [ filters ] );
@@ -1422,7 +1422,6 @@
1422
1422
 
1423
1423
  vars.excludeMatch = vars.noAnyMatch;
1424
1424
  filterMatched = tsf.processTypes( c, data, vars );
1425
-
1426
1425
  if ( filterMatched !== null ) {
1427
1426
  showRow = filterMatched;
1428
1427
  } else {
@@ -1455,13 +1454,8 @@
1455
1454
  // ignore if filter is empty or disabled
1456
1455
  if ( data.filter ) {
1457
1456
  data.cache = data.cacheArray[ columnIndex ];
1458
- // check if column data should be from the cell or from parsed data
1459
- if ( wo.filter_useParsedData || data.parsed[ columnIndex ] ) {
1460
- data.exact = data.cache;
1461
- } else {
1462
- result = data.rawArray[ columnIndex ] || '';
1463
- data.exact = c.sortLocaleCompare ? ts.replaceAccents( result ) : result; // issue #405
1464
- }
1457
+ result = data.rawArray[ columnIndex ] || '';
1458
+ data.exact = c.sortLocaleCompare ? ts.replaceAccents( result ) : result; // issue #405
1465
1459
  data.iExact = !tsfRegex.type.test( typeof data.exact ) && wo.filter_ignoreCase ?
1466
1460
  data.exact.toLowerCase() : data.exact;
1467
1461
 
@@ -1516,8 +1510,7 @@
1516
1510
  result = filterMatched;
1517
1511
  // Look for match, and add child row data for matching
1518
1512
  } else {
1519
- txt = ( data.iExact + data.childRowText )
1520
- .indexOf( tsf.parseFilter( c, data.iFilter, data ) );
1513
+ txt = ( data.iExact + data.childRowText ).indexOf( tsf.parseFilter( c, data.iFilter, data ) );
1521
1514
  result = ( ( !wo.filter_startsWith && txt >= 0 ) || ( wo.filter_startsWith && txt === 0 ) );
1522
1515
  }
1523
1516
  } else {
@@ -1557,18 +1550,17 @@
1557
1550
  };
1558
1551
 
1559
1552
  // parse columns after formatter, in case the class is added at that point
1560
- data.parsed = c.$headers.map( function( columnIndex ) {
1561
- return c.parsers && c.parsers[ columnIndex ] &&
1562
- // force parsing if parser type is numeric
1563
- c.parsers[ columnIndex ].parsed ||
1564
- // getData won't return 'parsed' if other 'filter-' class names exist
1553
+ data.parsed = [];
1554
+ for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
1555
+ data.parsed[ columnIndex ] = wo.filter_useParsedData ||
1556
+ // parser has a "parsed" parameter
1557
+ ( c.parsers && c.parsers[ columnIndex ] && c.parsers[ columnIndex ].parsed ||
1558
+ // getData may not return 'parsed' if other 'filter-' class names exist
1565
1559
  // ( e.g. <th class="filter-select filter-parsed"> )
1566
1560
  ts.getData && ts.getData( c.$headerIndexed[ columnIndex ],
1567
1561
  ts.getColumnData( table, c.headers, columnIndex ), 'filter' ) === 'parsed' ||
1568
- $( this ).hasClass( 'filter-parsed' );
1569
- }).get();
1562
+ c.$headerIndexed[ columnIndex ].hasClass( 'filter-parsed' ) );
1570
1563
 
1571
- for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
1572
1564
  vars.functions[ columnIndex ] =
1573
1565
  ts.getColumnData( table, wo.filter_functions, columnIndex );
1574
1566
  vars.defaultColFilter[ columnIndex ] =
@@ -1726,7 +1718,7 @@
1726
1718
 
1727
1719
  // don't pass reference to val
1728
1720
  val = showParent ? true : false;
1729
- childRow = rowData.$row.filter( ':gt( 0 )' );
1721
+ childRow = rowData.$row.filter( ':gt(0)' );
1730
1722
  if ( wo.filter_childRows && childRow.length ) {
1731
1723
  if ( wo.filter_childByColumn ) {
1732
1724
  if ( !wo.filter_childWithSibs ) {
@@ -1,4 +1,4 @@
1
- /* Widget: columnSelector (responsive table widget) - updated 10/31/2015 (v2.24.0) *//*
1
+ /* Widget: columnSelector (responsive table widget) - updated 1/10/2016 (v2.25.1) *//*
2
2
  * Requires tablesorter v2.8+ and jQuery 1.7+
3
3
  * by Justin Hallett & Rob Garrison
4
4
  */
@@ -237,9 +237,12 @@
237
237
  var array = [],
238
238
  temp = ' col:nth-child(' + column + ')';
239
239
  array.push(prefix + temp + ',' + prefix + '_extra_table' + temp);
240
- temp = ' tr th:nth-child(' + column + ')';
240
+ temp = ' tr:not(.hasSpan) th:nth-child(' + column + ')';
241
241
  array.push(prefix + temp + ',' + prefix + '_extra_table' + temp);
242
- temp = ' tr td:nth-child(' + column + ')';
242
+ temp = ' tr:not(.hasSpan) td:nth-child(' + column + ')';
243
+ array.push(prefix + temp + ',' + prefix + '_extra_table' + temp);
244
+ // for other cells in colspan columns
245
+ temp = ' tr td:not(' + prefix + 'HasSpan)[data-column="' + (column - 1) + '"]';
243
246
  array.push(prefix + temp + ',' + prefix + '_extra_table' + temp);
244
247
  return array;
245
248
  },
@@ -290,7 +293,7 @@
290
293
  if (mediaAll.length) {
291
294
  colSel.$breakpoints
292
295
  .prop('disabled', false)
293
- .html( tsColSel.queryAll.replace(/\[columns\]/g, mediaAll.join(',')) + breakpts );
296
+ .text( tsColSel.queryAll.replace(/\[columns\]/g, mediaAll.join(',')) + breakpts );
294
297
  }
295
298
  },
296
299
  updateCols: function(c, wo) {
@@ -312,7 +315,7 @@
312
315
  colSel.$breakpoints.prop('disabled', true);
313
316
  }
314
317
  if (colSel.$style) {
315
- colSel.$style.prop('disabled', false).html( styles.length ? styles.join(',') + ' { display: none; }' : '' );
318
+ colSel.$style.prop('disabled', false).text( styles.length ? styles.join(',') + ' { display: none; }' : '' );
316
319
  }
317
320
  if (wo.columnSelector_saveColumns && ts.storage) {
318
321
  ts.storage( c.$table[0], 'tablesorter-columnSelector', colSel.states );
@@ -327,7 +330,7 @@
327
330
  hasSpans = false,
328
331
  $cells = c.$table
329
332
  .add( $(c.namespace + '_extra_table') )
330
- .children('thead, tfoot')
333
+ .children()
331
334
  .children('tr')
332
335
  .children('th, td'),
333
336
  len = $cells.length;
@@ -338,6 +341,8 @@
338
341
  $cells.eq( index )
339
342
  .addClass( c.namespace.slice( 1 ) + 'columnselectorHasSpan' )
340
343
  .attr( 'data-col-span', span );
344
+ // add data-column values
345
+ ts.computeColumnIndex( $cells.eq( index ).parent().addClass( 'hasSpan' ) );
341
346
  }
342
347
  }
343
348
  // only add resize end if using media queries
@@ -357,15 +362,16 @@
357
362
  }
358
363
  },
359
364
  adjustColspans: function(c, wo) {
360
- var index, cols, col, span, end,
365
+ var index, cols, col, span, end, $cell,
361
366
  colSel = c.selector,
362
367
  autoModeOn = colSel.auto,
363
368
  $colspans = $( c.namespace + 'columnselectorHasSpan' ),
364
369
  len = $colspans.length;
365
370
  if ( len ) {
366
371
  for ( index = 0; index < len; index++ ) {
367
- col = parseInt( $colspans.eq(index).attr('data-column'), 10 );
368
- span = parseInt( $colspans.eq(index).attr('data-col-span'), 10 );
372
+ $cell = $colspans.eq(index);
373
+ col = parseInt( $cell.attr('data-column'), 10 ) || $cell[0].cellIndex;
374
+ span = parseInt( $cell.attr('data-col-span'), 10 );
369
375
  end = col + span;
370
376
  for ( cols = col; cols < end; cols++ ) {
371
377
  if ( !autoModeOn && colSel.states[ cols ] === false ||
@@ -374,9 +380,9 @@
374
380
  }
375
381
  }
376
382
  if ( span ) {
377
- $colspans.eq(index).show()[0].colSpan = span;
383
+ $cell.removeClass( wo.filter_filteredRow )[0].colSpan = span;
378
384
  } else {
379
- $colspans.eq(index).hide();
385
+ $cell.addClass( wo.filter_filteredRow );
380
386
  }
381
387
  }
382
388
  }
@@ -471,12 +477,13 @@
471
477
  tsColSel.init(table, c, wo);
472
478
  },
473
479
  remove: function(table, c, wo, refreshing) {
474
- if (refreshing) { return; }
475
480
  var csel = c.selector;
481
+ if ( refreshing || !csel ) { return; }
476
482
  csel.$container.empty();
477
483
  if (csel.$popup) { csel.$popup.empty(); }
478
484
  csel.$style.remove();
479
485
  csel.$breakpoints.remove();
486
+ $( c.namespace + 'columnselectorHasSpan' ).removeClass( wo.filter_filteredRow );
480
487
  c.$table.off('updateAll' + namespace + ' update' + namespace);
481
488
  }
482
489
 
@@ -1,4 +1,4 @@
1
- /*! Widget: filter - updated 12/13/2015 (v2.25.0) *//*
1
+ /*! Widget: filter - updated 1/10/2016 (v2.25.1) *//*
2
2
  * Requires tablesorter v2.8+ and jQuery 1.7+
3
3
  * by Rob Garrison
4
4
  */
@@ -367,7 +367,7 @@
367
367
  toSplit : new RegExp( '(?:\\s+(?:-|' + ts.language.to + ')\\s+)', 'gi' ),
368
368
  andTest : new RegExp( '\\s+(' + ts.language.and + '|&&)\\s+', 'i' ),
369
369
  andSplit : new RegExp( '(?:\\s+(?:' + ts.language.and + '|&&)\\s+)', 'gi' ),
370
- orTest : /\|/,
370
+ orTest : new RegExp( '(\\||\\s+' + ts.language.or + '\\s+)', 'i' ),
371
371
  orSplit : new RegExp( '(?:\\s+(?:' + ts.language.or + ')\\s+|\\|)', 'gi' ),
372
372
  iQuery : new RegExp( val, 'i' ),
373
373
  igQuery : new RegExp( val, 'ig' ),
@@ -842,7 +842,7 @@
842
842
  filters = Array.prototype.map ?
843
843
  filters.map( String ) :
844
844
  // for IE8 & older browsers - maybe not the best method
845
- filters.join( '\u0000' ).split( '\u0000' );
845
+ filters.join( '\ufffd' ).split( '\ufffd' );
846
846
 
847
847
  if ( wo.filter_initialized ) {
848
848
  c.$table.triggerHandler( 'filterStart', [ filters ] );
@@ -1048,7 +1048,6 @@
1048
1048
 
1049
1049
  vars.excludeMatch = vars.noAnyMatch;
1050
1050
  filterMatched = tsf.processTypes( c, data, vars );
1051
-
1052
1051
  if ( filterMatched !== null ) {
1053
1052
  showRow = filterMatched;
1054
1053
  } else {
@@ -1081,13 +1080,8 @@
1081
1080
  // ignore if filter is empty or disabled
1082
1081
  if ( data.filter ) {
1083
1082
  data.cache = data.cacheArray[ columnIndex ];
1084
- // check if column data should be from the cell or from parsed data
1085
- if ( wo.filter_useParsedData || data.parsed[ columnIndex ] ) {
1086
- data.exact = data.cache;
1087
- } else {
1088
- result = data.rawArray[ columnIndex ] || '';
1089
- data.exact = c.sortLocaleCompare ? ts.replaceAccents( result ) : result; // issue #405
1090
- }
1083
+ result = data.rawArray[ columnIndex ] || '';
1084
+ data.exact = c.sortLocaleCompare ? ts.replaceAccents( result ) : result; // issue #405
1091
1085
  data.iExact = !tsfRegex.type.test( typeof data.exact ) && wo.filter_ignoreCase ?
1092
1086
  data.exact.toLowerCase() : data.exact;
1093
1087
 
@@ -1142,8 +1136,7 @@
1142
1136
  result = filterMatched;
1143
1137
  // Look for match, and add child row data for matching
1144
1138
  } else {
1145
- txt = ( data.iExact + data.childRowText )
1146
- .indexOf( tsf.parseFilter( c, data.iFilter, data ) );
1139
+ txt = ( data.iExact + data.childRowText ).indexOf( tsf.parseFilter( c, data.iFilter, data ) );
1147
1140
  result = ( ( !wo.filter_startsWith && txt >= 0 ) || ( wo.filter_startsWith && txt === 0 ) );
1148
1141
  }
1149
1142
  } else {
@@ -1183,18 +1176,17 @@
1183
1176
  };
1184
1177
 
1185
1178
  // parse columns after formatter, in case the class is added at that point
1186
- data.parsed = c.$headers.map( function( columnIndex ) {
1187
- return c.parsers && c.parsers[ columnIndex ] &&
1188
- // force parsing if parser type is numeric
1189
- c.parsers[ columnIndex ].parsed ||
1190
- // getData won't return 'parsed' if other 'filter-' class names exist
1179
+ data.parsed = [];
1180
+ for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
1181
+ data.parsed[ columnIndex ] = wo.filter_useParsedData ||
1182
+ // parser has a "parsed" parameter
1183
+ ( c.parsers && c.parsers[ columnIndex ] && c.parsers[ columnIndex ].parsed ||
1184
+ // getData may not return 'parsed' if other 'filter-' class names exist
1191
1185
  // ( e.g. <th class="filter-select filter-parsed"> )
1192
1186
  ts.getData && ts.getData( c.$headerIndexed[ columnIndex ],
1193
1187
  ts.getColumnData( table, c.headers, columnIndex ), 'filter' ) === 'parsed' ||
1194
- $( this ).hasClass( 'filter-parsed' );
1195
- }).get();
1188
+ c.$headerIndexed[ columnIndex ].hasClass( 'filter-parsed' ) );
1196
1189
 
1197
- for ( columnIndex = 0; columnIndex < c.columns; columnIndex++ ) {
1198
1190
  vars.functions[ columnIndex ] =
1199
1191
  ts.getColumnData( table, wo.filter_functions, columnIndex );
1200
1192
  vars.defaultColFilter[ columnIndex ] =
@@ -1352,7 +1344,7 @@
1352
1344
 
1353
1345
  // don't pass reference to val
1354
1346
  val = showParent ? true : false;
1355
- childRow = rowData.$row.filter( ':gt( 0 )' );
1347
+ childRow = rowData.$row.filter( ':gt(0)' );
1356
1348
  if ( wo.filter_childRows && childRow.length ) {
1357
1349
  if ( wo.filter_childByColumn ) {
1358
1350
  if ( !wo.filter_childWithSibs ) {
@@ -1,4 +1,4 @@
1
- /*! Widget: output - updated 10/31/2015 (v2.24.0) *//*
1
+ /*! Widget: output - updated 1/10/2016 (v2.25.1) *//*
2
2
  * Requires tablesorter v2.8+ and jQuery 1.7+
3
3
  * Modified from:
4
4
  * HTML Table to CSV: http://www.kunalbabre.com/projects/table2CSV.php (License unknown?)
@@ -189,7 +189,14 @@
189
189
  }
190
190
 
191
191
  // callback; if true returned, continue processing
192
- if ($.isFunction(wo.output_callback) && !wo.output_callback(c, mydata)) { return; }
192
+ if ($.isFunction(wo.output_callback)) {
193
+ tmp = wo.output_callback(c, mydata);
194
+ if ( tmp === false ) {
195
+ return;
196
+ } else if ( typeof tmp === 'string' ) {
197
+ mydata = tmp;
198
+ }
199
+ }
193
200
 
194
201
  if ( /p/i.test( wo.output_delivery || '' ) ) {
195
202
  output.popup(mydata, wo.output_popupStyle, outputJSON || outputArray);
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.0
4
+ version: 1.20.1
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: 2015-12-14 00:00:00.000000000 Z
12
+ date: 2016-01-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -20,7 +20,7 @@ dependencies:
20
20
  version: '3.2'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '5'
23
+ version: '6'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
@@ -30,7 +30,7 @@ dependencies:
30
30
  version: '3.2'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '5'
33
+ version: '6'
34
34
  description: Simple integration of jquery-tablesorter (Mottie's fork) into the Rails
35
35
  asset pipeline.
36
36
  email: