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.
Files changed (115) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +2 -0
  3. data/app/assets/javascripts/datatables/dataTables.foundation.js +2 -2
  4. data/app/assets/javascripts/datatables/dataTables.uikit.js +1 -1
  5. data/app/assets/javascripts/datatables/extensions/AutoFill/autoFill.dataTables.js +38 -0
  6. data/app/assets/javascripts/datatables/extensions/AutoFill/dataTables.autoFill.js +52 -12
  7. data/app/assets/javascripts/datatables/extensions/Buttons/buttons.colVis.js +4 -8
  8. data/app/assets/javascripts/datatables/extensions/Buttons/buttons.dataTables.js +38 -0
  9. data/app/assets/javascripts/datatables/extensions/Buttons/buttons.flash.js +17 -7
  10. data/app/assets/javascripts/datatables/extensions/Buttons/buttons.html5.js +33 -19
  11. data/app/assets/javascripts/datatables/extensions/Buttons/buttons.print.js +14 -3
  12. data/app/assets/javascripts/datatables/extensions/Buttons/dataTables.buttons.js +120 -53
  13. data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.bootstrap.js +38 -0
  14. data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.bootstrap4.js +38 -0
  15. data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.dataTables.js +38 -0
  16. data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.foundation.js +38 -0
  17. data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.jqueryui.js +38 -0
  18. data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.semanicui.js +38 -0
  19. data/app/assets/javascripts/datatables/extensions/ColReorder/dataTables.colReorder.js +76 -13
  20. data/app/assets/javascripts/datatables/extensions/FixedColumns/dataTables.fixedColumns.js +23 -17
  21. data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.bootstrap.js +38 -0
  22. data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.bootstrap4.js +38 -0
  23. data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.dataTables.js +38 -0
  24. data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.foundation.js +38 -0
  25. data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.jqueryui.js +38 -0
  26. data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.semanicui.js +38 -0
  27. data/app/assets/javascripts/datatables/extensions/FixedHeader/dataTables.fixedHeader.js +26 -11
  28. data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.bootstrap.js +38 -0
  29. data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.bootstrap4.js +38 -0
  30. data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.dataTables.js +38 -0
  31. data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.foundation.js +38 -0
  32. data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.jqueryui.js +38 -0
  33. data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.semanicui.js +38 -0
  34. data/app/assets/javascripts/datatables/extensions/KeyTable/dataTables.keyTable.js +141 -75
  35. data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.bootstrap.js +38 -0
  36. data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.bootstrap4.js +38 -0
  37. data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.dataTables.js +38 -0
  38. data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.foundation.js +38 -0
  39. data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.jqueryui.js +38 -0
  40. data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.semanicui.js +38 -0
  41. data/app/assets/javascripts/datatables/extensions/Responsive/dataTables.responsive.js +64 -26
  42. data/app/assets/javascripts/datatables/extensions/Responsive/responsive.dataTables.js +38 -0
  43. data/app/assets/javascripts/datatables/extensions/RowGroup/dataTables.rowGroup.js +45 -13
  44. data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.bootstrap.js +38 -0
  45. data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.bootstrap4.js +38 -0
  46. data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.dataTables.js +38 -0
  47. data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.foundation.js +38 -0
  48. data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.jqueryui.js +38 -0
  49. data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.semanicui.js +38 -0
  50. data/app/assets/javascripts/datatables/extensions/RowReorder/dataTables.rowReorder.js +24 -6
  51. data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.bootstrap.js +38 -0
  52. data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.bootstrap4.js +38 -0
  53. data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.dataTables.js +38 -0
  54. data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.foundation.js +38 -0
  55. data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.jqueryui.js +38 -0
  56. data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.semanicui.js +38 -0
  57. data/app/assets/javascripts/datatables/extensions/Scroller/dataTables.scroller.js +93 -87
  58. data/app/assets/javascripts/datatables/extensions/Scroller/scroller.bootstrap.js +38 -0
  59. data/app/assets/javascripts/datatables/extensions/Scroller/scroller.bootstrap4.js +38 -0
  60. data/app/assets/javascripts/datatables/extensions/Scroller/scroller.dataTables.js +38 -0
  61. data/app/assets/javascripts/datatables/extensions/Scroller/scroller.foundation.js +38 -0
  62. data/app/assets/javascripts/datatables/extensions/Scroller/scroller.jqueryui.js +38 -0
  63. data/app/assets/javascripts/datatables/extensions/Scroller/scroller.semanticui.js +38 -0
  64. data/app/assets/javascripts/datatables/extensions/Select/dataTables.select.js +41 -14
  65. data/app/assets/javascripts/datatables/extensions/Select/select.bootstrap.js +38 -0
  66. data/app/assets/javascripts/datatables/extensions/Select/select.bootstrap4.js +38 -0
  67. data/app/assets/javascripts/datatables/extensions/Select/select.dataTables.js +38 -0
  68. data/app/assets/javascripts/datatables/extensions/Select/select.foundation.js +38 -0
  69. data/app/assets/javascripts/datatables/extensions/Select/select.jqueryui.js +38 -0
  70. data/app/assets/javascripts/datatables/extensions/Select/select.semanticui.js +38 -0
  71. data/app/assets/javascripts/datatables/jquery.dataTables.js +125 -72
  72. data/app/assets/stylesheets/datatables/dataTables.bootstrap4.scss +4 -0
  73. data/app/assets/stylesheets/datatables/dataTables.foundation.scss +5 -5
  74. data/app/assets/stylesheets/datatables/dataTables.material.scss +1 -1
  75. data/app/assets/stylesheets/datatables/dataTables.uikit.scss +33 -22
  76. data/app/assets/stylesheets/datatables/extensions/AutoFill/autoFill.bootstrap.scss +9 -0
  77. data/app/assets/stylesheets/datatables/extensions/AutoFill/autoFill.bootstrap4.scss +9 -0
  78. data/app/assets/stylesheets/datatables/extensions/Buttons/buttons.dataTables.scss +3 -2
  79. data/app/assets/stylesheets/datatables/extensions/Buttons/buttons.jqueryui.scss +2 -4
  80. data/app/assets/stylesheets/datatables/extensions/Buttons/mixins.scss +5 -0
  81. data/app/assets/stylesheets/datatables/extensions/FixedColumns/fixedColumns.bootstrap4.scss +3 -6
  82. data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.bootstrap.scss +1 -1
  83. data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.bootstrap4.scss +1 -1
  84. data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.dataTables.scss +6 -5
  85. data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.foundation.scss +1 -1
  86. data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.semanticui.scss +1 -1
  87. data/app/assets/stylesheets/datatables/extensions/Scroller/scroller.bootstrap.scss +1 -1
  88. data/app/assets/stylesheets/datatables/extensions/Scroller/scroller.bootstrap4.scss +2 -4
  89. data/app/assets/stylesheets/datatables/jquery.dataTables.scss +5 -5
  90. data/jquery-datatables.gemspec +4 -2
  91. data/lib/generators/jquery/datatables/install_generator.rb +22 -6
  92. data/lib/generators/jquery/datatables/templates/{bootstrap.js.tt → javascripts/bootstrap.js.tt} +0 -0
  93. data/lib/generators/jquery/datatables/templates/{bootstrap4.js.tt → javascripts/bootstrap4.js.tt} +0 -0
  94. data/lib/generators/jquery/datatables/templates/{foundation.js.tt → javascripts/foundation.js.tt} +0 -0
  95. data/lib/generators/jquery/datatables/templates/javascripts/initializer.js.tt +30 -0
  96. data/lib/generators/jquery/datatables/templates/{jqueryui.js.tt → javascripts/jqueryui.js.tt} +0 -0
  97. data/lib/generators/jquery/datatables/templates/{material.js.tt → javascripts/material.js.tt} +0 -0
  98. data/lib/generators/jquery/datatables/templates/{regular.js.tt → javascripts/regular.js.tt} +0 -0
  99. data/lib/generators/jquery/datatables/templates/{semanticui.js.tt → javascripts/semanticui.js.tt} +0 -0
  100. data/lib/generators/jquery/datatables/templates/{uikit.js.tt → javascripts/uikit.js.tt} +0 -0
  101. data/lib/generators/jquery/datatables/templates/{bootstrap.scss.tt → stylesheets/bootstrap.scss.tt} +0 -0
  102. data/lib/generators/jquery/datatables/templates/{bootstrap4.scss.tt → stylesheets/bootstrap4.scss.tt} +0 -0
  103. data/lib/generators/jquery/datatables/templates/{foundation.scss.tt → stylesheets/foundation.scss.tt} +0 -0
  104. data/lib/generators/jquery/datatables/templates/{jqueryui.scss.tt → stylesheets/jqueryui.scss.tt} +0 -0
  105. data/lib/generators/jquery/datatables/templates/{material.scss.tt → stylesheets/material.scss.tt} +0 -0
  106. data/lib/generators/jquery/datatables/templates/{regular.scss.tt → stylesheets/regular.scss.tt} +0 -0
  107. data/lib/generators/jquery/datatables/templates/{semanticui.scss.tt → stylesheets/semanticui.scss.tt} +0 -0
  108. data/lib/generators/jquery/datatables/templates/{uikit.scss.tt → stylesheets/uikit.scss.tt} +0 -0
  109. data/lib/generators/jquery/datatables/templates/views/index.html.erb +17 -0
  110. data/lib/generators/jquery/datatables/templates/views/index.html.slim +12 -0
  111. data/lib/generators/jquery/datatables/templates/views/index.json.jbuilder +10 -0
  112. data/lib/jquery-datatables.rb +53 -5
  113. data/lib/jquery-datatables/engine.rb +2 -0
  114. data/lib/jquery-datatables/version.rb +1 -1
  115. 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.1-dev
2
- * 2014-2017 SpryMedia Ltd - datatables.net/license
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.1-dev
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-2017 SpryMedia Ltd.
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.3' ) ) {
101
- throw 'DataTables Responsive requires DataTables 1.10.3 or newer';
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 (e, ctx, col, vis) {
212
- that._classLogic();
213
- that._resizeAuto();
214
- that._resize();
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 && ! display[i] ) {
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
- var selector = typeof target === 'number' ?
951
- ':eq('+target+')' :
952
- target;
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
- $( selector, dt.rows( { page: 'current' } ).nodes() )
961
- .attr( 'tabIndex', ctx.iTabIndex )
962
- .data( 'dtr-keyboard', 1 );
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.1-dev';
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
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.2
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
- this
224
- ._rowWrap( display, this.c.startClassName )
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
- this
232
- ._rowWrap( display, this.c.endClassName )
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.2";
358
+ RowGroup.version = "1.0.3";
327
359
 
328
360
 
329
361
  $.fn.dataTable.RowGroup = RowGroup;