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
+ /*! jQuery UI styling wrapper for FixedHeader
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-fixedheader'], 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.FixedHeader ) {
24
+ require('datatables.net-fixedheader')(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 FixedHeader
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-fixedheader'], 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.FixedHeader ) {
24
+ require('datatables.net-fixedheader')(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
- /*! KeyTable 2.3.2
2
- * ©2009-2017 SpryMedia Ltd - datatables.net/license
1
+ /*! KeyTable 2.4.0
2
+ * ©2009-2018 SpryMedia Ltd - datatables.net/license
3
3
  */
4
4
 
5
5
  /**
6
6
  * @summary KeyTable
7
7
  * @description Spreadsheet like keyboard navigation for DataTables
8
- * @version 2.3.2
8
+ * @version 2.4.0
9
9
  * @file dataTables.keyTable.js
10
10
  * @author SpryMedia Ltd (www.sprymedia.co.uk)
11
11
  * @contact www.sprymedia.co.uk/contact
12
- * @copyright Copyright 2009-2017 SpryMedia Ltd.
12
+ * @copyright Copyright 2009-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
@@ -287,12 +287,19 @@ $.extend( KeyTable.prototype, {
287
287
  }
288
288
  } );
289
289
 
290
+ // Clipboard support
291
+ if ( this.c.clipboard ) {
292
+ this._clipboard();
293
+ }
294
+
290
295
  dt.on( 'destroy.keyTable', function () {
291
296
  dt.off( '.keyTable' );
292
297
  $( dt.table().body() ).off( 'click.keyTable', 'th, td' );
293
- $( document.body )
298
+ $( document )
294
299
  .off( 'keydown.keyTable' )
295
- .off( 'click.keyTable' );
300
+ .off( 'click.keyTable' )
301
+ .off( 'copy.keyTable' )
302
+ .off( 'paste.keyTable' );
296
303
  } );
297
304
 
298
305
  // Initial focus comes from state or options
@@ -315,8 +322,6 @@ $.extend( KeyTable.prototype, {
315
322
  },
316
323
 
317
324
 
318
-
319
-
320
325
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
321
326
  * Private methods
322
327
  */
@@ -342,44 +347,71 @@ $.extend( KeyTable.prototype, {
342
347
  this._emitEvent( 'key-blur', [ this.s.dt, cell ] );
343
348
  },
344
349
 
350
+
345
351
  /**
346
- * Copy text from the focused cell to clipboard
352
+ * Clipboard interaction handlers
347
353
  *
348
354
  * @private
349
355
  */
350
- _clipboardCopy: function ()
351
- {
356
+ _clipboard: function () {
352
357
  var dt = this.s.dt;
358
+ var that = this;
353
359
 
354
- // If there is a cell focused, and there is no other text selected
355
- // allow the focused cell's text to be copied to clipboard
356
- if ( this.s.lastFocus && window.getSelection && !window.getSelection().toString() ) {
357
- var cell = this.s.lastFocus.cell;
358
- var text = cell.render('display');
359
- var hiddenDiv = $('<div/>')
360
- .css( {
361
- height: 1,
362
- width: 1,
363
- overflow: 'hidden',
364
- position: 'fixed',
365
- top: 0,
366
- left: 0
367
- } );
368
- var textarea = $('<textarea readonly/>')
369
- .val( text )
370
- .appendTo( hiddenDiv );
371
-
372
- try {
373
- hiddenDiv.appendTo( dt.table().container() );
374
- textarea[0].focus();
375
- textarea[0].select();
360
+ // IE8 doesn't support getting selected text
361
+ if ( ! window.getSelection ) {
362
+ return;
363
+ }
376
364
 
377
- document.execCommand( 'copy' );
365
+ $(document).on( 'copy.keyTable', function (ejq) {
366
+ var e = ejq.originalEvent;
367
+ var selection = window.getSelection().toString();
368
+ var focused = that.s.lastFocus;
369
+
370
+ // Only copy cell text to clipboard if there is no other selection
371
+ // and there is a focused cell
372
+ if ( ! selection && focused ) {
373
+ e.clipboardData.setData(
374
+ 'text/plain',
375
+ focused.cell.render( that.c.clipboardOrthogonal )
376
+ );
377
+ e.preventDefault();
378
378
  }
379
- catch (e) {}
379
+ } );
380
380
 
381
- hiddenDiv.remove();
382
- }
381
+ $(document).on( 'paste.keyTable', function (ejq) {
382
+ var e = ejq.originalEvent;
383
+ var focused = that.s.lastFocus;
384
+ var activeEl = document.activeElement;
385
+ var editor = that.c.editor;
386
+ var pastedText;
387
+
388
+ if ( focused && (! activeEl || activeEl.nodeName.toLowerCase() === 'body') ) {
389
+ e.preventDefault();
390
+
391
+ if ( window.clipboardData && window.clipboardData.getData ) {
392
+ // IE
393
+ pastedText = window.clipboardData.getData('Text');
394
+ }
395
+ else if ( e.clipboardData && e.clipboardData.getData ) {
396
+ // Everything else
397
+ pastedText = e.clipboardData.getData('text/plain');
398
+ }
399
+
400
+ if ( editor ) {
401
+ // Got Editor - need to activate inline editing,
402
+ // set the value and submit
403
+ editor
404
+ .inline( focused.cell.index() )
405
+ .set( editor.displayed()[0], pastedText )
406
+ .submit();
407
+ }
408
+ else {
409
+ // No editor, so just dump the data in
410
+ focused.cell.data( pastedText );
411
+ dt.draw(false);
412
+ }
413
+ }
414
+ } );
383
415
  },
384
416
 
385
417
 
@@ -424,8 +456,15 @@ $.extend( KeyTable.prototype, {
424
456
  return;
425
457
  }
426
458
 
427
- // Don't activate inline editing when the shift key is pressed
428
- if ( key === 16 ) {
459
+ // Don't activate Editor on control key presses
460
+ if (
461
+ (key >= 0x00 && key <= 0x09) ||
462
+ key === 0x0b ||
463
+ key === 0x0c ||
464
+ (key >= 0x0e && key <= 0x1f) ||
465
+ (key >= 0x70 && key <= 0x7b) ||
466
+ (key >= 0x7f && key <= 0x9f)
467
+ ) {
429
468
  return;
430
469
  }
431
470
 
@@ -437,38 +476,52 @@ $.extend( KeyTable.prototype, {
437
476
  orig.preventDefault();
438
477
  }
439
478
 
440
- editor
441
- .one( 'open.keyTable', function () {
442
- // Remove cancel open
443
- editor.off( 'cancelOpen.keyTable' );
479
+ var editInline = function () {
480
+ editor
481
+ .one( 'open.keyTable', function () {
482
+ // Remove cancel open
483
+ editor.off( 'cancelOpen.keyTable' );
444
484
 
445
- // Excel style - select all text
446
- if ( that.c.editAutoSelect ) {
447
- $('div.DTE_Field_InputControl input, div.DTE_Field_InputControl textarea').select();
448
- }
485
+ // Excel style - select all text
486
+ if ( that.c.editAutoSelect ) {
487
+ $('div.DTE_Field_InputControl input, div.DTE_Field_InputControl textarea').select();
488
+ }
449
489
 
450
- // Reduce the keys the Keys listens for
451
- dt.keys.enable( that.c.editorKeys );
490
+ // Reduce the keys the Keys listens for
491
+ dt.keys.enable( that.c.editorKeys );
452
492
 
453
- // On blur of the navigation submit
454
- dt.one( 'key-blur.editor', function () {
455
- if ( editor.displayed() ) {
456
- editor.submit();
457
- }
458
- } );
493
+ // On blur of the navigation submit
494
+ dt.one( 'key-blur.editor', function () {
495
+ if ( editor.displayed() ) {
496
+ editor.submit();
497
+ }
498
+ } );
459
499
 
460
- // Restore full key navigation on close
461
- editor.one( 'close', function () {
462
- dt.keys.enable( true );
463
- dt.off( 'key-blur.editor' );
464
- } );
465
- } )
466
- .one( 'cancelOpen.keyTable', function () {
467
- // `preOpen` can cancel the display of the form, so it
468
- // might be that the open event handler isn't needed
469
- editor.off( 'open.keyTable' );
470
- } )
471
- .inline( this.s.lastFocus.cell.index() );
500
+ // Restore full key navigation on close
501
+ editor.one( 'close', function () {
502
+ dt.keys.enable( true );
503
+ dt.off( 'key-blur.editor' );
504
+ } );
505
+ } )
506
+ .one( 'cancelOpen.keyTable', function () {
507
+ // `preOpen` can cancel the display of the form, so it
508
+ // might be that the open event handler isn't needed
509
+ editor.off( 'open.keyTable' );
510
+ } )
511
+ .inline( that.s.lastFocus.cell.index() );
512
+ };
513
+
514
+ // Editor 1.7 listens for `return` on keyup, so if return is the trigger
515
+ // key, we need to wait for `keyup` otherwise Editor would just submit
516
+ // the content triggered by this keypress.
517
+ if ( key === 13 ) {
518
+ $(document).one( 'keyup', function () { // immediately removed
519
+ editInline();
520
+ } );
521
+ }
522
+ else {
523
+ editInline();
524
+ }
472
525
  },
473
526
 
474
527
 
@@ -515,6 +568,11 @@ $.extend( KeyTable.prototype, {
515
568
  }
516
569
 
517
570
  if ( typeof row !== 'number' ) {
571
+ // Its an API instance - check that there is actually a row
572
+ if ( ! row.any() ) {
573
+ return;
574
+ }
575
+
518
576
  // Convert the cell to a row and column
519
577
  var index = row.index();
520
578
  column = index.column;
@@ -629,12 +687,7 @@ $.extend( KeyTable.prototype, {
629
687
  return;
630
688
  }
631
689
 
632
- if ( e.ctrlKey && e.keyCode === 67 ) { // c
633
- this._clipboardCopy();
634
- return;
635
- }
636
-
637
- if ( e.keyCode === 0 || e.ctrlKey || e.metaKey || e.altKey ) {
690
+ if ( (e.keyCode === 0 || e.ctrlKey || e.metaKey || e.altKey) && !(e.ctrlKey && e.altKey) ) {
638
691
  return;
639
692
  }
640
693
 
@@ -646,6 +699,7 @@ $.extend( KeyTable.prototype, {
646
699
 
647
700
  var that = this;
648
701
  var dt = this.s.dt;
702
+ var scrolling = this.s.dt.settings()[0].oScroll.sY ? true : false;
649
703
 
650
704
  // If we are not listening for this key, do nothing
651
705
  if ( this.c.keys && $.inArray( e.keyCode, this.c.keys ) === -1 ) {
@@ -666,7 +720,7 @@ $.extend( KeyTable.prototype, {
666
720
 
667
721
  case 33: // page up (previous page)
668
722
  case 34: // page down (next page)
669
- if ( navEnable ) {
723
+ if ( navEnable && !scrolling ) {
670
724
  e.preventDefault();
671
725
 
672
726
  dt
@@ -936,6 +990,18 @@ KeyTable.defaults = {
936
990
  */
937
991
  className: 'focus',
938
992
 
993
+ /**
994
+ * Enable or disable clipboard support
995
+ * @type {Boolean}
996
+ */
997
+ clipboard: true,
998
+
999
+ /**
1000
+ * Orthogonal data that should be copied to clipboard
1001
+ * @type {string}
1002
+ */
1003
+ clipboardOrthogonal: 'display',
1004
+
939
1005
  /**
940
1006
  * Columns that can be focused. This is automatically merged with the
941
1007
  * visible columns as only visible columns can gain focus.
@@ -990,7 +1056,7 @@ KeyTable.defaults = {
990
1056
 
991
1057
 
992
1058
 
993
- KeyTable.version = "2.3.2";
1059
+ KeyTable.version = "2.4.0";
994
1060
 
995
1061
 
996
1062
  $.fn.dataTable.KeyTable = KeyTable;
@@ -0,0 +1,38 @@
1
+ /*! Bootstrap 3 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-bs', '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-bs')(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-bs4', '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-bs4')(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
+ }));