jquery-datatables 1.10.16 → 1.10.17
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +2 -0
- data/app/assets/javascripts/datatables/dataTables.foundation.js +2 -2
- data/app/assets/javascripts/datatables/dataTables.uikit.js +1 -1
- data/app/assets/javascripts/datatables/extensions/AutoFill/autoFill.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/AutoFill/dataTables.autoFill.js +52 -12
- data/app/assets/javascripts/datatables/extensions/Buttons/buttons.colVis.js +4 -8
- data/app/assets/javascripts/datatables/extensions/Buttons/buttons.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Buttons/buttons.flash.js +17 -7
- data/app/assets/javascripts/datatables/extensions/Buttons/buttons.html5.js +33 -19
- data/app/assets/javascripts/datatables/extensions/Buttons/buttons.print.js +14 -3
- data/app/assets/javascripts/datatables/extensions/Buttons/dataTables.buttons.js +120 -53
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/ColReorder/dataTables.colReorder.js +76 -13
- data/app/assets/javascripts/datatables/extensions/FixedColumns/dataTables.fixedColumns.js +23 -17
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/dataTables.fixedHeader.js +26 -11
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/dataTables.keyTable.js +141 -75
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Responsive/dataTables.responsive.js +64 -26
- data/app/assets/javascripts/datatables/extensions/Responsive/responsive.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/dataTables.rowGroup.js +45 -13
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/dataTables.rowReorder.js +24 -6
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.semanicui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/dataTables.scroller.js +93 -87
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Scroller/scroller.semanticui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/dataTables.select.js +41 -14
- data/app/assets/javascripts/datatables/extensions/Select/select.bootstrap.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/select.bootstrap4.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/select.dataTables.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/select.foundation.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/select.jqueryui.js +38 -0
- data/app/assets/javascripts/datatables/extensions/Select/select.semanticui.js +38 -0
- data/app/assets/javascripts/datatables/jquery.dataTables.js +125 -72
- data/app/assets/stylesheets/datatables/dataTables.bootstrap4.scss +4 -0
- data/app/assets/stylesheets/datatables/dataTables.foundation.scss +5 -5
- data/app/assets/stylesheets/datatables/dataTables.material.scss +1 -1
- data/app/assets/stylesheets/datatables/dataTables.uikit.scss +33 -22
- data/app/assets/stylesheets/datatables/extensions/AutoFill/autoFill.bootstrap.scss +9 -0
- data/app/assets/stylesheets/datatables/extensions/AutoFill/autoFill.bootstrap4.scss +9 -0
- data/app/assets/stylesheets/datatables/extensions/Buttons/buttons.dataTables.scss +3 -2
- data/app/assets/stylesheets/datatables/extensions/Buttons/buttons.jqueryui.scss +2 -4
- data/app/assets/stylesheets/datatables/extensions/Buttons/mixins.scss +5 -0
- data/app/assets/stylesheets/datatables/extensions/FixedColumns/fixedColumns.bootstrap4.scss +3 -6
- data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.bootstrap.scss +1 -1
- data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.bootstrap4.scss +1 -1
- data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.dataTables.scss +6 -5
- data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.foundation.scss +1 -1
- data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.semanticui.scss +1 -1
- data/app/assets/stylesheets/datatables/extensions/Scroller/scroller.bootstrap.scss +1 -1
- data/app/assets/stylesheets/datatables/extensions/Scroller/scroller.bootstrap4.scss +2 -4
- data/app/assets/stylesheets/datatables/jquery.dataTables.scss +5 -5
- data/jquery-datatables.gemspec +4 -2
- data/lib/generators/jquery/datatables/install_generator.rb +22 -6
- data/lib/generators/jquery/datatables/templates/{bootstrap.js.tt → javascripts/bootstrap.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{bootstrap4.js.tt → javascripts/bootstrap4.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{foundation.js.tt → javascripts/foundation.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/javascripts/initializer.js.tt +30 -0
- data/lib/generators/jquery/datatables/templates/{jqueryui.js.tt → javascripts/jqueryui.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{material.js.tt → javascripts/material.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{regular.js.tt → javascripts/regular.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{semanticui.js.tt → javascripts/semanticui.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{uikit.js.tt → javascripts/uikit.js.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{bootstrap.scss.tt → stylesheets/bootstrap.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{bootstrap4.scss.tt → stylesheets/bootstrap4.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{foundation.scss.tt → stylesheets/foundation.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{jqueryui.scss.tt → stylesheets/jqueryui.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{material.scss.tt → stylesheets/material.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{regular.scss.tt → stylesheets/regular.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{semanticui.scss.tt → stylesheets/semanticui.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/{uikit.scss.tt → stylesheets/uikit.scss.tt} +0 -0
- data/lib/generators/jquery/datatables/templates/views/index.html.erb +17 -0
- data/lib/generators/jquery/datatables/templates/views/index.html.slim +12 -0
- data/lib/generators/jquery/datatables/templates/views/index.json.jbuilder +10 -0
- data/lib/jquery-datatables.rb +53 -5
- data/lib/jquery-datatables/engine.rb +2 -0
- data/lib/jquery-datatables/version.rb +1 -1
- metadata +86 -31
@@ -0,0 +1,38 @@
|
|
1
|
+
/*! DataTables styling wrapper for KeyTable
|
2
|
+
* ©2018 SpryMedia Ltd - datatables.net/license
|
3
|
+
*/
|
4
|
+
|
5
|
+
(function( factory ){
|
6
|
+
if ( typeof define === 'function' && define.amd ) {
|
7
|
+
// AMD
|
8
|
+
define( ['jquery', 'datatables.net-dt', 'datatables.net-keytable'], function ( $ ) {
|
9
|
+
return factory( $, window, document );
|
10
|
+
} );
|
11
|
+
}
|
12
|
+
else if ( typeof exports === 'object' ) {
|
13
|
+
// CommonJS
|
14
|
+
module.exports = function (root, $) {
|
15
|
+
if ( ! root ) {
|
16
|
+
root = window;
|
17
|
+
}
|
18
|
+
|
19
|
+
if ( ! $ || ! $.fn.dataTable ) {
|
20
|
+
$ = require('datatables.net-dt')(root, $).$;
|
21
|
+
}
|
22
|
+
|
23
|
+
if ( ! $.fn.dataTable.KeyTable ) {
|
24
|
+
require('datatables.net-keytable')(root, $);
|
25
|
+
}
|
26
|
+
|
27
|
+
return factory( $, root, root.document );
|
28
|
+
};
|
29
|
+
}
|
30
|
+
else {
|
31
|
+
// Browser
|
32
|
+
factory( jQuery, window, document );
|
33
|
+
}
|
34
|
+
}(function( $, window, document, undefined ) {
|
35
|
+
|
36
|
+
return $.fn.dataTable;
|
37
|
+
|
38
|
+
}));
|
@@ -0,0 +1,38 @@
|
|
1
|
+
/*! Bootstrap 4 styling wrapper for KeyTable
|
2
|
+
* ©2018 SpryMedia Ltd - datatables.net/license
|
3
|
+
*/
|
4
|
+
|
5
|
+
(function( factory ){
|
6
|
+
if ( typeof define === 'function' && define.amd ) {
|
7
|
+
// AMD
|
8
|
+
define( ['jquery', 'datatables.net-zf', 'datatables.net-keytable'], function ( $ ) {
|
9
|
+
return factory( $, window, document );
|
10
|
+
} );
|
11
|
+
}
|
12
|
+
else if ( typeof exports === 'object' ) {
|
13
|
+
// CommonJS
|
14
|
+
module.exports = function (root, $) {
|
15
|
+
if ( ! root ) {
|
16
|
+
root = window;
|
17
|
+
}
|
18
|
+
|
19
|
+
if ( ! $ || ! $.fn.dataTable ) {
|
20
|
+
$ = require('datatables.net-zf')(root, $).$;
|
21
|
+
}
|
22
|
+
|
23
|
+
if ( ! $.fn.dataTable.KeyTable ) {
|
24
|
+
require('datatables.net-keytable')(root, $);
|
25
|
+
}
|
26
|
+
|
27
|
+
return factory( $, root, root.document );
|
28
|
+
};
|
29
|
+
}
|
30
|
+
else {
|
31
|
+
// Browser
|
32
|
+
factory( jQuery, window, document );
|
33
|
+
}
|
34
|
+
}(function( $, window, document, undefined ) {
|
35
|
+
|
36
|
+
return $.fn.dataTable;
|
37
|
+
|
38
|
+
}));
|
@@ -0,0 +1,38 @@
|
|
1
|
+
/*! jQuery UI styling wrapper for KeyTable
|
2
|
+
* ©2018 SpryMedia Ltd - datatables.net/license
|
3
|
+
*/
|
4
|
+
|
5
|
+
(function( factory ){
|
6
|
+
if ( typeof define === 'function' && define.amd ) {
|
7
|
+
// AMD
|
8
|
+
define( ['jquery', 'datatables.net-jqui', 'datatables.net-keytable'], function ( $ ) {
|
9
|
+
return factory( $, window, document );
|
10
|
+
} );
|
11
|
+
}
|
12
|
+
else if ( typeof exports === 'object' ) {
|
13
|
+
// CommonJS
|
14
|
+
module.exports = function (root, $) {
|
15
|
+
if ( ! root ) {
|
16
|
+
root = window;
|
17
|
+
}
|
18
|
+
|
19
|
+
if ( ! $ || ! $.fn.dataTable ) {
|
20
|
+
$ = require('datatables.net-jqui')(root, $).$;
|
21
|
+
}
|
22
|
+
|
23
|
+
if ( ! $.fn.dataTable.KeyTable ) {
|
24
|
+
require('datatables.net-keytable')(root, $);
|
25
|
+
}
|
26
|
+
|
27
|
+
return factory( $, root, root.document );
|
28
|
+
};
|
29
|
+
}
|
30
|
+
else {
|
31
|
+
// Browser
|
32
|
+
factory( jQuery, window, document );
|
33
|
+
}
|
34
|
+
}(function( $, window, document, undefined ) {
|
35
|
+
|
36
|
+
return $.fn.dataTable;
|
37
|
+
|
38
|
+
}));
|
@@ -0,0 +1,38 @@
|
|
1
|
+
/*! Semanic UI styling wrapper for KeyTable
|
2
|
+
* ©2018 SpryMedia Ltd - datatables.net/license
|
3
|
+
*/
|
4
|
+
|
5
|
+
(function( factory ){
|
6
|
+
if ( typeof define === 'function' && define.amd ) {
|
7
|
+
// AMD
|
8
|
+
define( ['jquery', 'datatables.net-se', 'datatables.net-keytable'], function ( $ ) {
|
9
|
+
return factory( $, window, document );
|
10
|
+
} );
|
11
|
+
}
|
12
|
+
else if ( typeof exports === 'object' ) {
|
13
|
+
// CommonJS
|
14
|
+
module.exports = function (root, $) {
|
15
|
+
if ( ! root ) {
|
16
|
+
root = window;
|
17
|
+
}
|
18
|
+
|
19
|
+
if ( ! $ || ! $.fn.dataTable ) {
|
20
|
+
$ = require('datatables.net-se')(root, $).$;
|
21
|
+
}
|
22
|
+
|
23
|
+
if ( ! $.fn.dataTable.KeyTable ) {
|
24
|
+
require('datatables.net-keytable')(root, $);
|
25
|
+
}
|
26
|
+
|
27
|
+
return factory( $, root, root.document );
|
28
|
+
};
|
29
|
+
}
|
30
|
+
else {
|
31
|
+
// Browser
|
32
|
+
factory( jQuery, window, document );
|
33
|
+
}
|
34
|
+
}(function( $, window, document, undefined ) {
|
35
|
+
|
36
|
+
return $.fn.dataTable;
|
37
|
+
|
38
|
+
}));
|
@@ -1,15 +1,15 @@
|
|
1
|
-
/*! Responsive 2.2.
|
2
|
-
* 2014-
|
1
|
+
/*! Responsive 2.2.2
|
2
|
+
* 2014-2018 SpryMedia Ltd - datatables.net/license
|
3
3
|
*/
|
4
4
|
|
5
5
|
/**
|
6
6
|
* @summary Responsive
|
7
7
|
* @description Responsive tables plug-in for DataTables
|
8
|
-
* @version 2.2.
|
8
|
+
* @version 2.2.2
|
9
9
|
* @file dataTables.responsive.js
|
10
10
|
* @author SpryMedia Ltd (www.sprymedia.co.uk)
|
11
11
|
* @contact www.sprymedia.co.uk/contact
|
12
|
-
* @copyright Copyright 2014-
|
12
|
+
* @copyright Copyright 2014-2018 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/mit
|
@@ -97,8 +97,8 @@ var DataTable = $.fn.dataTable;
|
|
97
97
|
*/
|
98
98
|
var Responsive = function ( settings, opts ) {
|
99
99
|
// Sanity check that we are using DataTables 1.10 or newer
|
100
|
-
if ( ! DataTable.versionCheck || ! DataTable.versionCheck( '1.10.
|
101
|
-
throw 'DataTables Responsive requires DataTables 1.10.
|
100
|
+
if ( ! DataTable.versionCheck || ! DataTable.versionCheck( '1.10.10' ) ) {
|
101
|
+
throw 'DataTables Responsive requires DataTables 1.10.10 or newer';
|
102
102
|
}
|
103
103
|
|
104
104
|
this.s = {
|
@@ -208,10 +208,21 @@ $.extend( Responsive.prototype, {
|
|
208
208
|
|
209
209
|
// DataTables will trigger this event on every column it shows and
|
210
210
|
// hides individually
|
211
|
-
dt.on( 'column-visibility.dtr', function (
|
212
|
-
|
213
|
-
that.
|
214
|
-
|
211
|
+
dt.on( 'column-visibility.dtr', function () {
|
212
|
+
// Use a small debounce to allow multiple columns to be set together
|
213
|
+
if ( that._timer ) {
|
214
|
+
clearTimeout( that._timer );
|
215
|
+
}
|
216
|
+
|
217
|
+
that._timer = setTimeout( function () {
|
218
|
+
that._timer = null;
|
219
|
+
|
220
|
+
that._classLogic();
|
221
|
+
that._resizeAuto();
|
222
|
+
that._resize();
|
223
|
+
|
224
|
+
that._redrawChildren();
|
225
|
+
}, 100 );
|
215
226
|
} );
|
216
227
|
|
217
228
|
// Redraw the details box on each draw which will happen if the data
|
@@ -247,6 +258,9 @@ $.extend( Responsive.prototype, {
|
|
247
258
|
} );
|
248
259
|
|
249
260
|
dt.one( 'draw.dtr', function () {
|
261
|
+
that._resizeAuto();
|
262
|
+
that._resize();
|
263
|
+
|
250
264
|
dt.rows( rowIds ).every( function () {
|
251
265
|
that._detailsDisplay( this, false );
|
252
266
|
} );
|
@@ -311,7 +325,10 @@ $.extend( Responsive.prototype, {
|
|
311
325
|
// Class logic - determine which columns are in this breakpoint based
|
312
326
|
// on the classes. If no class control (i.e. `auto`) then `-` is used
|
313
327
|
// to indicate this to the rest of the function
|
314
|
-
var display = $.map( columns, function ( col ) {
|
328
|
+
var display = $.map( columns, function ( col, i ) {
|
329
|
+
if ( dt.column(i).visible() === false ) {
|
330
|
+
return 'not-visible';
|
331
|
+
}
|
315
332
|
return col.auto && col.minWidth === null ?
|
316
333
|
false :
|
317
334
|
col.auto === true ?
|
@@ -379,7 +396,7 @@ $.extend( Responsive.prototype, {
|
|
379
396
|
var showControl = false;
|
380
397
|
|
381
398
|
for ( i=0, ien=columns.length ; i<ien ; i++ ) {
|
382
|
-
if ( ! columns[i].control && ! columns[i].never &&
|
399
|
+
if ( ! columns[i].control && ! columns[i].never && display[i] === false ) {
|
383
400
|
showControl = true;
|
384
401
|
break;
|
385
402
|
}
|
@@ -389,6 +406,11 @@ $.extend( Responsive.prototype, {
|
|
389
406
|
if ( columns[i].control ) {
|
390
407
|
display[i] = showControl;
|
391
408
|
}
|
409
|
+
|
410
|
+
// Replace not visible string with false from the control column detection above
|
411
|
+
if ( display[i] === 'not-visible' ) {
|
412
|
+
display[i] = false;
|
413
|
+
}
|
392
414
|
}
|
393
415
|
|
394
416
|
// Finally we need to make sure that there is at least one column that
|
@@ -753,7 +775,7 @@ $.extend( Responsive.prototype, {
|
|
753
775
|
// any columns that are not visible but can be shown
|
754
776
|
var collapsedClass = false;
|
755
777
|
for ( i=0, ien=columns.length ; i<ien ; i++ ) {
|
756
|
-
if ( columnsVis[i] === false && ! columns[i].never && ! columns[i].control ) {
|
778
|
+
if ( columnsVis[i] === false && ! columns[i].never && ! columns[i].control && ! dt.column(i).visible() === false ) {
|
757
779
|
collapsedClass = true;
|
758
780
|
break;
|
759
781
|
}
|
@@ -837,7 +859,8 @@ $.extend( Responsive.prototype, {
|
|
837
859
|
} )
|
838
860
|
.to$()
|
839
861
|
.clone( false )
|
840
|
-
.css( 'display', 'table-cell' )
|
862
|
+
.css( 'display', 'table-cell' )
|
863
|
+
.css( 'min-width', 0 );
|
841
864
|
|
842
865
|
// Body rows - we don't need to take account of DataTables' column
|
843
866
|
// visibility since we implement our own here (hence the `display` set)
|
@@ -878,6 +901,10 @@ $.extend( Responsive.prototype, {
|
|
878
901
|
// multiple times. For example, cloning and inserting a checked radio
|
879
902
|
// clears the chcecked state of the original radio.
|
880
903
|
$( clonedTable ).find( '[name]' ).removeAttr( 'name' );
|
904
|
+
|
905
|
+
// A position absolute table would take the table out of the flow of
|
906
|
+
// our container element, bypassing the height and width (Scroller)
|
907
|
+
$( clonedTable ).css( 'position', 'relative' )
|
881
908
|
|
882
909
|
var inserted = $('<div/>')
|
883
910
|
.css( {
|
@@ -947,19 +974,22 @@ $.extend( Responsive.prototype, {
|
|
947
974
|
|
948
975
|
cells.filter( '[data-dtr-keyboard]' ).removeData( '[data-dtr-keyboard]' );
|
949
976
|
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
// This is a bit of a hack - we need to limit the selected nodes to just
|
955
|
-
// those of this table
|
956
|
-
if ( selector === 'td:first-child, th:first-child' ) {
|
957
|
-
selector = '>td:first-child, >th:first-child';
|
977
|
+
if ( typeof target === 'number' ) {
|
978
|
+
dt.cells( null, target, { page: 'current' } ).nodes().to$()
|
979
|
+
.attr( 'tabIndex', ctx.iTabIndex )
|
980
|
+
.data( 'dtr-keyboard', 1 );
|
958
981
|
}
|
982
|
+
else {
|
983
|
+
// This is a bit of a hack - we need to limit the selected nodes to just
|
984
|
+
// those of this table
|
985
|
+
if ( target === 'td:first-child, th:first-child' ) {
|
986
|
+
target = '>td:first-child, >th:first-child';
|
987
|
+
}
|
959
988
|
|
960
|
-
|
961
|
-
|
962
|
-
|
989
|
+
$( target, dt.rows( { page: 'current' } ).nodes() )
|
990
|
+
.attr( 'tabIndex', ctx.iTabIndex )
|
991
|
+
.data( 'dtr-keyboard', 1 );
|
992
|
+
}
|
963
993
|
}
|
964
994
|
} );
|
965
995
|
|
@@ -1317,6 +1347,14 @@ Api.register( 'responsive.hasHidden()', function () {
|
|
1317
1347
|
false;
|
1318
1348
|
} );
|
1319
1349
|
|
1350
|
+
Api.registerPlural( 'columns().responsiveHidden()', 'column().responsiveHidden()', function () {
|
1351
|
+
return this.iterator( 'column', function ( settings, column ) {
|
1352
|
+
return settings._responsive ?
|
1353
|
+
settings._responsive.s.current[ column ] :
|
1354
|
+
false;
|
1355
|
+
}, 1 );
|
1356
|
+
} );
|
1357
|
+
|
1320
1358
|
|
1321
1359
|
/**
|
1322
1360
|
* Version information
|
@@ -1324,7 +1362,7 @@ Api.register( 'responsive.hasHidden()', function () {
|
|
1324
1362
|
* @name Responsive.version
|
1325
1363
|
* @static
|
1326
1364
|
*/
|
1327
|
-
Responsive.version = '2.2.
|
1365
|
+
Responsive.version = '2.2.2';
|
1328
1366
|
|
1329
1367
|
|
1330
1368
|
$.fn.dataTable.Responsive = Responsive;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
/*! DataTables styling wrapper for Responsive
|
2
|
+
* ©2018 SpryMedia Ltd - datatables.net/license
|
3
|
+
*/
|
4
|
+
|
5
|
+
(function( factory ){
|
6
|
+
if ( typeof define === 'function' && define.amd ) {
|
7
|
+
// AMD
|
8
|
+
define( ['jquery', 'datatables.net-dt', 'datatables.net-responsive'], function ( $ ) {
|
9
|
+
return factory( $, window, document );
|
10
|
+
} );
|
11
|
+
}
|
12
|
+
else if ( typeof exports === 'object' ) {
|
13
|
+
// CommonJS
|
14
|
+
module.exports = function (root, $) {
|
15
|
+
if ( ! root ) {
|
16
|
+
root = window;
|
17
|
+
}
|
18
|
+
|
19
|
+
if ( ! $ || ! $.fn.dataTable ) {
|
20
|
+
$ = require('datatables.net-dt')(root, $).$;
|
21
|
+
}
|
22
|
+
|
23
|
+
if ( ! $.fn.dataTable.Responsive ) {
|
24
|
+
require('datatables.net-responsive')(root, $);
|
25
|
+
}
|
26
|
+
|
27
|
+
return factory( $, root, root.document );
|
28
|
+
};
|
29
|
+
}
|
30
|
+
else {
|
31
|
+
// Browser
|
32
|
+
factory( jQuery, window, document );
|
33
|
+
}
|
34
|
+
}(function( $, window, document, undefined ) {
|
35
|
+
|
36
|
+
return $.fn.dataTable;
|
37
|
+
|
38
|
+
}));
|
@@ -1,15 +1,15 @@
|
|
1
|
-
/*! RowGroup 1.0.
|
2
|
-
* ©2017 SpryMedia Ltd - datatables.net/license
|
1
|
+
/*! RowGroup 1.0.3
|
2
|
+
* ©2017-2018 SpryMedia Ltd - datatables.net/license
|
3
3
|
*/
|
4
4
|
|
5
5
|
/**
|
6
6
|
* @summary RowGroup
|
7
7
|
* @description RowGrouping for DataTables
|
8
|
-
* @version 1.0.
|
8
|
+
* @version 1.0.3
|
9
9
|
* @file dataTables.rowGroup.js
|
10
10
|
* @author SpryMedia Ltd (www.sprymedia.co.uk)
|
11
11
|
* @contact datatables.net
|
12
|
-
* @copyright Copyright 2017 SpryMedia Ltd.
|
12
|
+
* @copyright Copyright 2017-2018 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/mit
|
@@ -146,6 +146,17 @@ $.extend( RowGroup.prototype, {
|
|
146
146
|
{
|
147
147
|
var that = this;
|
148
148
|
var dt = this.s.dt;
|
149
|
+
var rows = dt.rows();
|
150
|
+
var groups = [];
|
151
|
+
|
152
|
+
rows.every( function () {
|
153
|
+
var d = this.data();
|
154
|
+
var group = that.s.dataFn( d );
|
155
|
+
|
156
|
+
if ( groups.indexOf(group) == -1 ) {
|
157
|
+
groups.push( group );
|
158
|
+
}
|
159
|
+
} );
|
149
160
|
|
150
161
|
dt.on( 'draw.dtrg', function () {
|
151
162
|
if ( that.c.enable ) {
|
@@ -204,6 +215,10 @@ $.extend( RowGroup.prototype, {
|
|
204
215
|
var d = this.data();
|
205
216
|
var group = that.s.dataFn( d );
|
206
217
|
|
218
|
+
if ( group === null || group === undefined ) {
|
219
|
+
group = that.c.emptyDataGroup;
|
220
|
+
}
|
221
|
+
|
207
222
|
if ( last === undefined || group !== last ) {
|
208
223
|
groupedRows.push( [] );
|
209
224
|
last = group;
|
@@ -216,21 +231,24 @@ $.extend( RowGroup.prototype, {
|
|
216
231
|
var group = groupedRows[i];
|
217
232
|
var firstRow = dt.row(group[0]);
|
218
233
|
var groupName = this.s.dataFn( firstRow.data() );
|
234
|
+
var row;
|
219
235
|
|
220
236
|
if ( this.c.startRender ) {
|
221
237
|
display = this.c.startRender.call( this, dt.rows(group), groupName );
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
.insertBefore( firstRow.node() );
|
238
|
+
row = this._rowWrap( display, this.c.startClassName );
|
239
|
+
|
240
|
+
if ( row ) {
|
241
|
+
row.insertBefore( firstRow.node() );
|
242
|
+
}
|
226
243
|
}
|
227
244
|
|
228
245
|
if ( this.c.endRender ) {
|
229
246
|
display = this.c.endRender.call( this, dt.rows(group), groupName );
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
.insertAfter( dt.row( group[ group.length-1 ] ).node() );
|
247
|
+
row = this._rowWrap( display, this.c.endClassName );
|
248
|
+
|
249
|
+
if ( row ) {
|
250
|
+
row.insertAfter( dt.row( group[ group.length-1 ] ).node() );
|
251
|
+
}
|
234
252
|
}
|
235
253
|
}
|
236
254
|
},
|
@@ -246,6 +264,14 @@ $.extend( RowGroup.prototype, {
|
|
246
264
|
{
|
247
265
|
var row;
|
248
266
|
|
267
|
+
if ( display === null || display === undefined || display === '' ) {
|
268
|
+
display = this.c.emptyDataGroup;
|
269
|
+
}
|
270
|
+
|
271
|
+
if ( display === null ) {
|
272
|
+
return null;
|
273
|
+
}
|
274
|
+
|
249
275
|
if ( typeof display === 'object' && display.nodeName && display.nodeName.toLowerCase() === 'tr') {
|
250
276
|
row = $(display);
|
251
277
|
}
|
@@ -289,6 +315,12 @@ RowGroup.defaults = {
|
|
289
315
|
*/
|
290
316
|
dataSrc: 0,
|
291
317
|
|
318
|
+
/**
|
319
|
+
* Text to show if no data is found for a group
|
320
|
+
* @type string
|
321
|
+
*/
|
322
|
+
emptyDataGroup: 'No group',
|
323
|
+
|
292
324
|
/**
|
293
325
|
* Initial enablement state
|
294
326
|
* @boolean
|
@@ -323,7 +355,7 @@ RowGroup.defaults = {
|
|
323
355
|
};
|
324
356
|
|
325
357
|
|
326
|
-
RowGroup.version = "1.0.
|
358
|
+
RowGroup.version = "1.0.3";
|
327
359
|
|
328
360
|
|
329
361
|
$.fn.dataTable.RowGroup = RowGroup;
|