jquery-datatables 1.10.19.1 → 1.10.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +1 -0
  3. data/README.md +28 -1
  4. data/app/assets/javascripts/datatables/dataTables.uikit.js +2 -2
  5. data/app/assets/javascripts/datatables/extensions/AutoFill/dataTables.autoFill.js +42 -29
  6. data/app/assets/javascripts/datatables/extensions/Buttons/buttons.bootstrap.js +1 -1
  7. data/app/assets/javascripts/datatables/extensions/Buttons/buttons.bootstrap4.js +8 -2
  8. data/app/assets/javascripts/datatables/extensions/Buttons/buttons.colVis.js +6 -3
  9. data/app/assets/javascripts/datatables/extensions/Buttons/buttons.foundation.js +5 -4
  10. data/app/assets/javascripts/datatables/extensions/Buttons/buttons.html5.js +58 -6
  11. data/app/assets/javascripts/datatables/extensions/Buttons/buttons.print.js +16 -5
  12. data/app/assets/javascripts/datatables/extensions/Buttons/buttons.semanticui.js +1 -1
  13. data/app/assets/javascripts/datatables/extensions/Buttons/dataTables.buttons.js +267 -152
  14. data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.foundation.js +1 -1
  15. data/app/assets/javascripts/datatables/extensions/ColReorder/dataTables.colReorder.js +121 -52
  16. data/app/assets/javascripts/datatables/extensions/FixedColumns/dataTables.fixedColumns.js +32 -5
  17. data/app/assets/javascripts/datatables/extensions/KeyTable/dataTables.keyTable.js +166 -63
  18. data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.foundation.js +1 -1
  19. data/app/assets/javascripts/datatables/extensions/RowGroup/dataTables.rowGroup.js +105 -53
  20. data/app/assets/javascripts/datatables/extensions/RowGroup/rowGroup.foundation.js +1 -1
  21. data/app/assets/javascripts/datatables/extensions/RowGroup/{rowGroup.semanicui.js → rowGroup.semanticui.js} +0 -0
  22. data/app/assets/javascripts/datatables/extensions/RowReorder/dataTables.rowReorder.js +10 -9
  23. data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.foundation.js +1 -1
  24. data/app/assets/javascripts/datatables/extensions/Scroller/dataTables.scroller.js +519 -636
  25. data/app/assets/javascripts/datatables/extensions/Scroller/scroller.foundation.js +1 -1
  26. data/app/assets/javascripts/datatables/extensions/Select/dataTables.select.js +49 -18
  27. data/app/assets/javascripts/datatables/extensions/Select/select.foundation.js +1 -1
  28. data/app/assets/javascripts/datatables/jquery.dataTables.js +97 -60
  29. data/app/assets/javascripts/datatables/plugins/api/average.js +7 -6
  30. data/app/assets/javascripts/datatables/plugins/api/sum.js +7 -6
  31. data/app/assets/javascripts/datatables/plugins/pagination/ellipses.js +160 -0
  32. data/app/assets/javascripts/datatables/plugins/pagination/extjs.js +137 -0
  33. data/app/assets/javascripts/datatables/plugins/pagination/four_button.js +110 -0
  34. data/app/assets/javascripts/datatables/plugins/pagination/full_numbers_no_ellipses.js +59 -0
  35. data/app/assets/javascripts/datatables/plugins/pagination/input.js +22 -19
  36. data/app/assets/javascripts/datatables/plugins/pagination/scrolling.js +130 -0
  37. data/app/assets/javascripts/datatables/plugins/pagination/select.js +97 -0
  38. data/app/assets/javascripts/datatables/plugins/pagination/simple_incremental_bootstrap.js +154 -0
  39. data/app/assets/javascripts/datatables/plugins/pagination/simple_numbers_no_ellipses.js +59 -0
  40. data/app/assets/javascripts/datatables/plugins/search/dataTables.alphabetSearch.js +440 -399
  41. data/app/assets/javascripts/datatables/plugins/sorting/enum.js +51 -0
  42. data/app/assets/javascripts/datatables/plugins/type-detection/date-dd-MMM-yyyy.js +63 -0
  43. data/app/assets/javascripts/datatables/plugins/type-detection/date-de.js +125 -0
  44. data/app/assets/javascripts/datatables/plugins/type-detection/date-eu.js +64 -0
  45. data/app/assets/javascripts/datatables/plugins/type-detection/date-euro.js +48 -0
  46. data/app/assets/javascripts/datatables/plugins/type-detection/date-uk.js +35 -12
  47. data/app/assets/javascripts/datatables/plugins/type-detection/datetime-moment.js +74 -0
  48. data/app/assets/javascripts/datatables/plugins/type-detection/datetime-us.js +86 -0
  49. data/app/assets/javascripts/datatables/plugins/type-detection/file-size.js +37 -13
  50. data/app/assets/javascripts/datatables/plugins/type-detection/ip-address.js +113 -11
  51. data/app/assets/javascripts/datatables/plugins/type-detection/numString.js +63 -0
  52. data/app/assets/javascripts/datatables/plugins/type-detection/percent.js +34 -0
  53. data/app/assets/javascripts/datatables/plugins/type-detection/time-elapsed-dhms.js +42 -0
  54. data/app/assets/javascripts/datatables/plugins/type-detection/time.js +56 -0
  55. data/app/assets/javascripts/datatables/plugins/type-detection/title-numeric.js +40 -0
  56. data/app/assets/javascripts/datatables/plugins/type-detection/title-string.js +36 -0
  57. data/app/assets/stylesheets/datatables/extensions/AutoFill/autoFill.dataTables.scss +10 -3
  58. data/app/assets/stylesheets/datatables/extensions/Buttons/buttons.bootstrap.scss +12 -3
  59. data/app/assets/stylesheets/datatables/extensions/Buttons/buttons.bootstrap4.scss +13 -6
  60. data/app/assets/stylesheets/datatables/extensions/Buttons/buttons.dataTables.scss +2 -0
  61. data/app/assets/stylesheets/datatables/extensions/Buttons/buttons.foundation.scss +5 -1
  62. data/app/assets/stylesheets/datatables/extensions/Buttons/buttons.jqueryui.scss +1 -0
  63. data/app/assets/stylesheets/datatables/extensions/Buttons/buttons.semanticui.scss +2 -1
  64. data/app/assets/stylesheets/datatables/extensions/Buttons/common.scss +10 -0
  65. data/app/assets/stylesheets/datatables/extensions/Buttons/mixins.scss +42 -30
  66. data/app/assets/stylesheets/datatables/extensions/FixedColumns/fixedColumns.bootstrap.scss +11 -7
  67. data/app/assets/stylesheets/datatables/extensions/FixedColumns/fixedColumns.foundation.scss +1 -0
  68. data/app/assets/stylesheets/datatables/extensions/KeyTable/keyTable.dataTables.scss +13 -5
  69. data/app/assets/stylesheets/datatables/extensions/RowGroup/rowGroup.dataTables.scss +20 -2
  70. data/app/assets/stylesheets/datatables/extensions/Scroller/scroller.dataTables.scss +15 -2
  71. data/lib/jquery-datatables/version.rb +1 -1
  72. metadata +26 -12
  73. data/app/assets/javascripts/datatables/dataTables.bootstrap2.js +0 -162
  74. data/app/assets/javascripts/datatables/extensions/ColReorder/colReorder.semanicui.js +0 -38
  75. data/app/assets/javascripts/datatables/extensions/FixedColumns/fixedColumns.semanicui.js +0 -38
  76. data/app/assets/javascripts/datatables/extensions/FixedHeader/fixedHeader.semanicui.js +0 -38
  77. data/app/assets/javascripts/datatables/extensions/KeyTable/keyTable.semanicui.js +0 -38
  78. data/app/assets/javascripts/datatables/extensions/RowReorder/rowReorder.semanicui.js +0 -38
  79. data/app/assets/stylesheets/datatables/dataTables.bootstrap2.scss +0 -178
@@ -0,0 +1,40 @@
1
+ /**
2
+ * An alternative to the formatted number sorting function above (particularly
3
+ * useful when considering localisation which uses dots / periods for 10^3
4
+ * separation rather than decimal places). Another method of overcoming it
5
+ * difficulties of sorting formatted numbers is to have the data to be sorted
6
+ * upon separate from the visual data. This sorting function pair will use the
7
+ * 'title' attribute of en empty span element (or anything else) to sort
8
+ * numerically (for example `<span title="1000000"><span>1'000'000`).
9
+ *
10
+ * Note that the HTML5 `data-sort` attribute can be [used to supply sorting data
11
+ * to DataTables](//datatables.net/manual/orthogonal-data) and is preferable to
12
+ * using this method, which is therefore marked as deprecated.
13
+ *
14
+ * @name Hidden title numeric sorting
15
+ * @summary Sort data numerically based on an attribute on an empty element.
16
+ * @deprecated
17
+ * @author [Allan Jardine](http://sprymedia.co.uk)
18
+ *
19
+ * @example
20
+ * $('#example').dataTable( {
21
+ * columnDefs: [
22
+ * { type: 'title-numeric', targets: 0 }
23
+ * ]
24
+ * } );
25
+ */
26
+
27
+ jQuery.extend( jQuery.fn.dataTableExt.oSort, {
28
+ "title-numeric-pre": function ( a ) {
29
+ var x = a.match(/title="*(-?[0-9\.]+)/)[1];
30
+ return parseFloat( x );
31
+ },
32
+
33
+ "title-numeric-asc": function ( a, b ) {
34
+ return ((a < b) ? -1 : ((a > b) ? 1 : 0));
35
+ },
36
+
37
+ "title-numeric-desc": function ( a, b ) {
38
+ return ((a < b) ? 1 : ((a > b) ? -1 : 0));
39
+ }
40
+ } );
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Just like the _hidden title numeric sorting_ plug-in, this sorting plug-in
3
+ * will take the information to be sorted on from the title attribute of a span
4
+ * element. The only difference is that it is string based sorting rather than
5
+ * numeric.
6
+ *
7
+ * Note that the HTML5 `data-sort` attribute can be [used to supply sorting data
8
+ * to DataTables](//datatables.net/manual/orthogonal-data) and is preferable to
9
+ * using this method, which is therefore marked as deprecated.
10
+ *
11
+ * @name Hidden title string sorting
12
+ * @summary Sort data as a string based on an attribute on an empty element.
13
+ * @author [Allan Jardine](http://sprymedia.co.uk)
14
+ * @deprecated
15
+ *
16
+ * @example
17
+ * $('#example').dataTable( {
18
+ * columnDefs: [
19
+ * { type: 'title-string', targets: 0 }
20
+ * ]
21
+ * } );
22
+ */
23
+
24
+ jQuery.extend( jQuery.fn.dataTableExt.oSort, {
25
+ "title-string-pre": function ( a ) {
26
+ return a.match(/title="(.*?)"/)[1].toLowerCase();
27
+ },
28
+
29
+ "title-string-asc": function ( a, b ) {
30
+ return ((a < b) ? -1 : ((a > b) ? 1 : 0));
31
+ },
32
+
33
+ "title-string-desc": function ( a, b ) {
34
+ return ((a < b) ? 1 : ((a > b) ? -1 : 0));
35
+ }
36
+ } );
@@ -1,8 +1,8 @@
1
1
 
2
2
  $autofill-define-button: true !default;
3
3
  $autofill-outline: #4989de !default;
4
- $autofill-handle-border: 1px solid #316ad1 !default;
5
- $autofill-handle-background: linear-gradient(to bottom, #abcffb 0%, #4989de 100%) !default;
4
+ $autofill-handle-background: #3366ff !default;
5
+ $autofill-handle-background-focus: #ff8b33 !default;
6
6
 
7
7
 
8
8
  div.dt-autofill-handle {
@@ -12,8 +12,15 @@ div.dt-autofill-handle {
12
12
  z-index: 102;
13
13
 
14
14
  box-sizing: border-box;
15
- border: $autofill-handle-border;
16
15
  background: $autofill-handle-background;
16
+ cursor: pointer;
17
+ }
18
+
19
+ // KeyTable alt focus
20
+ div.dtk-focus-alt {
21
+ div.dt-autofill-handle {
22
+ background: $autofill-handle-background-focus;
23
+ }
17
24
  }
18
25
 
19
26
  div.dt-autofill-select {
@@ -2,9 +2,18 @@
2
2
  @import 'mixins.scss';
3
3
  @import 'common.scss';
4
4
 
5
- ul.dt-button-collection.dropdown-menu {
6
- display: block;
7
- z-index: 2002;
5
+ div.dt-button-collection {
6
+ position: absolute;
7
+
8
+ ul.dropdown-menu {
9
+ display: block;
10
+ z-index: 2002;
11
+ min-width: 100%;
12
+ }
13
+
14
+ div.dt-button-collection-title {
15
+ background-color: white;
16
+ }
8
17
 
9
18
  @include dtb-fixed-collection();
10
19
  }
@@ -2,14 +2,21 @@
2
2
  @import 'mixins.scss';
3
3
  @import 'common.scss';
4
4
 
5
- ul.dt-button-collection.dropdown-menu {
6
- display: block;
7
- z-index: 2002;
5
+ div.dt-button-collection {
6
+ position: absolute;
7
+ z-index: 2001;
8
+
9
+ div.dropdown-menu {
10
+ display: block;
11
+ z-index: 2002;
12
+ min-width: 100%;
13
+ }
8
14
 
9
- @include dtb-fixed-collection();
10
- }
15
+ div.dt-button-collection-title {
16
+ background-color: white;
17
+ border: 1px solid rgba(0, 0, 0, 0.15);
18
+ }
11
19
 
12
- ul.dt-button-collection {
13
20
  @include dtb-fixed-collection();
14
21
 
15
22
  &.fixed {
@@ -27,6 +27,7 @@ a.dt-button {
27
27
  user-select: none;
28
28
  text-decoration: none;
29
29
  outline: none;
30
+ text-overflow: ellipsis;
30
31
 
31
32
  &.disabled {
32
33
  color: #999;
@@ -92,6 +93,7 @@ div.dt-button-collection {
92
93
  z-index: 2002;
93
94
  border-radius: 5px;
94
95
  box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.3);
96
+ box-sizing: border-box;
95
97
 
96
98
  button.dt-button,
97
99
  div.dt-button,
@@ -17,7 +17,9 @@ ul.dt-buttons.button-group a {
17
17
  // active class to look wrong
18
18
  }
19
19
 
20
- ul.dt-button-collection.f-dropdown {
20
+ div.dt-button-collection {
21
+ position: absolute;
22
+
21
23
  @include dtb-fixed-collection();
22
24
 
23
25
  &.fixed {
@@ -60,11 +62,13 @@ div.button-group.stacked.dropdown-pane {
60
62
  z-index: 89;
61
63
 
62
64
  a.button {
65
+ display: block;
63
66
  margin-bottom: 1px;
64
67
  border-right: none;
65
68
 
66
69
  &:last-child {
67
70
  margin-bottom: 0;
71
+ margin-right: 1px;
68
72
  }
69
73
  }
70
74
  }
@@ -49,6 +49,7 @@ div.dt-button-collection {
49
49
  left: 0;
50
50
  right: 0;
51
51
  width: 100%;
52
+ box-sizing: border-box;
52
53
 
53
54
  display: block;
54
55
  float: none;
@@ -6,7 +6,7 @@ div.dt-button-collection {
6
6
  position: absolute;
7
7
  top: 0;
8
8
  left: 0;
9
- width: 150px;
9
+ min-width: 200px;
10
10
  margin-top: 3px !important;
11
11
  z-index: 2002;
12
12
  background: white;
@@ -20,6 +20,7 @@ button.buttons-collection.ui.button span:after {
20
20
  padding-left: 0.5em;
21
21
  }
22
22
 
23
+
23
24
  div.dt-button-background {
24
25
  position: fixed;
25
26
  top: 0;
@@ -25,3 +25,13 @@ div.dt-button-info {
25
25
  padding: 1em;
26
26
  }
27
27
  }
28
+
29
+ div.dt-button-collection-title {
30
+ text-align: center;
31
+ padding: 0.3em 0 0.5em;
32
+ font-size: 0.9em;
33
+ }
34
+
35
+ div.dt-button-collection-title:empty {
36
+ display: none;
37
+ }
@@ -30,7 +30,7 @@
30
30
  border-radius: 0;
31
31
 
32
32
  &.two-column {
33
- margin-left: -150px;
33
+ margin-left: -200px;
34
34
  }
35
35
 
36
36
  &.three-column {
@@ -42,49 +42,61 @@
42
42
  }
43
43
  }
44
44
 
45
- // Multi-column layout feature
46
- -webkit-column-gap: 8px;
47
- -moz-column-gap: 8px;
48
- -ms-column-gap: 8px;
49
- -o-column-gap: 8px;
50
- column-gap: 8px;
45
+ > :last-child {
46
+ > * {
47
+ -webkit-column-break-inside: avoid;
48
+ break-inside: avoid;
49
+ }
51
50
 
52
- > * {
53
- -webkit-column-break-inside: avoid;
54
- break-inside: avoid;
51
+ // Multi-column layout feature
52
+ display: block !important;
53
+ -webkit-column-gap: 8px;
54
+ -moz-column-gap: 8px;
55
+ -ms-column-gap: 8px;
56
+ -o-column-gap: 8px;
57
+ column-gap: 8px;
55
58
  }
56
59
 
57
60
  &.two-column {
58
- width: 300px;
59
- padding-bottom: 1px;
60
-
61
- -webkit-column-count: 2;
62
- -moz-column-count: 2;
63
- -ms-column-count: 2;
64
- -o-column-count: 2;
65
- column-count: 2;
61
+ width: 400px;
62
+
63
+ > :last-child {
64
+ padding-bottom: 1px;
65
+
66
+ -webkit-column-count: 2;
67
+ -moz-column-count: 2;
68
+ -ms-column-count: 2;
69
+ -o-column-count: 2;
70
+ column-count: 2;
71
+ }
66
72
  }
67
73
 
68
74
  &.three-column {
69
75
  width: 450px;
70
- padding-bottom: 1px;
71
76
 
72
- -webkit-column-count: 3;
73
- -moz-column-count: 3;
74
- -ms-column-count: 3;
75
- -o-column-count: 3;
76
- column-count: 3;
77
+ > :last-child {
78
+ padding-bottom: 1px;
79
+
80
+ -webkit-column-count: 3;
81
+ -moz-column-count: 3;
82
+ -ms-column-count: 3;
83
+ -o-column-count: 3;
84
+ column-count: 3;
85
+ }
77
86
  }
78
87
 
79
88
  &.four-column {
80
89
  width: 600px;
81
- padding-bottom: 1px;
82
90
 
83
- -webkit-column-count: 4;
84
- -moz-column-count: 4;
85
- -ms-column-count: 4;
86
- -o-column-count: 4;
87
- column-count: 4;
91
+ > :last-child {
92
+ padding-bottom: 1px;
93
+
94
+ -webkit-column-count: 4;
95
+ -moz-column-count: 4;
96
+ -ms-column-count: 4;
97
+ -o-column-count: 4;
98
+ column-count: 4;
99
+ }
88
100
  }
89
101
 
90
102
  // Chrome fix - 531528
@@ -14,16 +14,20 @@ div.DTFC_LeftBodyWrapper table,
14
14
  div.DTFC_RightBodyWrapper table {
15
15
  border-top: none;
16
16
  margin: 0 !important;
17
+ z-index: 2;
17
18
 
18
19
  // Hide sorting icons
19
20
  thead {
20
- .sorting:after,
21
- .sorting_asc:after,
22
- .sorting_desc:after,
23
- .sorting:after,
24
- .sorting_asc:after,
25
- .sorting_desc:after {
26
- display: none;
21
+ .sorting,
22
+ .sorting_asc,
23
+ .sorting_desc,
24
+ .sorting,
25
+ .sorting_asc,
26
+ .sorting_desc {
27
+ &:before,
28
+ &:after {
29
+ display: none;
30
+ }
27
31
  }
28
32
  }
29
33
 
@@ -26,6 +26,7 @@ div.DTFC_RightBodyWrapper table {
26
26
  div.DTFC_LeftFootWrapper table,
27
27
  div.DTFC_RightFootWrapper table {
28
28
  margin-top: 0 !important;
29
+ z-index: 2;
29
30
  }
30
31
 
31
32
  // Block out the gap above the scrollbar on the right, when there is a fixed
@@ -1,11 +1,19 @@
1
1
 
2
- $keytable-focus: #3366FF !default;
2
+ $keytable-focus: #3366ff !default;
3
+ $keytable-focus-alt: #ff8b33 !default;
3
4
 
4
- table.dataTable {
5
- tbody {
5
+ table.dataTable tbody {
6
+ th.focus,
7
+ td.focus {
8
+ box-shadow: inset 0 0 1px 2px $keytable-focus;
9
+ }
10
+ }
11
+
12
+ div.dtk-focus-alt {
13
+ table.dataTable tbody {
6
14
  th.focus,
7
15
  td.focus {
8
- box-shadow: inset 0 0 1px 2px $keytable-focus;
16
+ box-shadow: inset 0 0 1px 2px $keytable-focus-alt;
9
17
  }
10
18
  }
11
- }
19
+ }
@@ -1,9 +1,27 @@
1
1
 
2
2
 
3
3
  $table-rowgroup-background: #e0e0e0 !default;
4
+ $table-rowgroup-background-level-1: #f0f0f0 !default;
5
+ $table-rowgroup-background-level-2: #f3f3f3 !default;
4
6
 
5
- table.dataTable tr.group td {
6
- font-weight: bold;
7
+ table.dataTable tr.dtrg-group td {
7
8
  background-color: $table-rowgroup-background;
8
9
  }
9
10
 
11
+ table.dataTable tr.dtrg-group.dtrg-level-0 td {
12
+ font-weight: bold;
13
+ }
14
+
15
+ table.dataTable tr.dtrg-group.dtrg-level-1 td,
16
+ table.dataTable tr.dtrg-group.dtrg-level-2 td {
17
+ background-color: $table-rowgroup-background-level-1;
18
+ padding-top: 0.25em;
19
+ padding-bottom: 0.25em;
20
+ padding-left: 2em;
21
+ font-size: 0.9em;
22
+ }
23
+
24
+ table.dataTable tr.dtrg-group.dtrg-level-2 td {
25
+ background-color: $table-rowgroup-background-level-2;
26
+ }
27
+
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Scroller adds the class `DTS` to the DataTabes wrapper div
3
- div.DTS {
3
+ div.dts {
4
4
  display: block !important;
5
5
 
6
6
  tbody th,
@@ -9,10 +9,23 @@ div.DTS {
9
9
  }
10
10
 
11
11
  // Show the loading message behind the table
12
- div.DTS_Loading {
12
+ div.dts_loading {
13
13
  z-index: 1;
14
14
  }
15
15
 
16
+ div.dts_label {
17
+ position: absolute;
18
+ right: 10px;
19
+ background: rgba(0, 0, 0, 0.8);
20
+ color: white;
21
+ box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.5);
22
+ text-align: right;
23
+ border-radius: 3px;
24
+ padding: 0.4em;
25
+ z-index: 2;
26
+ display: none;
27
+ }
28
+
16
29
  div.dataTables_scrollBody {
17
30
  background: repeating-linear-gradient(
18
31
  45deg,