jquery-tablesorter 1.18.4 → 1.18.5

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: 7f25b2d1c32020eb01d61f3b5b36078ea6c6ac85
4
- data.tar.gz: 3d8e1b92751a59e9f79aaa7989bd0303fec33118
3
+ metadata.gz: da76e8ae00079abf20ffbea4b67603190b80c980
4
+ data.tar.gz: 7963ec0c04fe46d8778e3e0b33da06580298ebec
5
5
  SHA512:
6
- metadata.gz: 2abcb7450f22141441bb95ca5044426d0041d3430e2fb96a5fd6421ee2fc5ce0e45798d253366c7a4641a0e3735c94ba28b0bbe45a55ff0978ae323864fc0198
7
- data.tar.gz: c7ec726ac20494eceb26014dcfb791b47c256ee8f6ffe86a6765ccae79c071c6483ea4a9832edcd95bd9a1a607e911612de52845d5d0382e2b15e69a9a94c6bc
6
+ metadata.gz: 361586f4f8b282499f267bfcf326c015cb2ea64b09a0d543c728be3a5d5d1c3db0252873a9a15308c77326c0331c996b32286aa8509b41c667fe1bdd82849002
7
+ data.tar.gz: 2c03c0980a775df3e1b85072f7db106af5acb5c139faba98c9f2e8b04c7a4cbf94e6315c3a3601ea4d6b4dacb9af2b4b1f88dabc62f27c37975f32e29cde9b47
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.23.4 (9/23/2015), [documentation]
7
+ Current tablesorter version: 2.23.5 (10/4/2015), [documentation]
8
8
 
9
9
  Any issue associated with the js/css files, please report to [Mottie's fork].
10
10
 
@@ -1,3 +1,3 @@
1
1
  module JqueryTablesorter
2
- VERSION = '1.18.4'
2
+ VERSION = '1.18.5'
3
3
  end
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * tablesorter (FORK) pager plugin
3
- * updated 8/19/2015 (v2.23.1)
3
+ * updated 10/4/2015 (v2.23.5)
4
4
  */
5
5
  /*jshint browser:true, jquery:true, unused:false */
6
6
  ;(function($) {
@@ -618,8 +618,7 @@
618
618
  }
619
619
  $t.trigger('pagerChange', p);
620
620
  }
621
-
622
- if ( !p.removeRows ) {
621
+ if ( !p.removeRows && !p.showAll ) {
623
622
  hideRows(table, p);
624
623
  } else {
625
624
  ts.clearTableBody(table);
@@ -656,17 +655,18 @@
656
655
  if ( p.ajax ) {
657
656
  pagerArrows(p, true);
658
657
  } else {
659
- p.isDisabled = true;
660
658
  $.data(table, 'pagerLastPage', p.page);
661
659
  $.data(table, 'pagerLastSize', p.size);
662
660
  p.page = 0;
663
661
  p.size = p.totalRows;
664
662
  p.totalPages = 1;
663
+ p.showAll = true;
665
664
  $(table)
666
665
  .addClass('pagerDisabled')
667
666
  .removeAttr('aria-describedby')
668
667
  .find('tr.pagerSavedHeightSpacer').remove();
669
668
  renderTable(table, table.config.rowsCopy, p);
669
+ p.isDisabled = true;
670
670
  $(table).trigger('applyWidgets');
671
671
  if (table.config.debug) {
672
672
  console.log('Pager: Disabled');
@@ -826,6 +826,7 @@
826
826
  .removeAttr('disabled')
827
827
  .attr('aria-disabled', 'false');
828
828
  p.isDisabled = false;
829
+ p.showAll = false;
829
830
  p.page = $.data(table, 'pagerLastPage') || p.page || 0;
830
831
  p.size = $.data(table, 'pagerLastSize') || parseInt(p.$size.find('option[selected]').val(), 10) || p.size || p.settings.size || 10;
831
832
  p.$size.val(p.size); // set page size
@@ -882,6 +883,7 @@
882
883
  p.oldAjaxSuccess = p.oldAjaxSuccess || p.ajaxObject.success;
883
884
  c.appender = $this.appender;
884
885
  p.initializing = true;
886
+ p.showAll = false;
885
887
  if (p.savePages && ts.storage) {
886
888
  t = ts.storage(table, p.storageKey) || {}; // fixes #387
887
889
  p.page = isNaN(t.page) ? p.page : t.page;
@@ -4,7 +4,7 @@
4
4
  ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀▀██
5
5
  █████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
6
6
  */
7
- /*! tablesorter (FORK) - updated 09-23-2015 (v2.23.4)*/
7
+ /*! tablesorter (FORK) - updated 10-04-2015 (v2.23.5)*/
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.23.4 *//*
19
+ /*! TableSorter (FORK) v2.23.5 *//*
20
20
  * Client-side table sorting with ease!
21
21
  * @requires jQuery v1.2.6+
22
22
  *
@@ -43,7 +43,7 @@
43
43
 
44
44
  var ts = this;
45
45
 
46
- ts.version = '2.23.4';
46
+ ts.version = '2.23.5';
47
47
 
48
48
  ts.parsers = [];
49
49
  ts.widgets = [];
@@ -531,19 +531,27 @@
531
531
  }
532
532
 
533
533
  function updateHeader(table) {
534
- var index, s, $th, col,
534
+ var index, isDisabled, $th, col,
535
535
  c = table.config,
536
536
  len = c.$headers.length;
537
537
  for ( index = 0; index < len; index++ ) {
538
538
  $th = c.$headers.eq( index );
539
539
  col = ts.getColumnData( table, c.headers, index, true );
540
540
  // add 'sorter-false' class if 'parser-false' is set
541
- s = ts.getData( $th, col, 'sorter' ) === 'false' || ts.getData( $th, col, 'parser' ) === 'false';
542
- $th[0].sortDisabled = s;
543
- $th[ s ? 'addClass' : 'removeClass' ]('sorter-false').attr('aria-disabled', '' + s);
541
+ isDisabled = ts.getData( $th, col, 'sorter' ) === 'false' || ts.getData( $th, col, 'parser' ) === 'false';
542
+ $th[0].sortDisabled = isDisabled;
543
+ $th[ isDisabled ? 'addClass' : 'removeClass' ]( 'sorter-false' ).attr( 'aria-disabled', '' + isDisabled );
544
+ // disable tab index on disabled cells
545
+ if ( c.tabIndex ) {
546
+ if ( isDisabled ) {
547
+ $th.removeAttr( 'tabindex' );
548
+ } else {
549
+ $th.attr( 'tabindex', '0' );
550
+ }
551
+ }
544
552
  // aria-controls - requires table ID
545
553
  if (table.id) {
546
- if (s) {
554
+ if ( isDisabled ) {
547
555
  $th.removeAttr('aria-controls');
548
556
  } else {
549
557
  $th.attr('aria-controls', table.id);
@@ -2716,7 +2724,7 @@
2716
2724
 
2717
2725
  })(jQuery);
2718
2726
 
2719
- /*! Widget: filter - updated 9/23/2015 (v2.23.4) *//*
2727
+ /*! Widget: filter - updated 10/4/2015 (v2.23.5) *//*
2720
2728
  * Requires tablesorter v2.8+ and jQuery 1.7+
2721
2729
  * by Rob Garrison
2722
2730
  */
@@ -2820,8 +2828,8 @@
2820
2828
  // data.filters = array of filters for all columns ( some may be undefined )
2821
2829
  // data.filter = filter for the current column
2822
2830
  // data.iFilter = same as data.filter, except lowercase ( if wo.filter_ignoreCase is true )
2823
- // data.exact = table cell text ( or parsed data if column parser enabled )
2824
- // data.iExact = same as data.exact, except lowercase ( if wo.filter_ignoreCase is true )
2831
+ // data.exact = table cell text ( or parsed data if column parser enabled; may be a number & not a string )
2832
+ // data.iExact = same as data.exact, except lowercase ( if wo.filter_ignoreCase is true; may be a number & not a string )
2825
2833
  // data.cache = table cell text from cache, so it has been parsed ( & in all lower case if c.ignoreCase is true )
2826
2834
  // data.cacheArray = An array of parsed content from each table cell in the row being processed
2827
2835
  // data.index = column index; table = table element ( DOM )
@@ -3802,7 +3810,8 @@
3802
3810
  if ( fxn === true || hasSelect ) {
3803
3811
  // default selector uses exact match unless 'filter-match' class is found
3804
3812
  filterMatched = data.isMatch ?
3805
- data.iExact.search( data.iFilter ) >= 0 :
3813
+ // data.iExact may be a number
3814
+ ( '' + data.iExact ).search( data.iFilter ) >= 0 :
3806
3815
  data.filter === data.exact;
3807
3816
  } else if ( typeof fxn === 'function' ) {
3808
3817
  // filter callback( exact cell content, parser normalized content,
@@ -3841,7 +3850,7 @@
3841
3850
  return;
3842
3851
  }
3843
3852
  var len, norm_rows, rowData, $rows, $row, rowIndex, tbodyIndex, $tbody, columnIndex,
3844
- isChild, childRow, lastSearch, showRow, time, val, indx,
3853
+ isChild, childRow, lastSearch, showRow, showParent, time, val, indx,
3845
3854
  notFiltered, searchFiltered, query, injected, res, id, txt,
3846
3855
  storedFilters = $.extend( [], filters ),
3847
3856
  regex = tsf.regex,
@@ -4021,7 +4030,7 @@
4021
4030
  // a match anywhere in the child row, then it will make the row visible
4022
4031
  // checked here so the option can be changed dynamically
4023
4032
  for ( indx = 0; indx < childRow.length; indx++ ) {
4024
- txt += ' ' + childRow[indx].join( '' ) || '';
4033
+ txt += ' ' + childRow[indx].join( ' ' ) || '';
4025
4034
  }
4026
4035
  data.childRowText = wo.filter_childRows ?
4027
4036
  ( wo.filter_ignoreCase ? txt.toLowerCase() : txt ) :
@@ -4029,14 +4038,20 @@
4029
4038
  }
4030
4039
 
4031
4040
  showRow = false;
4032
- val = tsf.processRow( c, data, vars );
4041
+ showParent = tsf.processRow( c, data, vars );
4042
+ $row = rowData.$row;
4043
+
4044
+ // don't pass reference to val
4045
+ val = showParent ? true : false;
4033
4046
  childRow = rowData.$row.filter( ':gt( 0 )' );
4034
4047
  if ( wo.filter_childRows && childRow.length ) {
4035
- if ( !wo.filter_childWithSibs ) {
4036
- // hide all child rows
4037
- childRow.addClass( wo.filter_filteredRow );
4038
- }
4039
4048
  if ( wo.filter_childByColumn ) {
4049
+ if ( !wo.filter_childWithSibs ) {
4050
+ // hide all child rows
4051
+ childRow.addClass( wo.filter_filteredRow );
4052
+ // if only showing resulting child row, only include parent
4053
+ $row = $row.eq( 0 );
4054
+ }
4040
4055
  // cycle through each child row
4041
4056
  for ( indx = 0; indx < childRow.length; indx++ ) {
4042
4057
  data.$row = childRow.eq( indx );
@@ -4050,14 +4065,11 @@
4050
4065
  }
4051
4066
  }
4052
4067
  }
4068
+ // keep parent row match even if no child matches... see #1020
4069
+ showRow = showRow || showParent;
4053
4070
  } else {
4054
4071
  showRow = val;
4055
4072
  }
4056
- $row = rowData.$row;
4057
- // if only showing resulting child row, only include parent
4058
- if ( !wo.filter_childWithSibs ) {
4059
- $row = $row.eq( 0 );
4060
- }
4061
4073
  $row
4062
4074
  .toggleClass( wo.filter_filteredRow, !showRow )[0]
4063
4075
  .display = showRow ? '' : 'none';
@@ -4184,7 +4196,7 @@
4184
4196
  },
4185
4197
  getOptions: function( table, column, onlyAvail ) {
4186
4198
  table = $( table )[0];
4187
- var rowIndex, tbodyIndex, len, row, cache,
4199
+ var rowIndex, tbodyIndex, len, row, cache, indx, child, childLen,
4188
4200
  c = table.config,
4189
4201
  wo = c.widgetOptions,
4190
4202
  arry = [];
@@ -4207,9 +4219,24 @@
4207
4219
  c.parsers[column].parsed ||
4208
4220
  c.$headerIndexed[column].hasClass( 'filter-parsed' ) ) {
4209
4221
  arry.push( '' + cache.normalized[ rowIndex ][ column ] );
4222
+ // child row parsed data
4223
+ if ( wo.filter_childRows && wo.filter_childByColumn ) {
4224
+ childLen = cache.normalized[ rowIndex ][ c.columns ].$row.length - 1;
4225
+ for ( indx = 0; indx < childLen; indx++ ) {
4226
+ arry.push( '' + cache.normalized[ rowIndex ][ c.columns ].child[ indx ][ column ] );
4227
+ }
4228
+ }
4210
4229
  } else {
4211
4230
  // get raw cached data instead of content directly from the cells
4212
4231
  arry.push( cache.normalized[ rowIndex ][ c.columns ].raw[ column ] );
4232
+ // child row unparsed data
4233
+ if ( wo.filter_childRows && wo.filter_childByColumn ) {
4234
+ childLen = cache.normalized[ rowIndex ][ c.columns ].$row.length;
4235
+ for ( indx = 1; indx < childLen; indx++ ) {
4236
+ child = cache.normalized[ rowIndex ][ c.columns ].$row.eq( indx ).children().eq( column );
4237
+ arry.push( '' + ts.getElementText( c, child, column ) );
4238
+ }
4239
+ }
4213
4240
  }
4214
4241
  }
4215
4242
  }
@@ -1,4 +1,4 @@
1
- /*! TableSorter (FORK) v2.23.4 *//*
1
+ /*! TableSorter (FORK) v2.23.5 *//*
2
2
  * Client-side table sorting with ease!
3
3
  * @requires jQuery v1.2.6+
4
4
  *
@@ -25,7 +25,7 @@
25
25
 
26
26
  var ts = this;
27
27
 
28
- ts.version = '2.23.4';
28
+ ts.version = '2.23.5';
29
29
 
30
30
  ts.parsers = [];
31
31
  ts.widgets = [];
@@ -513,19 +513,27 @@
513
513
  }
514
514
 
515
515
  function updateHeader(table) {
516
- var index, s, $th, col,
516
+ var index, isDisabled, $th, col,
517
517
  c = table.config,
518
518
  len = c.$headers.length;
519
519
  for ( index = 0; index < len; index++ ) {
520
520
  $th = c.$headers.eq( index );
521
521
  col = ts.getColumnData( table, c.headers, index, true );
522
522
  // add 'sorter-false' class if 'parser-false' is set
523
- s = ts.getData( $th, col, 'sorter' ) === 'false' || ts.getData( $th, col, 'parser' ) === 'false';
524
- $th[0].sortDisabled = s;
525
- $th[ s ? 'addClass' : 'removeClass' ]('sorter-false').attr('aria-disabled', '' + s);
523
+ isDisabled = ts.getData( $th, col, 'sorter' ) === 'false' || ts.getData( $th, col, 'parser' ) === 'false';
524
+ $th[0].sortDisabled = isDisabled;
525
+ $th[ isDisabled ? 'addClass' : 'removeClass' ]( 'sorter-false' ).attr( 'aria-disabled', '' + isDisabled );
526
+ // disable tab index on disabled cells
527
+ if ( c.tabIndex ) {
528
+ if ( isDisabled ) {
529
+ $th.removeAttr( 'tabindex' );
530
+ } else {
531
+ $th.attr( 'tabindex', '0' );
532
+ }
533
+ }
526
534
  // aria-controls - requires table ID
527
535
  if (table.id) {
528
- if (s) {
536
+ if ( isDisabled ) {
529
537
  $th.removeAttr('aria-controls');
530
538
  } else {
531
539
  $th.attr('aria-controls', table.id);
@@ -4,7 +4,7 @@
4
4
  ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀▀██
5
5
  █████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
6
6
  */
7
- /*! tablesorter (FORK) - updated 09-23-2015 (v2.23.4)*/
7
+ /*! tablesorter (FORK) - updated 10-04-2015 (v2.23.5)*/
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 9/23/2015 (v2.23.4) *//*
375
+ /*! Widget: filter - updated 10/4/2015 (v2.23.5) *//*
376
376
  * Requires tablesorter v2.8+ and jQuery 1.7+
377
377
  * by Rob Garrison
378
378
  */
@@ -476,8 +476,8 @@
476
476
  // data.filters = array of filters for all columns ( some may be undefined )
477
477
  // data.filter = filter for the current column
478
478
  // data.iFilter = same as data.filter, except lowercase ( if wo.filter_ignoreCase is true )
479
- // data.exact = table cell text ( or parsed data if column parser enabled )
480
- // data.iExact = same as data.exact, except lowercase ( if wo.filter_ignoreCase is true )
479
+ // data.exact = table cell text ( or parsed data if column parser enabled; may be a number & not a string )
480
+ // data.iExact = same as data.exact, except lowercase ( if wo.filter_ignoreCase is true; may be a number & not a string )
481
481
  // data.cache = table cell text from cache, so it has been parsed ( & in all lower case if c.ignoreCase is true )
482
482
  // data.cacheArray = An array of parsed content from each table cell in the row being processed
483
483
  // data.index = column index; table = table element ( DOM )
@@ -1458,7 +1458,8 @@
1458
1458
  if ( fxn === true || hasSelect ) {
1459
1459
  // default selector uses exact match unless 'filter-match' class is found
1460
1460
  filterMatched = data.isMatch ?
1461
- data.iExact.search( data.iFilter ) >= 0 :
1461
+ // data.iExact may be a number
1462
+ ( '' + data.iExact ).search( data.iFilter ) >= 0 :
1462
1463
  data.filter === data.exact;
1463
1464
  } else if ( typeof fxn === 'function' ) {
1464
1465
  // filter callback( exact cell content, parser normalized content,
@@ -1497,7 +1498,7 @@
1497
1498
  return;
1498
1499
  }
1499
1500
  var len, norm_rows, rowData, $rows, $row, rowIndex, tbodyIndex, $tbody, columnIndex,
1500
- isChild, childRow, lastSearch, showRow, time, val, indx,
1501
+ isChild, childRow, lastSearch, showRow, showParent, time, val, indx,
1501
1502
  notFiltered, searchFiltered, query, injected, res, id, txt,
1502
1503
  storedFilters = $.extend( [], filters ),
1503
1504
  regex = tsf.regex,
@@ -1677,7 +1678,7 @@
1677
1678
  // a match anywhere in the child row, then it will make the row visible
1678
1679
  // checked here so the option can be changed dynamically
1679
1680
  for ( indx = 0; indx < childRow.length; indx++ ) {
1680
- txt += ' ' + childRow[indx].join( '' ) || '';
1681
+ txt += ' ' + childRow[indx].join( ' ' ) || '';
1681
1682
  }
1682
1683
  data.childRowText = wo.filter_childRows ?
1683
1684
  ( wo.filter_ignoreCase ? txt.toLowerCase() : txt ) :
@@ -1685,14 +1686,20 @@
1685
1686
  }
1686
1687
 
1687
1688
  showRow = false;
1688
- val = tsf.processRow( c, data, vars );
1689
+ showParent = tsf.processRow( c, data, vars );
1690
+ $row = rowData.$row;
1691
+
1692
+ // don't pass reference to val
1693
+ val = showParent ? true : false;
1689
1694
  childRow = rowData.$row.filter( ':gt( 0 )' );
1690
1695
  if ( wo.filter_childRows && childRow.length ) {
1691
- if ( !wo.filter_childWithSibs ) {
1692
- // hide all child rows
1693
- childRow.addClass( wo.filter_filteredRow );
1694
- }
1695
1696
  if ( wo.filter_childByColumn ) {
1697
+ if ( !wo.filter_childWithSibs ) {
1698
+ // hide all child rows
1699
+ childRow.addClass( wo.filter_filteredRow );
1700
+ // if only showing resulting child row, only include parent
1701
+ $row = $row.eq( 0 );
1702
+ }
1696
1703
  // cycle through each child row
1697
1704
  for ( indx = 0; indx < childRow.length; indx++ ) {
1698
1705
  data.$row = childRow.eq( indx );
@@ -1706,14 +1713,11 @@
1706
1713
  }
1707
1714
  }
1708
1715
  }
1716
+ // keep parent row match even if no child matches... see #1020
1717
+ showRow = showRow || showParent;
1709
1718
  } else {
1710
1719
  showRow = val;
1711
1720
  }
1712
- $row = rowData.$row;
1713
- // if only showing resulting child row, only include parent
1714
- if ( !wo.filter_childWithSibs ) {
1715
- $row = $row.eq( 0 );
1716
- }
1717
1721
  $row
1718
1722
  .toggleClass( wo.filter_filteredRow, !showRow )[0]
1719
1723
  .display = showRow ? '' : 'none';
@@ -1840,7 +1844,7 @@
1840
1844
  },
1841
1845
  getOptions: function( table, column, onlyAvail ) {
1842
1846
  table = $( table )[0];
1843
- var rowIndex, tbodyIndex, len, row, cache,
1847
+ var rowIndex, tbodyIndex, len, row, cache, indx, child, childLen,
1844
1848
  c = table.config,
1845
1849
  wo = c.widgetOptions,
1846
1850
  arry = [];
@@ -1863,9 +1867,24 @@
1863
1867
  c.parsers[column].parsed ||
1864
1868
  c.$headerIndexed[column].hasClass( 'filter-parsed' ) ) {
1865
1869
  arry.push( '' + cache.normalized[ rowIndex ][ column ] );
1870
+ // child row parsed data
1871
+ if ( wo.filter_childRows && wo.filter_childByColumn ) {
1872
+ childLen = cache.normalized[ rowIndex ][ c.columns ].$row.length - 1;
1873
+ for ( indx = 0; indx < childLen; indx++ ) {
1874
+ arry.push( '' + cache.normalized[ rowIndex ][ c.columns ].child[ indx ][ column ] );
1875
+ }
1876
+ }
1866
1877
  } else {
1867
1878
  // get raw cached data instead of content directly from the cells
1868
1879
  arry.push( cache.normalized[ rowIndex ][ c.columns ].raw[ column ] );
1880
+ // child row unparsed data
1881
+ if ( wo.filter_childRows && wo.filter_childByColumn ) {
1882
+ childLen = cache.normalized[ rowIndex ][ c.columns ].$row.length;
1883
+ for ( indx = 1; indx < childLen; indx++ ) {
1884
+ child = cache.normalized[ rowIndex ][ c.columns ].$row.eq( indx ).children().eq( column );
1885
+ arry.push( '' + ts.getElementText( c, child, column ) );
1886
+ }
1887
+ }
1869
1888
  }
1870
1889
  }
1871
1890
  }
@@ -1,4 +1,4 @@
1
- /*! Widget: filter - updated 9/23/2015 (v2.23.4) *//*
1
+ /*! Widget: filter - updated 10/4/2015 (v2.23.5) *//*
2
2
  * Requires tablesorter v2.8+ and jQuery 1.7+
3
3
  * by Rob Garrison
4
4
  */
@@ -102,8 +102,8 @@
102
102
  // data.filters = array of filters for all columns ( some may be undefined )
103
103
  // data.filter = filter for the current column
104
104
  // data.iFilter = same as data.filter, except lowercase ( if wo.filter_ignoreCase is true )
105
- // data.exact = table cell text ( or parsed data if column parser enabled )
106
- // data.iExact = same as data.exact, except lowercase ( if wo.filter_ignoreCase is true )
105
+ // data.exact = table cell text ( or parsed data if column parser enabled; may be a number & not a string )
106
+ // data.iExact = same as data.exact, except lowercase ( if wo.filter_ignoreCase is true; may be a number & not a string )
107
107
  // data.cache = table cell text from cache, so it has been parsed ( & in all lower case if c.ignoreCase is true )
108
108
  // data.cacheArray = An array of parsed content from each table cell in the row being processed
109
109
  // data.index = column index; table = table element ( DOM )
@@ -1084,7 +1084,8 @@
1084
1084
  if ( fxn === true || hasSelect ) {
1085
1085
  // default selector uses exact match unless 'filter-match' class is found
1086
1086
  filterMatched = data.isMatch ?
1087
- data.iExact.search( data.iFilter ) >= 0 :
1087
+ // data.iExact may be a number
1088
+ ( '' + data.iExact ).search( data.iFilter ) >= 0 :
1088
1089
  data.filter === data.exact;
1089
1090
  } else if ( typeof fxn === 'function' ) {
1090
1091
  // filter callback( exact cell content, parser normalized content,
@@ -1123,7 +1124,7 @@
1123
1124
  return;
1124
1125
  }
1125
1126
  var len, norm_rows, rowData, $rows, $row, rowIndex, tbodyIndex, $tbody, columnIndex,
1126
- isChild, childRow, lastSearch, showRow, time, val, indx,
1127
+ isChild, childRow, lastSearch, showRow, showParent, time, val, indx,
1127
1128
  notFiltered, searchFiltered, query, injected, res, id, txt,
1128
1129
  storedFilters = $.extend( [], filters ),
1129
1130
  regex = tsf.regex,
@@ -1303,7 +1304,7 @@
1303
1304
  // a match anywhere in the child row, then it will make the row visible
1304
1305
  // checked here so the option can be changed dynamically
1305
1306
  for ( indx = 0; indx < childRow.length; indx++ ) {
1306
- txt += ' ' + childRow[indx].join( '' ) || '';
1307
+ txt += ' ' + childRow[indx].join( ' ' ) || '';
1307
1308
  }
1308
1309
  data.childRowText = wo.filter_childRows ?
1309
1310
  ( wo.filter_ignoreCase ? txt.toLowerCase() : txt ) :
@@ -1311,14 +1312,20 @@
1311
1312
  }
1312
1313
 
1313
1314
  showRow = false;
1314
- val = tsf.processRow( c, data, vars );
1315
+ showParent = tsf.processRow( c, data, vars );
1316
+ $row = rowData.$row;
1317
+
1318
+ // don't pass reference to val
1319
+ val = showParent ? true : false;
1315
1320
  childRow = rowData.$row.filter( ':gt( 0 )' );
1316
1321
  if ( wo.filter_childRows && childRow.length ) {
1317
- if ( !wo.filter_childWithSibs ) {
1318
- // hide all child rows
1319
- childRow.addClass( wo.filter_filteredRow );
1320
- }
1321
1322
  if ( wo.filter_childByColumn ) {
1323
+ if ( !wo.filter_childWithSibs ) {
1324
+ // hide all child rows
1325
+ childRow.addClass( wo.filter_filteredRow );
1326
+ // if only showing resulting child row, only include parent
1327
+ $row = $row.eq( 0 );
1328
+ }
1322
1329
  // cycle through each child row
1323
1330
  for ( indx = 0; indx < childRow.length; indx++ ) {
1324
1331
  data.$row = childRow.eq( indx );
@@ -1332,14 +1339,11 @@
1332
1339
  }
1333
1340
  }
1334
1341
  }
1342
+ // keep parent row match even if no child matches... see #1020
1343
+ showRow = showRow || showParent;
1335
1344
  } else {
1336
1345
  showRow = val;
1337
1346
  }
1338
- $row = rowData.$row;
1339
- // if only showing resulting child row, only include parent
1340
- if ( !wo.filter_childWithSibs ) {
1341
- $row = $row.eq( 0 );
1342
- }
1343
1347
  $row
1344
1348
  .toggleClass( wo.filter_filteredRow, !showRow )[0]
1345
1349
  .display = showRow ? '' : 'none';
@@ -1466,7 +1470,7 @@
1466
1470
  },
1467
1471
  getOptions: function( table, column, onlyAvail ) {
1468
1472
  table = $( table )[0];
1469
- var rowIndex, tbodyIndex, len, row, cache,
1473
+ var rowIndex, tbodyIndex, len, row, cache, indx, child, childLen,
1470
1474
  c = table.config,
1471
1475
  wo = c.widgetOptions,
1472
1476
  arry = [];
@@ -1489,9 +1493,24 @@
1489
1493
  c.parsers[column].parsed ||
1490
1494
  c.$headerIndexed[column].hasClass( 'filter-parsed' ) ) {
1491
1495
  arry.push( '' + cache.normalized[ rowIndex ][ column ] );
1496
+ // child row parsed data
1497
+ if ( wo.filter_childRows && wo.filter_childByColumn ) {
1498
+ childLen = cache.normalized[ rowIndex ][ c.columns ].$row.length - 1;
1499
+ for ( indx = 0; indx < childLen; indx++ ) {
1500
+ arry.push( '' + cache.normalized[ rowIndex ][ c.columns ].child[ indx ][ column ] );
1501
+ }
1502
+ }
1492
1503
  } else {
1493
1504
  // get raw cached data instead of content directly from the cells
1494
1505
  arry.push( cache.normalized[ rowIndex ][ c.columns ].raw[ column ] );
1506
+ // child row unparsed data
1507
+ if ( wo.filter_childRows && wo.filter_childByColumn ) {
1508
+ childLen = cache.normalized[ rowIndex ][ c.columns ].$row.length;
1509
+ for ( indx = 1; indx < childLen; indx++ ) {
1510
+ child = cache.normalized[ rowIndex ][ c.columns ].$row.eq( indx ).children().eq( column );
1511
+ arry.push( '' + ts.getElementText( c, child, column ) );
1512
+ }
1513
+ }
1495
1514
  }
1496
1515
  }
1497
1516
  }
@@ -1,4 +1,4 @@
1
- /*! Widget: Pager - updated 8/19/2015 (v2.23.1) */
1
+ /*! Widget: Pager - updated 10/4/2015 (v2.23.5) */
2
2
  /* Requires tablesorter v2.8+ and jQuery 1.7+
3
3
  * by Rob Garrison
4
4
  */
@@ -171,6 +171,7 @@
171
171
  p.oldAjaxSuccess = p.oldAjaxSuccess || wo.pager_ajaxObject.success;
172
172
  c.appender = tsp.appender;
173
173
  p.initializing = true;
174
+ p.showAll = false;
174
175
  if (wo.pager_savePages && ts.storage) {
175
176
  t = ts.storage(table, wo.pager_storageKey) || {}; // fixes #387
176
177
  p.page = ( isNaN(t.page) ? p.page : t.page ) || p.setPage || 0;
@@ -878,7 +879,7 @@
878
879
  }
879
880
  c.$table.trigger('pagerChange', c);
880
881
  }
881
- if ( !wo.pager_removeRows ) {
882
+ if ( !wo.pager_removeRows && !p.showAll ) {
882
883
  tsp.hideRows(table, c);
883
884
  } else {
884
885
  ts.clearTableBody(table);
@@ -921,17 +922,18 @@
921
922
  if ( p.ajax ) {
922
923
  tsp.pagerArrows(c, true);
923
924
  } else {
924
- p.isDisabled = true;
925
925
  $.data(table, 'pagerLastPage', p.page);
926
926
  $.data(table, 'pagerLastSize', p.size);
927
927
  p.page = 0;
928
928
  p.size = p.totalRows;
929
929
  p.totalPages = 1;
930
+ p.showAll = true;
930
931
  c.$table
931
932
  .addClass('pagerDisabled')
932
933
  .removeAttr('aria-describedby')
933
934
  .find('tr.pagerSavedHeightSpacer').remove();
934
935
  tsp.renderTable(table, c.rowsCopy);
936
+ p.isDisabled = true;
935
937
  c.$table.trigger('applyWidgets');
936
938
  if (c.debug) {
937
939
  console.log('Pager: Disabled');
@@ -1100,6 +1102,7 @@
1100
1102
  enablePager: function(table, c, triggered){
1101
1103
  var info, p = c.pager;
1102
1104
  p.isDisabled = false;
1105
+ p.showAll = false;
1103
1106
  p.page = $.data(table, 'pagerLastPage') || p.page || 0;
1104
1107
  p.size = $.data(table, 'pagerLastSize') || parseInt(p.$size.find('option[selected]').val(), 10) || p.size || p.setSize || 10;
1105
1108
  p.$size.val(p.size); // set page size
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.18.4
4
+ version: 1.18.5
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-09-23 00:00:00.000000000 Z
12
+ date: 2015-10-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties