datatables.net 2.1.3 → 2.1.4

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.
package/js/dataTables.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! DataTables 2.1.3
1
+ /*! DataTables 2.1.4
2
2
  * © SpryMedia Ltd - datatables.net/license
3
3
  */
4
4
 
@@ -8429,8 +8429,10 @@ var __column_selector = function ( settings, selector, opts )
8429
8429
  switch( match[2] ) {
8430
8430
  case 'visIdx':
8431
8431
  case 'visible':
8432
- if (match[1]) {
8432
+ // Selector is a column index
8433
+ if (match[1] && match[1].match(/^\d+$/)) {
8433
8434
  var idx = parseInt( match[1], 10 );
8435
+
8434
8436
  // Visible index given, convert to column index
8435
8437
  if ( idx < 0 ) {
8436
8438
  // Counting from the right
@@ -8443,9 +8445,19 @@ var __column_selector = function ( settings, selector, opts )
8443
8445
  return [ _fnVisibleToColumnIndex( settings, idx ) ];
8444
8446
  }
8445
8447
 
8446
- // `:visible` on its own
8447
- return columns.map( function (col, i) {
8448
- return col.bVisible ? i : null;
8448
+ return columns.map( function (col, idx) {
8449
+ // Not visible, can't match
8450
+ if (! col.bVisible) {
8451
+ return null;
8452
+ }
8453
+
8454
+ // Selector
8455
+ if (match[1]) {
8456
+ return $(nodes[idx]).filter(match[1]).length > 0 ? idx : null;
8457
+ }
8458
+
8459
+ // `:visible` on its own
8460
+ return idx;
8449
8461
  } );
8450
8462
 
8451
8463
  case 'name':
@@ -9758,7 +9770,7 @@ _api_register( 'i18n()', function ( token, def, plural ) {
9758
9770
  * @type string
9759
9771
  * @default Version number
9760
9772
  */
9761
- DataTable.version = "2.1.3";
9773
+ DataTable.version = "2.1.4";
9762
9774
 
9763
9775
  /**
9764
9776
  * Private data store, containing all of the settings objects that are
@@ -12432,7 +12444,7 @@ DataTable.type('string', {
12432
12444
  pre: function ( a ) {
12433
12445
  // This is a little complex, but faster than always calling toString,
12434
12446
  // http://jsperf.com/tostring-v-check
12435
- return _empty(a) ?
12447
+ return _empty(a) && typeof a !== 'boolean' ?
12436
12448
  '' :
12437
12449
  typeof a === 'string' ?
12438
12450
  a.toLowerCase() :
@@ -12685,6 +12697,12 @@ $.extend( true, DataTable.ext.renderer, {
12685
12697
  return; // table, not a nested one
12686
12698
  }
12687
12699
 
12700
+ var sorting = ctx.sortDetails;
12701
+
12702
+ if (! sorting) {
12703
+ return;
12704
+ }
12705
+
12688
12706
  var i;
12689
12707
  var orderClasses = classes.order;
12690
12708
  var columns = ctx.api.columns( cell );
@@ -12693,7 +12711,6 @@ $.extend( true, DataTable.ext.renderer, {
12693
12711
  var ariaType = '';
12694
12712
  var indexes = columns.indexes();
12695
12713
  var sortDirs = columns.orderable(true).flatten();
12696
- var sorting = ctx.sortDetails;
12697
12714
  var orderedColumns = _pluck(sorting, 'col');
12698
12715
 
12699
12716
  cell
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "main": "js/dataTables.js",
5
5
  "module": "js/dataTables.mjs",
6
6
  "types": "./types/types.d.ts",
7
- "version": "2.1.3",
7
+ "version": "2.1.4",
8
8
  "files": [
9
9
  "js/**/*.js",
10
10
  "js/**/*.mjs",