datatables.net 2.0.6 → 2.0.8
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 +34 -17
- package/js/dataTables.min.js +2 -2
- package/js/dataTables.min.mjs +2 -2
- package/js/dataTables.mjs +33 -16
- package/package.json +1 -1
package/js/dataTables.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! DataTables 2.0.
|
|
1
|
+
/*! DataTables 2.0.8
|
|
2
2
|
* © SpryMedia Ltd - datatables.net/license
|
|
3
3
|
*/
|
|
4
4
|
|
|
@@ -4777,7 +4777,7 @@ function _processingHtml ( settings )
|
|
|
4777
4777
|
|
|
4778
4778
|
// Different positioning depending on if scrolling is enabled or not
|
|
4779
4779
|
if (scrolling) {
|
|
4780
|
-
n.prependTo( 'div.dt-scroll', settings.nTableWrapper );
|
|
4780
|
+
n.prependTo( $('div.dt-scroll', settings.nTableWrapper) );
|
|
4781
4781
|
}
|
|
4782
4782
|
else {
|
|
4783
4783
|
n.insertBefore( table );
|
|
@@ -5026,7 +5026,7 @@ function _fnScrollDraw ( settings )
|
|
|
5026
5026
|
// of the indexes out.
|
|
5027
5027
|
if (settings.aiDisplay.length) {
|
|
5028
5028
|
// Get the column sizes from the first row in the table
|
|
5029
|
-
var colSizes = table.children('tbody
|
|
5029
|
+
var colSizes = table.children('tbody').eq(0).children('tr').eq(0).children('th, td').map(function (vis) {
|
|
5030
5030
|
return {
|
|
5031
5031
|
idx: _fnVisibleToColumnIndex(settings, vis),
|
|
5032
5032
|
width: $(this).outerWidth()
|
|
@@ -7507,6 +7507,16 @@ var _selector_row_indexes = function ( settings, opts )
|
|
|
7507
7507
|
order = opts.order, // applied, current, index (original - compatibility with 1.9)
|
|
7508
7508
|
page = opts.page; // all, current
|
|
7509
7509
|
|
|
7510
|
+
if ( _fnDataSource( settings ) == 'ssp' ) {
|
|
7511
|
+
// In server-side processing mode, most options are irrelevant since
|
|
7512
|
+
// rows not shown don't exist and the index order is the applied order
|
|
7513
|
+
// Removed is a special case - for consistency just return an empty
|
|
7514
|
+
// array
|
|
7515
|
+
return search === 'removed' ?
|
|
7516
|
+
[] :
|
|
7517
|
+
_range( 0, displayMaster.length );
|
|
7518
|
+
}
|
|
7519
|
+
|
|
7510
7520
|
if ( page == 'current' ) {
|
|
7511
7521
|
// Current page implies that order=current and filter=applied, since it is
|
|
7512
7522
|
// fairly senseless otherwise, regardless of what order and search actually
|
|
@@ -8178,7 +8188,7 @@ _api_register( [
|
|
|
8178
8188
|
_api_register( _child_obj+'.isShown()', function () {
|
|
8179
8189
|
var ctx = this.context;
|
|
8180
8190
|
|
|
8181
|
-
if ( ctx.length && this.length ) {
|
|
8191
|
+
if ( ctx.length && this.length && ctx[0].aoData[ this[0] ] ) {
|
|
8182
8192
|
// _detailsShown as false or undefined will fall through to return false
|
|
8183
8193
|
return ctx[0].aoData[ this[0] ]._detailsShow || false;
|
|
8184
8194
|
}
|
|
@@ -8201,7 +8211,7 @@ _api_register( _child_obj+'.isShown()', function () {
|
|
|
8201
8211
|
// can be an array of these items, comma separated list, or an array of comma
|
|
8202
8212
|
// separated lists
|
|
8203
8213
|
|
|
8204
|
-
var __re_column_selector = /^([^:]+)
|
|
8214
|
+
var __re_column_selector = /^([^:]+)?:(name|title|visIdx|visible)$/;
|
|
8205
8215
|
|
|
8206
8216
|
|
|
8207
8217
|
// r1 and r2 are redundant - but it means that the parameters match for the
|
|
@@ -8273,17 +8283,24 @@ var __column_selector = function ( settings, selector, opts )
|
|
|
8273
8283
|
switch( match[2] ) {
|
|
8274
8284
|
case 'visIdx':
|
|
8275
8285
|
case 'visible':
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
|
|
8279
|
-
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
|
|
8286
|
+
if (match[1]) {
|
|
8287
|
+
var idx = parseInt( match[1], 10 );
|
|
8288
|
+
// Visible index given, convert to column index
|
|
8289
|
+
if ( idx < 0 ) {
|
|
8290
|
+
// Counting from the right
|
|
8291
|
+
var visColumns = columns.map( function (col,i) {
|
|
8292
|
+
return col.bVisible ? i : null;
|
|
8293
|
+
} );
|
|
8294
|
+
return [ visColumns[ visColumns.length + idx ] ];
|
|
8295
|
+
}
|
|
8296
|
+
// Counting from the left
|
|
8297
|
+
return [ _fnVisibleToColumnIndex( settings, idx ) ];
|
|
8284
8298
|
}
|
|
8285
|
-
|
|
8286
|
-
|
|
8299
|
+
|
|
8300
|
+
// `:visible` on its own
|
|
8301
|
+
return columns.map( function (col, i) {
|
|
8302
|
+
return col.bVisible ? i : null;
|
|
8303
|
+
} );
|
|
8287
8304
|
|
|
8288
8305
|
case 'name':
|
|
8289
8306
|
// match by name. `names` is column index complete and in order
|
|
@@ -9558,7 +9575,7 @@ _api_register( 'i18n()', function ( token, def, plural ) {
|
|
|
9558
9575
|
* @type string
|
|
9559
9576
|
* @default Version number
|
|
9560
9577
|
*/
|
|
9561
|
-
DataTable.version = "2.0.
|
|
9578
|
+
DataTable.version = "2.0.8";
|
|
9562
9579
|
|
|
9563
9580
|
/**
|
|
9564
9581
|
* Private data store, containing all of the settings objects that are
|