jquery-tablesorter 1.25.2 → 1.25.3

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
  SHA256:
3
- metadata.gz: 8039d6c6912e9020070720031d032dc6a846c3b44488628c99b37335501880d6
4
- data.tar.gz: 215c76affe6665b365c61c6bd13a3eee7fb79075809d176d4b0a04fae4076a14
3
+ metadata.gz: 399ce1eb8dfcc00ed8a3e379abb73b09a06d1522fd5733979fb6035b3ab6020d
4
+ data.tar.gz: 8abb6a4ae65d197c0d8a6c2d60f14993d5832fff1fa12c9187061c900353ce75
5
5
  SHA512:
6
- metadata.gz: ed0e703095111a3c3067af76acf6e1df80e549e888145253214c5a85c430329e97b8ae657cb5f606e42455a9a9ce9ff78010603bb1d41d87df6a2afc28bc14f9
7
- data.tar.gz: '0685917b972a98fd92354283eddfe5d8f16acfd48313cccb94f1376c4bf07b021f07663301d7ca3e94df0efc8d491f4c0380130af602ca6f2069c6f9f1456e8e'
6
+ metadata.gz: ea64ee05e5a9405e6d0790b0240eac7d29d3425b29ebab8f17271f8ddeb0feed417219b21418c9424c4856bef7cce30fb6fb0624b53f501ae91126c7083ea38f
7
+ data.tar.gz: 845d8c0a53b82ad2a945b26658838c53a739ac825b6b906fa3cb8ba096fe8c2f9601a9b1cc9ab81168fbb7e417027a979faa8b275c1bc7ec94f8379afdc0671f
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.30.4 (2018-05-16) [documentation]
7
+ Current tablesorter version: 2.30.5 (2018-05-28) [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 = 25
4
- TINY = 2
4
+ TINY = 3
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 2018-05-16 (v2.30.4)*/
7
+ /*! tablesorter (FORK) - updated 2018-05-28 (v2.30.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(jQuery) {
18
18
 
19
- /*! TableSorter (FORK) v2.30.4 *//*
19
+ /*! TableSorter (FORK) v2.30.5 *//*
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.30.4',
43
+ version : '2.30.5',
44
44
 
45
45
  parsers : [],
46
46
  widgets : [],
@@ -524,10 +524,13 @@
524
524
  return;
525
525
  }
526
526
  downTarget = null;
527
+ $cell = ts.getClosest( $( this ), '.' + ts.css.header );
527
528
  // prevent sort being triggered on form elements
528
529
  if ( ts.regex.formElements.test( e.target.nodeName ) ||
529
530
  // nosort class name, or elements within a nosort container
530
531
  $target.hasClass( c.cssNoSort ) || $target.parents( '.' + c.cssNoSort ).length > 0 ||
532
+ // disabled cell directly clicked
533
+ $cell.hasClass( 'sorter-false' ) ||
531
534
  // elements within a button
532
535
  $target.parents( 'button' ).length > 0 ) {
533
536
  return !c.cancelSelection;
@@ -535,7 +538,6 @@
535
538
  if ( c.delayInit && ts.isEmptyObject( c.cache ) ) {
536
539
  ts.buildCache( c );
537
540
  }
538
- $cell = ts.getClosest( $( this ), '.' + ts.css.header );
539
541
  // use column index from data-attribute or index of current row; fixes #1116
540
542
  c.last.clickedIndex = $cell.attr( 'data-column' ) || $cell.index();
541
543
  cell = c.$headerIndexed[ c.last.clickedIndex ][0];
@@ -1,4 +1,4 @@
1
- /*! TableSorter (FORK) v2.30.4 *//*
1
+ /*! TableSorter (FORK) v2.30.5 *//*
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.30.4',
25
+ version : '2.30.5',
26
26
 
27
27
  parsers : [],
28
28
  widgets : [],
@@ -506,10 +506,13 @@
506
506
  return;
507
507
  }
508
508
  downTarget = null;
509
+ $cell = ts.getClosest( $( this ), '.' + ts.css.header );
509
510
  // prevent sort being triggered on form elements
510
511
  if ( ts.regex.formElements.test( e.target.nodeName ) ||
511
512
  // nosort class name, or elements within a nosort container
512
513
  $target.hasClass( c.cssNoSort ) || $target.parents( '.' + c.cssNoSort ).length > 0 ||
514
+ // disabled cell directly clicked
515
+ $cell.hasClass( 'sorter-false' ) ||
513
516
  // elements within a button
514
517
  $target.parents( 'button' ).length > 0 ) {
515
518
  return !c.cancelSelection;
@@ -517,7 +520,6 @@
517
520
  if ( c.delayInit && ts.isEmptyObject( c.cache ) ) {
518
521
  ts.buildCache( c );
519
522
  }
520
- $cell = ts.getClosest( $( this ), '.' + ts.css.header );
521
523
  // use column index from data-attribute or index of current row; fixes #1116
522
524
  c.last.clickedIndex = $cell.attr( 'data-column' ) || $cell.index();
523
525
  cell = c.$headerIndexed[ c.last.clickedIndex ][0];
@@ -4,7 +4,7 @@
4
4
  ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀ ▀▀▀██
5
5
  █████▀ ▀████▀ ██ ██ ▀████▀ ██ ██ ██ ██ ▀████▀ █████▀ ██ ██ █████▀
6
6
  */
7
- /*! tablesorter (FORK) - updated 2018-05-16 (v2.30.4)*/
7
+ /*! tablesorter (FORK) - updated 2018-05-28 (v2.30.5)*/
8
8
  /* Includes widgets ( storage,uitheme,columns,filter,stickyHeaders,resizable,saveSort ) */
9
9
  (function(factory) {
10
10
  if (typeof define === 'function' && define.amd) {
@@ -74,7 +74,7 @@
74
74
  // process rowspans
75
75
  if ($cell.filter('[rowspan]').length) {
76
76
  rowspanLen = parseInt( $cell.attr('rowspan'), 10) - 1;
77
- txt = output.formatData( c, wo, $cell, isHeader );
77
+ txt = output.formatData( c, wo, $cell, isHeader, indx );
78
78
  for (row = 1; row <= rowspanLen; row++) {
79
79
  if (!tmpRow[rowIndex + row]) { tmpRow[rowIndex + row] = []; }
80
80
  tmpRow[rowIndex + row][cellIndex] = isHeader ? txt : dupe ? txt : '';
@@ -84,7 +84,7 @@
84
84
  if ($cell.filter('[colspan]').length) {
85
85
  colspanLen = parseInt( $cell.attr('colspan'), 10) - 1;
86
86
  // allow data-attribute to be an empty string
87
- txt = output.formatData( c, wo, $cell, isHeader );
87
+ txt = output.formatData( c, wo, $cell, isHeader, indx );
88
88
  for (col = 0; col < colspanLen; col++) {
89
89
  // if we're processing the header & making JSON, the header names need to be unique
90
90
  if ($cell.filter('[rowspan]').length) {
@@ -107,7 +107,7 @@
107
107
  while (typeof tmpRow[rowIndex][cellIndex] !== 'undefined') { cellIndex++; }
108
108
 
109
109
  tmpRow[rowIndex][cellIndex] = tmpRow[rowIndex][cellIndex] ||
110
- output.formatData( c, wo, $cell, isHeader );
110
+ output.formatData( c, wo, $cell, isHeader, cellIndex );
111
111
  cellIndex++;
112
112
  }
113
113
  }
@@ -264,7 +264,7 @@
264
264
  return json;
265
265
  },
266
266
 
267
- formatData : function(c, wo, $el, isHeader) {
267
+ formatData : function(c, wo, $el, isHeader, colIndex) {
268
268
  var attr = $el.attr(wo.output_dataAttrib),
269
269
  txt = typeof attr !== 'undefined' ? attr : $el.html(),
270
270
  quotes = (wo.output_separator || ',').toLowerCase(),
@@ -288,13 +288,14 @@
288
288
  // JSON & array outputs don't need quotes
289
289
  quotes = separator ? false : wo.output_wrapQuotes || wo.output_regex.test(result) || output.regexQuote.test(result);
290
290
  result = quotes ? '"' + result + '"' : result;
291
-
292
291
  // formatting callback - added v2.22.4
293
292
  if ( typeof wo.output_formatContent === 'function' ) {
294
293
  return wo.output_formatContent( c, wo, {
295
- isHeader : isHeader,
294
+ isHeader : isHeader || false,
296
295
  $cell : $el,
297
- content : result
296
+ content : result,
297
+ columnIndex: colIndex,
298
+ parsed: c.parsers[colIndex].format(result, c.table, $el[0], colIndex)
298
299
  });
299
300
  }
300
301
 
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.25.2
4
+ version: 1.25.3
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: 2018-05-21 00:00:00.000000000 Z
12
+ date: 2018-06-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties