datatables.net 2.3.0 → 2.3.2
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.js +35 -9
- package/js/dataTables.min.js +2 -2
- package/js/dataTables.min.mjs +2 -2
- package/js/dataTables.mjs +35 -9
- package/package.json +1 -1
- package/types/types.d.ts +9 -2
package/js/dataTables.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! DataTables 2.3.
|
|
1
|
+
/*! DataTables 2.3.2
|
|
2
2
|
* © SpryMedia Ltd - datatables.net/license
|
|
3
3
|
*/
|
|
4
4
|
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
_fnCamelToHungarian( defaults.column, defaults.column, true );
|
|
113
113
|
|
|
114
114
|
/* Setting up the initialisation object */
|
|
115
|
-
_fnCamelToHungarian( defaults, $.extend( oInit, $this.data() ), true );
|
|
115
|
+
_fnCamelToHungarian( defaults, $.extend( oInit, _fnEscapeObject($this.data()) ), true );
|
|
116
116
|
|
|
117
117
|
|
|
118
118
|
|
|
@@ -542,6 +542,11 @@
|
|
|
542
542
|
*/
|
|
543
543
|
errMode: "alert",
|
|
544
544
|
|
|
545
|
+
/** HTML entity escaping */
|
|
546
|
+
escape: {
|
|
547
|
+
/** When reading data-* attributes for initialisation options */
|
|
548
|
+
attributes: false
|
|
549
|
+
},
|
|
545
550
|
|
|
546
551
|
/**
|
|
547
552
|
* Legacy so v1 plug-ins don't throw js errors on load
|
|
@@ -1906,6 +1911,10 @@
|
|
|
1906
1911
|
init.orderIndicators = false;
|
|
1907
1912
|
init.orderHandler = false;
|
|
1908
1913
|
}
|
|
1914
|
+
else if (init.bSort === true) {
|
|
1915
|
+
init.orderIndicators = true;
|
|
1916
|
+
init.orderHandler = true;
|
|
1917
|
+
}
|
|
1909
1918
|
|
|
1910
1919
|
// Which cells are the title cells?
|
|
1911
1920
|
if (typeof init.bSortCellsTop === 'boolean') {
|
|
@@ -3573,7 +3582,9 @@
|
|
|
3573
3582
|
|
|
3574
3583
|
_fnDraw( settings );
|
|
3575
3584
|
|
|
3576
|
-
settings.
|
|
3585
|
+
settings.api.one('draw', function () {
|
|
3586
|
+
settings._drawHold = false;
|
|
3587
|
+
});
|
|
3577
3588
|
}
|
|
3578
3589
|
|
|
3579
3590
|
|
|
@@ -4007,7 +4018,7 @@
|
|
|
4007
4018
|
if ( write ) {
|
|
4008
4019
|
if (unique) {
|
|
4009
4020
|
// Allow column options to be set from HTML attributes
|
|
4010
|
-
_fnColumnOptions( settings, shifted, jqCell.data() );
|
|
4021
|
+
_fnColumnOptions( settings, shifted, _fnEscapeObject(jqCell.data()) );
|
|
4011
4022
|
|
|
4012
4023
|
// Get the width for the column. This can be defined from the
|
|
4013
4024
|
// width attribute, style attribute or `columns.width` option
|
|
@@ -4253,7 +4264,7 @@
|
|
|
4253
4264
|
// to the object for the callback.
|
|
4254
4265
|
var empty = {};
|
|
4255
4266
|
|
|
4256
|
-
|
|
4267
|
+
_fnAjaxDataSrc(oSettings, empty, []);
|
|
4257
4268
|
callback(empty);
|
|
4258
4269
|
}
|
|
4259
4270
|
else {
|
|
@@ -5781,9 +5792,11 @@
|
|
|
5781
5792
|
var run = false;
|
|
5782
5793
|
var columns = column === undefined
|
|
5783
5794
|
? _fnColumnsFromHeader( e.target )
|
|
5784
|
-
:
|
|
5785
|
-
? column
|
|
5786
|
-
:
|
|
5795
|
+
: typeof column === 'function'
|
|
5796
|
+
? column()
|
|
5797
|
+
: Array.isArray(column)
|
|
5798
|
+
? column
|
|
5799
|
+
: [column];
|
|
5787
5800
|
|
|
5788
5801
|
if ( columns.length ) {
|
|
5789
5802
|
for ( var i=0, ien=columns.length ; i<ien ; i++ ) {
|
|
@@ -6848,6 +6861,19 @@
|
|
|
6848
6861
|
}
|
|
6849
6862
|
}
|
|
6850
6863
|
|
|
6864
|
+
/**
|
|
6865
|
+
* Escape HTML entities in strings, in an object
|
|
6866
|
+
*/
|
|
6867
|
+
function _fnEscapeObject(obj) {
|
|
6868
|
+
if (DataTable.ext.escape.attributes) {
|
|
6869
|
+
$.each(obj, function (key, val) {
|
|
6870
|
+
obj[key] = _escapeHtml(val);
|
|
6871
|
+
})
|
|
6872
|
+
}
|
|
6873
|
+
|
|
6874
|
+
return obj;
|
|
6875
|
+
}
|
|
6876
|
+
|
|
6851
6877
|
|
|
6852
6878
|
|
|
6853
6879
|
/**
|
|
@@ -10193,7 +10219,7 @@
|
|
|
10193
10219
|
* @type string
|
|
10194
10220
|
* @default Version number
|
|
10195
10221
|
*/
|
|
10196
|
-
DataTable.version = "2.3.
|
|
10222
|
+
DataTable.version = "2.3.2";
|
|
10197
10223
|
|
|
10198
10224
|
/**
|
|
10199
10225
|
* Private data store, containing all of the settings objects that are
|