datatables.net 1.10.21 → 1.10.25

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/License.txt CHANGED
@@ -1,3 +1,5 @@
1
+ The MIT License (MIT)
2
+
1
3
  Copyright SpryMedia Limited and other contributors
2
4
  http://datatables.net
3
5
 
@@ -17,4 +19,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
19
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
20
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
21
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20
- THE SOFTWARE.
22
+ THE SOFTWARE.
package/Readme.md CHANGED
@@ -1,50 +1 @@
1
- # DataTables for jQuery
2
-
3
- This package contains distribution files for the [DataTables library](https://datatables.net) for [jQuery](http://jquery.com/). Only the core software for this library is contained in this package - to be correctly styled, a styling package for DataTables must also be included. Styling options include DataTable's native styling, [Bootstrap](http://getbootstrap.com) and [Foundation](http://foundation.zurb.com/).
4
-
5
- DataTables is a table enhancing library which adds features such as paging, ordering, search, scrolling and many more to a static HTML page. A comprehensive API is also available that can be used to manipulate the table. Please refer to the [DataTables web-site](//datatables.net) for a full range of documentation and examples.
6
-
7
-
8
- ## Installation
9
-
10
- ### Browser
11
-
12
- For inclusion of this library using a standard `<script>` tag, rather than using this package, it is recommended that you use the [DataTables download builder](//datatables.net/download) which can create CDN or locally hosted packages for you, will all dependencies satisfied.
13
-
14
- ### npm
15
-
16
- ```
17
- npm install datatables.net
18
- ```
19
-
20
- ```
21
- var $ = require( 'jquery' );
22
- require( 'datatables.net' )( window, $ );
23
- ```
24
-
25
- ### bower
26
-
27
- ```
28
- bower install --save datatables.net
29
- ```
30
-
31
-
32
-
33
- ## Documentation
34
-
35
- Full documentation of the DataTables options, API and plug-in interface are available on the DOCS_LINK. The site also contains information on the wide variety of plug-ins that are available for DataTables, which can be used to enhance and customise your table even further.
36
-
37
-
38
- ## Bug / Support
39
-
40
- Support for DataTables is available through the [DataTables forums](//datatables.net/forums) and [commercial support options](//datatables.net/support) are available.
41
-
42
-
43
- ### Contributing
44
-
45
- If you are thinking of contributing code to DataTables, first of all, thank you! All fixes, patches and enhancements to DataTables are very warmly welcomed. This repository is a distribution repo, so patches and issues sent to this repo will not be accepted. Instead, please direct pull requests to the [DataTables/DataTablesSrc](http://github.com/DataTables/DataTablesSrc). For issues / bugs, please direct your questions to the [DataTables forums](//datatables.net/forums).
46
-
47
-
48
- ## License
49
-
50
- This software is released under the [MIT license](//datatables.net/license). You are free to use, modify and distribute this software, but all copyright information must remain.
1
+ # DataTables for jQuery This package contains distribution files for the [DataTables library](https://datatables.net) for [jQuery](http://jquery.com/). Only the core software for this library is contained in this package - to be correctly styled, a styling package for DataTables must also be included. Styling options include DataTable's native styling, [Bootstrap](http://getbootstrap.com) and [Foundation](http://foundation.zurb.com/). DataTables is a table enhancing library which adds features such as paging, ordering, search, scrolling and many more to a static HTML page. A comprehensive API is also available that can be used to manipulate the table. Please refer to the [DataTables web-site](//datatables.net) for a full range of documentation and examples. ## Installation ### Browser For inclusion of this library using a standard `<script>` tag, rather than using this package, it is recommended that you use the [DataTables download builder](//datatables.net/download) which can create CDN or locally hosted packages \for you, will all dependencies satisfied. ### npm ``` npm install datatables.net ``` ES3 Syntax ``` var $ = require( 'jquery' ); require( 'datatables.net' )( window, $ ); ``` ES6 Syntax ``` import 'datatables.net' ``` ### bower ``` bower install --save datatables.net ``` ## Documentation Full documentation of the DataTables options, API and plug-in interface are available on the [website](https://datatables.net/reference/index). The site also contains information on the wide variety of plug-ins that are available for DataTables, which can be used to enhance and customise your table even further. ## Bug / Support Support for DataTables is available through the [DataTables forums](//datatables.net/forums) and [commercial support options](//datatables.net/support) are available. ### Contributing If you are thinking of contributing code to DataTables, first of all, thank you! All fixes, patches and enhancements to DataTables are very warmly welcomed. This repository is a distribution repo, so patches and issues sent to this repo will not be accepted. Instead, please direct pull requests to the [DataTables/DataTablesSrc](http://github.com/DataTables/DataTablesSrc). For issues / bugs, please direct your questions to the [DataTables forums](//datatables.net/forums). ## License This software is released under the [MIT license](//datatables.net/license). You are free to use, modify and distribute this software, but all copyright information must remain.
@@ -1,15 +1,15 @@
1
- /*! DataTables 1.10.21
2
- * ©2008-2020 SpryMedia Ltd - datatables.net/license
1
+ /*! DataTables 1.10.25
2
+ * ©2008-2021 SpryMedia Ltd - datatables.net/license
3
3
  */
4
4
 
5
5
  /**
6
6
  * @summary DataTables
7
7
  * @description Paginate, search and order HTML tables
8
- * @version 1.10.21
8
+ * @version 1.10.25
9
9
  * @file jquery.dataTables.js
10
10
  * @author SpryMedia Ltd
11
11
  * @contact www.datatables.net
12
- * @copyright Copyright 2008-2020 SpryMedia Ltd.
12
+ * @copyright Copyright 2008-2021 SpryMedia Ltd.
13
13
  *
14
14
  * This source file is free software, available under the following license:
15
15
  * MIT license - http://datatables.net/license
@@ -251,7 +251,7 @@
251
251
  var api = this.api( true );
252
252
 
253
253
  /* Check if we want to add multiple rows or not */
254
- var rows = $.isArray(data) && ( $.isArray(data[0]) || $.isPlainObject(data[0]) ) ?
254
+ var rows = Array.isArray(data) && ( Array.isArray(data[0]) || $.isPlainObject(data[0]) ) ?
255
255
  api.rows.add( data ) :
256
256
  api.row.add( data );
257
257
 
@@ -975,7 +975,7 @@
975
975
  // If the length menu is given, but the init display length is not, use the length menu
976
976
  if ( oInit.aLengthMenu && ! oInit.iDisplayLength )
977
977
  {
978
- oInit.iDisplayLength = $.isArray( oInit.aLengthMenu[0] ) ?
978
+ oInit.iDisplayLength = Array.isArray( oInit.aLengthMenu[0] ) ?
979
979
  oInit.aLengthMenu[0][0] : oInit.aLengthMenu[0];
980
980
  }
981
981
 
@@ -1066,7 +1066,7 @@
1066
1066
  if ( oInit.iDeferLoading !== null )
1067
1067
  {
1068
1068
  oSettings.bDeferLoading = true;
1069
- var tmp = $.isArray( oInit.iDeferLoading );
1069
+ var tmp = Array.isArray( oInit.iDeferLoading );
1070
1070
  oSettings._iRecordsDisplay = tmp ? oInit.iDeferLoading[0] : oInit.iDeferLoading;
1071
1071
  oSettings._iRecordsTotal = tmp ? oInit.iDeferLoading[1] : oInit.iDeferLoading;
1072
1072
  }
@@ -1088,6 +1088,8 @@
1088
1088
  _fnLanguageCompat( json );
1089
1089
  _fnCamelToHungarian( defaults.oLanguage, json );
1090
1090
  $.extend( true, oLanguage, json );
1091
+
1092
+ _fnCallbackFire( oSettings, null, 'i18n', [oSettings]);
1091
1093
  _fnInitialise( oSettings );
1092
1094
  },
1093
1095
  error: function () {
@@ -1097,6 +1099,9 @@
1097
1099
  } );
1098
1100
  bInitHandedOff = true;
1099
1101
  }
1102
+ else {
1103
+ _fnCallbackFire( oSettings, null, 'i18n', [oSettings]);
1104
+ }
1100
1105
 
1101
1106
  /*
1102
1107
  * Stripes
@@ -1248,7 +1253,7 @@
1248
1253
 
1249
1254
  var tbody = $this.children('tbody');
1250
1255
  if ( tbody.length === 0 ) {
1251
- tbody = $('<tbody/>').appendTo($this);
1256
+ tbody = $('<tbody/>').insertAfter(thead);
1252
1257
  }
1253
1258
  oSettings.nTBody = tbody[0];
1254
1259
 
@@ -1356,7 +1361,7 @@
1356
1361
  // - Ƀ - Bitcoin
1357
1362
  // - Ξ - Ethereum
1358
1363
  // standards as thousands separators.
1359
- var _re_formatted_numeric = /[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi;
1364
+ var _re_formatted_numeric = /['\u00A0,$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi;
1360
1365
 
1361
1366
 
1362
1367
  var _empty = function ( d ) {
@@ -1584,6 +1589,36 @@
1584
1589
  return out;
1585
1590
  };
1586
1591
 
1592
+ // Surprisingly this is faster than [].concat.apply
1593
+ // https://jsperf.com/flatten-an-array-loop-vs-reduce/2
1594
+ var _flatten = function (out, val) {
1595
+ if (Array.isArray(val)) {
1596
+ for (var i=0 ; i<val.length ; i++) {
1597
+ _flatten(out, val[i]);
1598
+ }
1599
+ }
1600
+ else {
1601
+ out.push(val);
1602
+ }
1603
+
1604
+ return out;
1605
+ }
1606
+
1607
+ // Array.isArray polyfill.
1608
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray
1609
+ if (! Array.isArray) {
1610
+ Array.isArray = function(arg) {
1611
+ return Object.prototype.toString.call(arg) === '[object Array]';
1612
+ };
1613
+ }
1614
+
1615
+ // .trim() polyfill
1616
+ // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trim
1617
+ if (!String.prototype.trim) {
1618
+ String.prototype.trim = function () {
1619
+ return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, '');
1620
+ };
1621
+ }
1587
1622
 
1588
1623
  /**
1589
1624
  * DataTables utility methods
@@ -1841,7 +1876,7 @@
1841
1876
 
1842
1877
  // orderData can be given as an integer
1843
1878
  var dataSort = init.aDataSort;
1844
- if ( typeof dataSort === 'number' && ! $.isArray( dataSort ) ) {
1879
+ if ( typeof dataSort === 'number' && ! Array.isArray( dataSort ) ) {
1845
1880
  init.aDataSort = [ dataSort ];
1846
1881
  }
1847
1882
  }
@@ -2273,8 +2308,9 @@
2273
2308
  }
2274
2309
 
2275
2310
  // Only a single match is needed for html type since it is
2276
- // bottom of the pile and very similar to string
2277
- if ( detectedType === 'html' ) {
2311
+ // bottom of the pile and very similar to string - but it
2312
+ // must not be empty
2313
+ if ( detectedType === 'html' && ! _empty(cache[k]) ) {
2278
2314
  break;
2279
2315
  }
2280
2316
  }
@@ -2325,7 +2361,7 @@
2325
2361
  def.targets :
2326
2362
  def.aTargets;
2327
2363
 
2328
- if ( ! $.isArray( aTargets ) )
2364
+ if ( ! Array.isArray( aTargets ) )
2329
2365
  {
2330
2366
  aTargets = [ aTargets ];
2331
2367
  }
@@ -2644,7 +2680,7 @@
2644
2680
  innerSrc = a.join('.');
2645
2681
 
2646
2682
  // Traverse each entry in the array getting the properties requested
2647
- if ( $.isArray( data ) ) {
2683
+ if ( Array.isArray( data ) ) {
2648
2684
  for ( var j=0, jLen=data.length ; j<jLen ; j++ ) {
2649
2685
  out.push( fetchData( data[j], type, innerSrc ) );
2650
2686
  }
@@ -2732,6 +2768,11 @@
2732
2768
 
2733
2769
  for ( var i=0, iLen=a.length-1 ; i<iLen ; i++ )
2734
2770
  {
2771
+ // Protect against prototype pollution
2772
+ if (a[i] === '__proto__' || a[i] === 'constructor') {
2773
+ throw new Error('Cannot set prototype values');
2774
+ }
2775
+
2735
2776
  // Check if we are dealing with an array notation request
2736
2777
  arrayNotation = a[i].match(__reArray);
2737
2778
  funcNotation = a[i].match(__reFn);
@@ -2747,7 +2788,7 @@
2747
2788
  innerSrc = b.join('.');
2748
2789
 
2749
2790
  // Traverse each entry in the array setting the properties requested
2750
- if ( $.isArray( val ) )
2791
+ if ( Array.isArray( val ) )
2751
2792
  {
2752
2793
  for ( var j=0, jLen=val.length ; j<jLen ; j++ )
2753
2794
  {
@@ -2994,7 +3035,7 @@
2994
3035
  var cellProcess = function ( cell ) {
2995
3036
  if ( colIdx === undefined || colIdx === i ) {
2996
3037
  col = columns[i];
2997
- contents = $.trim(cell.innerHTML);
3038
+ contents = (cell.innerHTML).trim();
2998
3039
 
2999
3040
  if ( col && col._bAttrSrc ) {
3000
3041
  var setter = _fnSetObjectDataFn( col.mData._ );
@@ -3110,7 +3151,7 @@
3110
3151
  cells.push( nTd );
3111
3152
 
3112
3153
  // Need to create the HTML if new, or if a rendering function is defined
3113
- if ( create || ((!nTrIn || oCol.mRender || oCol.mData !== i) &&
3154
+ if ( create || ((oCol.mRender || oCol.mData !== i) &&
3114
3155
  (!$.isPlainObject(oCol.mData) || oCol.mData._ !== i+'.display')
3115
3156
  )) {
3116
3157
  nTd.innerHTML = _fnGetCellData( oSettings, iRow, i, 'display' );
@@ -3142,10 +3183,6 @@
3142
3183
 
3143
3184
  _fnCallbackFire( oSettings, 'aoRowCreatedCallback', null, [nTr, rowData, iRow, cells] );
3144
3185
  }
3145
-
3146
- // Remove once webkit bug 131819 and Chromium bug 365619 have been resolved
3147
- // and deployed
3148
- row.nTr.setAttribute( 'role', 'row' );
3149
3186
  }
3150
3187
 
3151
3188
 
@@ -3244,11 +3281,11 @@
3244
3281
  }
3245
3282
 
3246
3283
  /* ARIA role for the rows */
3247
- $(thead).find('>tr').attr('role', 'row');
3284
+ $(thead).children('tr').attr('role', 'row');
3248
3285
 
3249
3286
  /* Deal with the footer - add classes if required */
3250
- $(thead).find('>tr>th, >tr>td').addClass( classes.sHeaderTH );
3251
- $(tfoot).find('>tr>th, >tr>td').addClass( classes.sFooterTH );
3287
+ $(thead).children('tr').children('th, td').addClass( classes.sHeaderTH );
3288
+ $(tfoot).children('tr').children('th, td').addClass( classes.sFooterTH );
3252
3289
 
3253
3290
  // Cache the footer cells. Note that we only take the cells from the first
3254
3291
  // row in the footer. If there is more than one row the user wants to
@@ -3378,9 +3415,10 @@
3378
3415
  /**
3379
3416
  * Insert the required TR nodes into the table for display
3380
3417
  * @param {object} oSettings dataTables settings object
3418
+ * @param ajaxComplete true after ajax call to complete rendering
3381
3419
  * @memberof DataTable#oApi
3382
3420
  */
3383
- function _fnDraw( oSettings )
3421
+ function _fnDraw( oSettings, ajaxComplete )
3384
3422
  {
3385
3423
  /* Provide a pre-callback function which can be used to cancel the draw is false is returned */
3386
3424
  var aPreDraw = _fnCallbackFire( oSettings, 'aoPreDrawCallback', 'preDraw', [oSettings] );
@@ -3429,8 +3467,9 @@
3429
3467
  {
3430
3468
  oSettings.iDraw++;
3431
3469
  }
3432
- else if ( !oSettings.bDestroying && !_fnAjaxUpdate( oSettings ) )
3470
+ else if ( !oSettings.bDestroying && !ajaxComplete)
3433
3471
  {
3472
+ _fnAjaxUpdate( oSettings );
3434
3473
  return;
3435
3474
  }
3436
3475
 
@@ -3834,7 +3873,7 @@
3834
3873
 
3835
3874
  // Convert to object based for 1.10+ if using the old array scheme which can
3836
3875
  // come from server-side processing or serverParams
3837
- if ( data && $.isArray(data) ) {
3876
+ if ( data && Array.isArray(data) ) {
3838
3877
  var tmp = {};
3839
3878
  var rbracket = /(.*?)\[\]$/;
3840
3879
 
@@ -3962,21 +4001,16 @@
3962
4001
  */
3963
4002
  function _fnAjaxUpdate( settings )
3964
4003
  {
3965
- if ( settings.bAjaxDataGet ) {
3966
- settings.iDraw++;
3967
- _fnProcessingDisplay( settings, true );
3968
-
3969
- _fnBuildAjax(
3970
- settings,
3971
- _fnAjaxParameters( settings ),
3972
- function(json) {
3973
- _fnAjaxUpdateDraw( settings, json );
3974
- }
3975
- );
4004
+ settings.iDraw++;
4005
+ _fnProcessingDisplay( settings, true );
3976
4006
 
3977
- return false;
3978
- }
3979
- return true;
4007
+ _fnBuildAjax(
4008
+ settings,
4009
+ _fnAjaxParameters( settings ),
4010
+ function(json) {
4011
+ _fnAjaxUpdateDraw( settings, json );
4012
+ }
4013
+ );
3980
4014
  }
3981
4015
 
3982
4016
 
@@ -4129,14 +4163,12 @@
4129
4163
  }
4130
4164
  settings.aiDisplay = settings.aiDisplayMaster.slice();
4131
4165
 
4132
- settings.bAjaxDataGet = false;
4133
- _fnDraw( settings );
4166
+ _fnDraw( settings, true );
4134
4167
 
4135
4168
  if ( ! settings._bInitComplete ) {
4136
4169
  _fnInitComplete( settings, json );
4137
4170
  }
4138
4171
 
4139
- settings.bAjaxDataGet = true;
4140
4172
  _fnProcessingDisplay( settings, false );
4141
4173
  }
4142
4174
 
@@ -4819,7 +4851,7 @@
4819
4851
  classes = settings.oClasses,
4820
4852
  tableId = settings.sTableId,
4821
4853
  menu = settings.aLengthMenu,
4822
- d2 = $.isArray( menu[0] ),
4854
+ d2 = Array.isArray( menu[0] ),
4823
4855
  lengths = d2 ? menu[0] : menu,
4824
4856
  language = d2 ? menu[1] : menu;
4825
4857
 
@@ -5865,7 +5897,7 @@
5865
5897
  fixedObj = $.isPlainObject( fixed ),
5866
5898
  nestedSort = [],
5867
5899
  add = function ( a ) {
5868
- if ( a.length && ! $.isArray( a[0] ) ) {
5900
+ if ( a.length && ! Array.isArray( a[0] ) ) {
5869
5901
  // 1D array
5870
5902
  nestedSort.push( a );
5871
5903
  }
@@ -5877,7 +5909,7 @@
5877
5909
 
5878
5910
  // Build the sort array, with pre-fix and post-fix options if they have been
5879
5911
  // specified
5880
- if ( $.isArray( fixed ) ) {
5912
+ if ( Array.isArray( fixed ) ) {
5881
5913
  add( fixed );
5882
5914
  }
5883
5915
 
@@ -6065,7 +6097,7 @@
6065
6097
  {
6066
6098
  var col = columns[i];
6067
6099
  var asSorting = col.asSorting;
6068
- var sTitle = col.sTitle.replace( /<.*?>/g, "" );
6100
+ var sTitle = col.ariaTitle || col.sTitle.replace( /<.*?>/g, "" );
6069
6101
  var th = col.nTh;
6070
6102
 
6071
6103
  // IE7 is throwing an error when setting these properties with jQuery's
@@ -6506,9 +6538,9 @@
6506
6538
  */
6507
6539
  function _fnMap( ret, src, name, mappedName )
6508
6540
  {
6509
- if ( $.isArray( name ) ) {
6541
+ if ( Array.isArray( name ) ) {
6510
6542
  $.each( name, function (i, val) {
6511
- if ( $.isArray( val ) ) {
6543
+ if ( Array.isArray( val ) ) {
6512
6544
  _fnMap( ret, src, val[0], val[1] );
6513
6545
  }
6514
6546
  else {
@@ -6560,7 +6592,7 @@
6560
6592
  }
6561
6593
  $.extend( true, out[prop], val );
6562
6594
  }
6563
- else if ( breakRefs && prop !== 'data' && prop !== 'aaData' && $.isArray(val) ) {
6595
+ else if ( breakRefs && prop !== 'data' && prop !== 'aaData' && Array.isArray(val) ) {
6564
6596
  out[prop] = val.slice();
6565
6597
  }
6566
6598
  else {
@@ -6904,7 +6936,7 @@
6904
6936
  }
6905
6937
  };
6906
6938
 
6907
- if ( $.isArray( context ) ) {
6939
+ if ( Array.isArray( context ) ) {
6908
6940
  for ( var i=0, ien=context.length ; i<ien ; i++ ) {
6909
6941
  ctxSettings( context[i] );
6910
6942
  }
@@ -7262,7 +7294,7 @@
7262
7294
 
7263
7295
  _Api.register = _api_register = function ( name, val )
7264
7296
  {
7265
- if ( $.isArray( name ) ) {
7297
+ if ( Array.isArray( name ) ) {
7266
7298
  for ( var j=0, jen=name.length ; j<jen ; j++ ) {
7267
7299
  _Api.register( name[j], val );
7268
7300
  }
@@ -7332,7 +7364,7 @@
7332
7364
  // New API instance returned, want the value from the first item
7333
7365
  // in the returned array for the singular result.
7334
7366
  return ret.length ?
7335
- $.isArray( ret[0] ) ?
7367
+ Array.isArray( ret[0] ) ?
7336
7368
  new _Api( ret.context, ret[0] ) : // Array results are 'enhanced'
7337
7369
  ret[0] :
7338
7370
  undefined;
@@ -7355,7 +7387,7 @@
7355
7387
  */
7356
7388
  var __table_selector = function ( selector, a )
7357
7389
  {
7358
- if ( $.isArray(selector) ) {
7390
+ if ( Array.isArray(selector) ) {
7359
7391
  return $.map( selector, function (item) {
7360
7392
  return __table_selector(item, a);
7361
7393
  } );
@@ -7744,7 +7776,7 @@
7744
7776
  [ selector[i] ];
7745
7777
 
7746
7778
  for ( j=0, jen=a.length ; j<jen ; j++ ) {
7747
- res = selectFn( typeof a[j] === 'string' ? $.trim(a[j]) : a[j] );
7779
+ res = selectFn( typeof a[j] === 'string' ? (a[j]).trim() : a[j] );
7748
7780
 
7749
7781
  if ( res && res.length ) {
7750
7782
  out = out.concat( res );
@@ -8170,7 +8202,7 @@
8170
8202
  row._aData = data;
8171
8203
 
8172
8204
  // If the DOM has an id, and the data source is an array
8173
- if ( $.isArray( data ) && row.nTr && row.nTr.id ) {
8205
+ if ( Array.isArray( data ) && row.nTr && row.nTr.id ) {
8174
8206
  _fnSetObjectDataFn( ctx[0].rowId )( data, row.nTr.id );
8175
8207
  }
8176
8208
 
@@ -8216,7 +8248,7 @@
8216
8248
  var rows = [];
8217
8249
  var addRow = function ( r, k ) {
8218
8250
  // Recursion to allow for arrays of jQuery objects
8219
- if ( $.isArray( r ) || r instanceof $ ) {
8251
+ if ( Array.isArray( r ) || r instanceof $ ) {
8220
8252
  for ( var i=0, ien=r.length ; i<ien ; i++ ) {
8221
8253
  addRow( r[i], k );
8222
8254
  }
@@ -8230,7 +8262,7 @@
8230
8262
  }
8231
8263
  else {
8232
8264
  // Otherwise create a row with a wrapper
8233
- var created = $('<tr><td/></tr>').addClass( k );
8265
+ var created = $('<tr><td></td></tr>').addClass( k );
8234
8266
  $('td', created)
8235
8267
  .addClass( k )
8236
8268
  .html( r )
@@ -8726,14 +8758,12 @@
8726
8758
  return _selector_first( this.columns( selector, opts ) );
8727
8759
  } );
8728
8760
 
8729
-
8730
-
8731
8761
  var __cell_selector = function ( settings, selector, opts )
8732
8762
  {
8733
8763
  var data = settings.aoData;
8734
8764
  var rows = _selector_row_indexes( settings, opts );
8735
8765
  var cells = _removeEmpty( _pluck_order( data, rows, 'anCells' ) );
8736
- var allCells = $( [].concat.apply([], cells) );
8766
+ var allCells = $(_flatten( [], cells ));
8737
8767
  var row;
8738
8768
  var columns = settings.aoColumns.length;
8739
8769
  var a, i, ien, j, o, host;
@@ -9005,7 +9035,7 @@
9005
9035
  // Simple column / direction passed in
9006
9036
  order = [ [ order, dir ] ];
9007
9037
  }
9008
- else if ( order.length && ! $.isArray( order[0] ) ) {
9038
+ else if ( order.length && ! Array.isArray( order[0] ) ) {
9009
9039
  // Arguments passed in (list of 1D arrays)
9010
9040
  order = Array.prototype.slice.call( arguments );
9011
9041
  }
@@ -9041,7 +9071,7 @@
9041
9071
  ctx[0].aaSortingFixed :
9042
9072
  undefined;
9043
9073
 
9044
- return $.isArray( fixed ) ?
9074
+ return Array.isArray( fixed ) ?
9045
9075
  { pre: fixed } :
9046
9076
  fixed;
9047
9077
  }
@@ -9501,7 +9531,7 @@
9501
9531
  * @type string
9502
9532
  * @default Version number
9503
9533
  */
9504
- DataTable.version = "1.10.21";
9534
+ DataTable.version = "1.10.25";
9505
9535
 
9506
9536
  /**
9507
9537
  * Private data store, containing all of the settings objects that are
@@ -9919,8 +9949,8 @@
9919
9949
  * version is still, internally the primary interface, but is is not documented
9920
9950
  * - hence the @name tags in each doc comment. This allows a Javascript function
9921
9951
  * to create a map from Hungarian notation to camel case (going the other direction
9922
- * would require each property to be listed, which would at around 3K to the size
9923
- * of DataTables, while this method is about a 0.5K hit.
9952
+ * would require each property to be listed, which would add around 3K to the size
9953
+ * of DataTables, while this method is about a 0.5K hit).
9924
9954
  *
9925
9955
  * Ultimately this does pave the way for Hungarian notation to be dropped
9926
9956
  * completely, but that is a massive amount of work and will break current
@@ -13582,13 +13612,6 @@
13582
13612
  */
13583
13613
  "sAjaxDataProp": null,
13584
13614
 
13585
- /**
13586
- * Note if draw should be blocked while getting data
13587
- * @type boolean
13588
- * @default true
13589
- */
13590
- "bAjaxDataGet": true,
13591
-
13592
13615
  /**
13593
13616
  * The last jQuery XHR object that was used for server-side data gathering.
13594
13617
  * This can be used for working with the XHR information in one of the
@@ -14453,8 +14476,8 @@
14453
14476
  "sSortAsc": "sorting_asc",
14454
14477
  "sSortDesc": "sorting_desc",
14455
14478
  "sSortable": "sorting", /* Sortable in both directions */
14456
- "sSortableAsc": "sorting_asc_disabled",
14457
- "sSortableDesc": "sorting_desc_disabled",
14479
+ "sSortableAsc": "sorting_desc_disabled",
14480
+ "sSortableDesc": "sorting_asc_disabled",
14458
14481
  "sSortableNone": "sorting_disabled",
14459
14482
  "sSortColumn": "sorting_", /* Note that an int is postfixed for the sorting order */
14460
14483
 
@@ -14575,7 +14598,7 @@
14575
14598
  for ( i=0, ien=buttons.length ; i<ien ; i++ ) {
14576
14599
  button = buttons[i];
14577
14600
 
14578
- if ( $.isArray( button ) ) {
14601
+ if ( Array.isArray( button ) ) {
14579
14602
  var inner = $( '<'+(button.DT_el || 'div')+'/>' )
14580
14603
  .appendTo( container );
14581
14604
  attach( inner, button );
@@ -14620,14 +14643,14 @@
14620
14643
  case 'last':
14621
14644
  btnDisplay = lang.sLast;
14622
14645
 
14623
- if ( page === pages-1 ) {
14646
+ if ( pages === 0 || page === pages-1 ) {
14624
14647
  tabIndex = -1;
14625
14648
  btnClass += ' ' + disabledClass;
14626
14649
  }
14627
14650
  break;
14628
14651
 
14629
14652
  default:
14630
- btnDisplay = button + 1;
14653
+ btnDisplay = settings.fnFormatNumber( button + 1 );
14631
14654
  btnClass = page === button ?
14632
14655
  classes.sPageButtonActive : '';
14633
14656
  break;
@@ -14895,7 +14918,6 @@
14895
14918
 
14896
14919
  cell
14897
14920
  .removeClass(
14898
- column.sSortingClass +' '+
14899
14921
  classes.sSortAsc +' '+
14900
14922
  classes.sSortDesc
14901
14923
  )
@@ -15020,6 +15042,11 @@
15020
15042
  decimal+(d - intPart).toFixed( precision ).substring( 2 ):
15021
15043
  '';
15022
15044
 
15045
+ // If zero, then can't have a negative prefix
15046
+ if (intPart === 0 && parseFloat(floatPart) === 0) {
15047
+ negative = '';
15048
+ }
15049
+
15023
15050
  return negative + (prefix||'') +
15024
15051
  intPart.toString().replace(
15025
15052
  /\B(?=(\d{3})+(?!\d))/g, thousands