effective_datatables 3.2.7 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/javascripts/dataTables/buttons/buttons.bootstrap.js +3 -1
- data/app/assets/javascripts/dataTables/buttons/buttons.colVis.js +19 -10
- data/app/assets/javascripts/dataTables/buttons/buttons.html5.js +126 -77
- data/app/assets/javascripts/dataTables/buttons/buttons.print.js +45 -35
- data/app/assets/javascripts/dataTables/buttons/dataTables.buttons.js +177 -9
- data/app/assets/javascripts/dataTables/dataTables.bootstrap.js +1 -1
- data/app/assets/javascripts/dataTables/jquery.dataTables.js +15217 -15281
- data/app/assets/javascripts/dataTables/responsive/dataTables.responsive.js +1183 -1065
- data/app/assets/javascripts/dataTables/responsive/responsive.bootstrap.js +59 -55
- data/app/assets/stylesheets/dataTables/buttons/buttons.bootstrap.css +56 -0
- data/app/assets/stylesheets/dataTables/dataTables.bootstrap.css +10 -7
- data/app/assets/stylesheets/dataTables/responsive/responsive.bootstrap.css +10 -11
- data/app/assets/stylesheets/effective_datatables/_filters.scss +1 -0
- data/app/assets/stylesheets/effective_datatables/_overrides.scss +13 -15
- data/app/assets/stylesheets/effective_datatables.scss +0 -1
- data/app/helpers/effective_datatables_helper.rb +1 -1
- data/lib/effective_datatables/version.rb +1 -1
- metadata +1 -2
- data/app/assets/stylesheets/dataTables/colReorder/colReorder.bootstrap.css +0 -11
@@ -3,34 +3,34 @@
|
|
3
3
|
*/
|
4
4
|
|
5
5
|
(function( factory ){
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
6
|
+
if ( typeof define === 'function' && define.amd ) {
|
7
|
+
// AMD
|
8
|
+
define( ['jquery', 'datatables.net-bs', '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
18
|
|
19
|
-
|
20
|
-
|
21
|
-
|
19
|
+
if ( ! $ || ! $.fn.dataTable ) {
|
20
|
+
$ = require('datatables.net-bs')(root, $).$;
|
21
|
+
}
|
22
22
|
|
23
|
-
|
24
|
-
|
25
|
-
|
23
|
+
if ( ! $.fn.dataTable.Responsive ) {
|
24
|
+
require('datatables.net-responsive')(root, $);
|
25
|
+
}
|
26
26
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
27
|
+
return factory( $, root, root.document );
|
28
|
+
};
|
29
|
+
}
|
30
|
+
else {
|
31
|
+
// Browser
|
32
|
+
factory( jQuery, window, document );
|
33
|
+
}
|
34
34
|
}(function( $, window, document, undefined ) {
|
35
35
|
'use strict';
|
36
36
|
var DataTable = $.fn.dataTable;
|
@@ -39,41 +39,45 @@ var DataTable = $.fn.dataTable;
|
|
39
39
|
var _display = DataTable.Responsive.display;
|
40
40
|
var _original = _display.modal;
|
41
41
|
var _modal = $(
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
42
|
+
'<div class="modal fade dtr-bs-modal" role="dialog">'+
|
43
|
+
'<div class="modal-dialog" role="document">'+
|
44
|
+
'<div class="modal-content">'+
|
45
|
+
'<div class="modal-header">'+
|
46
|
+
'<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>'+
|
47
|
+
'</div>'+
|
48
|
+
'<div class="modal-body"/>'+
|
49
|
+
'</div>'+
|
50
|
+
'</div>'+
|
51
|
+
'</div>'
|
52
52
|
);
|
53
53
|
|
54
54
|
_display.modal = function ( options ) {
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
55
|
+
return function ( row, update, render ) {
|
56
|
+
if ( ! $.fn.modal ) {
|
57
|
+
_original( row, update, render );
|
58
|
+
}
|
59
|
+
else {
|
60
|
+
if ( ! update ) {
|
61
|
+
if ( options && options.header ) {
|
62
|
+
var header = _modal.find('div.modal-header');
|
63
|
+
var button = header.find('button').detach();
|
64
|
+
|
65
|
+
header
|
66
|
+
.empty()
|
67
|
+
.append( '<h4 class="modal-title">'+options.header( row )+'</h4>' )
|
68
|
+
.prepend( button );
|
69
|
+
}
|
66
70
|
|
67
|
-
|
68
|
-
|
69
|
-
|
71
|
+
_modal.find( 'div.modal-body' )
|
72
|
+
.empty()
|
73
|
+
.append( render() );
|
70
74
|
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
75
|
+
_modal
|
76
|
+
.appendTo( 'body' )
|
77
|
+
.modal();
|
78
|
+
}
|
79
|
+
}
|
80
|
+
};
|
77
81
|
};
|
78
82
|
|
79
83
|
|
@@ -1,3 +1,32 @@
|
|
1
|
+
@keyframes dtb-spinner {
|
2
|
+
100% {
|
3
|
+
transform: rotate(360deg);
|
4
|
+
}
|
5
|
+
}
|
6
|
+
@-o-keyframes dtb-spinner {
|
7
|
+
100% {
|
8
|
+
-o-transform: rotate(360deg);
|
9
|
+
transform: rotate(360deg);
|
10
|
+
}
|
11
|
+
}
|
12
|
+
@-ms-keyframes dtb-spinner {
|
13
|
+
100% {
|
14
|
+
-ms-transform: rotate(360deg);
|
15
|
+
transform: rotate(360deg);
|
16
|
+
}
|
17
|
+
}
|
18
|
+
@-webkit-keyframes dtb-spinner {
|
19
|
+
100% {
|
20
|
+
-webkit-transform: rotate(360deg);
|
21
|
+
transform: rotate(360deg);
|
22
|
+
}
|
23
|
+
}
|
24
|
+
@-moz-keyframes dtb-spinner {
|
25
|
+
100% {
|
26
|
+
-moz-transform: rotate(360deg);
|
27
|
+
transform: rotate(360deg);
|
28
|
+
}
|
29
|
+
}
|
1
30
|
div.dt-button-info {
|
2
31
|
position: fixed;
|
3
32
|
top: 50%;
|
@@ -100,3 +129,30 @@ div.dt-button-background {
|
|
100
129
|
float: none;
|
101
130
|
}
|
102
131
|
}
|
132
|
+
div.dt-buttons button.btn.processing,
|
133
|
+
div.dt-buttons div.btn.processing,
|
134
|
+
div.dt-buttons a.btn.processing {
|
135
|
+
color: rgba(0, 0, 0, 0.2);
|
136
|
+
}
|
137
|
+
div.dt-buttons button.btn.processing:after,
|
138
|
+
div.dt-buttons div.btn.processing:after,
|
139
|
+
div.dt-buttons a.btn.processing:after {
|
140
|
+
position: absolute;
|
141
|
+
top: 50%;
|
142
|
+
left: 50%;
|
143
|
+
width: 16px;
|
144
|
+
height: 16px;
|
145
|
+
margin: -8px 0 0 -8px;
|
146
|
+
box-sizing: border-box;
|
147
|
+
display: block;
|
148
|
+
content: ' ';
|
149
|
+
border: 2px solid #282828;
|
150
|
+
border-radius: 50%;
|
151
|
+
border-left-color: transparent;
|
152
|
+
border-right-color: transparent;
|
153
|
+
animation: dtb-spinner 1500ms infinite linear;
|
154
|
+
-o-animation: dtb-spinner 1500ms infinite linear;
|
155
|
+
-ms-animation: dtb-spinner 1500ms infinite linear;
|
156
|
+
-webkit-animation: dtb-spinner 1500ms infinite linear;
|
157
|
+
-moz-animation: dtb-spinner 1500ms infinite linear;
|
158
|
+
}
|
@@ -117,22 +117,25 @@ div.dataTables_scrollHead table.dataTable {
|
|
117
117
|
margin-bottom: 0 !important;
|
118
118
|
}
|
119
119
|
|
120
|
-
div.dataTables_scrollBody table {
|
120
|
+
div.dataTables_scrollBody > table {
|
121
121
|
border-top: none;
|
122
122
|
margin-top: 0 !important;
|
123
123
|
margin-bottom: 0 !important;
|
124
124
|
}
|
125
|
-
div.dataTables_scrollBody table thead .sorting:after,
|
126
|
-
div.dataTables_scrollBody table thead .sorting_asc:after,
|
127
|
-
div.dataTables_scrollBody table thead .sorting_desc:after {
|
125
|
+
div.dataTables_scrollBody > table > thead .sorting:after,
|
126
|
+
div.dataTables_scrollBody > table > thead .sorting_asc:after,
|
127
|
+
div.dataTables_scrollBody > table > thead .sorting_desc:after {
|
128
128
|
display: none;
|
129
129
|
}
|
130
|
-
div.dataTables_scrollBody table tbody tr:first-child th,
|
131
|
-
div.dataTables_scrollBody table tbody tr:first-child td {
|
130
|
+
div.dataTables_scrollBody > table > tbody > tr:first-child > th,
|
131
|
+
div.dataTables_scrollBody > table > tbody > tr:first-child > td {
|
132
132
|
border-top: none;
|
133
133
|
}
|
134
134
|
|
135
|
-
div.dataTables_scrollFoot
|
135
|
+
div.dataTables_scrollFoot > .dataTables_scrollFootInner {
|
136
|
+
box-sizing: content-box;
|
137
|
+
}
|
138
|
+
div.dataTables_scrollFoot > .dataTables_scrollFootInner > table {
|
136
139
|
margin-top: 0 !important;
|
137
140
|
border-top: none;
|
138
141
|
}
|
@@ -8,14 +8,14 @@ table.dataTable.dtr-inline.collapsed > tbody > tr > th.child:before,
|
|
8
8
|
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dataTables_empty:before {
|
9
9
|
display: none !important;
|
10
10
|
}
|
11
|
-
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child,
|
12
|
-
table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child {
|
11
|
+
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > td:first-child,
|
12
|
+
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > th:first-child {
|
13
13
|
position: relative;
|
14
14
|
padding-left: 30px;
|
15
15
|
cursor: pointer;
|
16
16
|
}
|
17
|
-
table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before,
|
18
|
-
table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
|
17
|
+
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > td:first-child:before,
|
18
|
+
table.dataTable.dtr-inline.collapsed > tbody > tr[role="row"] > th:first-child:before {
|
19
19
|
top: 9px;
|
20
20
|
left: 4px;
|
21
21
|
height: 14px;
|
@@ -28,6 +28,7 @@ table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
|
|
28
28
|
box-shadow: 0 0 3px #444;
|
29
29
|
box-sizing: content-box;
|
30
30
|
text-align: center;
|
31
|
+
text-indent: 0 !important;
|
31
32
|
font-family: 'Courier New', Courier, monospace;
|
32
33
|
line-height: 14px;
|
33
34
|
content: '+';
|
@@ -38,9 +39,6 @@ table.dataTable.dtr-inline.collapsed > tbody > tr.parent > th:first-child:before
|
|
38
39
|
content: '-';
|
39
40
|
background-color: #d33333;
|
40
41
|
}
|
41
|
-
table.dataTable.dtr-inline.collapsed > tbody > tr.child td:before {
|
42
|
-
display: none;
|
43
|
-
}
|
44
42
|
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > td:first-child,
|
45
43
|
table.dataTable.dtr-inline.collapsed.compact > tbody > tr > th:first-child {
|
46
44
|
padding-left: 27px;
|
@@ -76,6 +74,7 @@ table.dataTable.dtr-column > tbody > tr > th.control:before {
|
|
76
74
|
box-shadow: 0 0 3px #444;
|
77
75
|
box-sizing: content-box;
|
78
76
|
text-align: center;
|
77
|
+
text-indent: 0 !important;
|
79
78
|
font-family: 'Courier New', Courier, monospace;
|
80
79
|
line-height: 14px;
|
81
80
|
content: '+';
|
@@ -92,20 +91,20 @@ table.dataTable > tbody > tr.child {
|
|
92
91
|
table.dataTable > tbody > tr.child:hover {
|
93
92
|
background: transparent !important;
|
94
93
|
}
|
95
|
-
table.dataTable > tbody > tr.child ul {
|
94
|
+
table.dataTable > tbody > tr.child ul.dtr-details {
|
96
95
|
display: inline-block;
|
97
96
|
list-style-type: none;
|
98
97
|
margin: 0;
|
99
98
|
padding: 0;
|
100
99
|
}
|
101
|
-
table.dataTable > tbody > tr.child ul li {
|
100
|
+
table.dataTable > tbody > tr.child ul.dtr-details > li {
|
102
101
|
border-bottom: 1px solid #efefef;
|
103
102
|
padding: 0.5em 0;
|
104
103
|
}
|
105
|
-
table.dataTable > tbody > tr.child ul li:first-child {
|
104
|
+
table.dataTable > tbody > tr.child ul.dtr-details > li:first-child {
|
106
105
|
padding-top: 0;
|
107
106
|
}
|
108
|
-
table.dataTable > tbody > tr.child ul li:last-child {
|
107
|
+
table.dataTable > tbody > tr.child ul.dtr-details > li:last-child {
|
109
108
|
border-bottom: none;
|
110
109
|
}
|
111
110
|
table.dataTable > tbody > tr.child span.dtr-title {
|
@@ -1,6 +1,7 @@
|
|
1
1
|
.effective-datatables-filters { margin-bottom: 10px; }
|
2
2
|
.effective-datatables-filters-scopes { display: inline-block; margin-right: 10px; }
|
3
3
|
.effective-datatables-filters-inputs { display: inline-block; }
|
4
|
+
.effective-datatables-filters-inputs span.select2-container { display: inline-block; }
|
4
5
|
.effective-datatables-filters-inputs .form-group { margin-right: 10px; }
|
5
6
|
.effective-datatables-filters-inputs .control-label { margin-right: 3px; }
|
6
7
|
.effective-datatables-filters-btn { display: inline-block; }
|
@@ -1,17 +1,17 @@
|
|
1
1
|
// Use asset-data-url to prevent 3 additional GET requests for icons
|
2
2
|
table.dataTable thead .sorting {
|
3
3
|
background-image: asset-data-url('dataTables/sort_both.png');
|
4
|
-
background-position:
|
4
|
+
background-position: right 0px bottom 14px;
|
5
5
|
}
|
6
6
|
|
7
7
|
table.dataTable thead .sorting_asc {
|
8
8
|
background-image: asset-data-url('dataTables/sort_asc.png');
|
9
|
-
background-position:
|
9
|
+
background-position: right 0px bottom 14px;
|
10
10
|
}
|
11
11
|
|
12
12
|
table.dataTable thead .sorting_desc {
|
13
13
|
background-image: asset-data-url('dataTables/sort_desc.png');
|
14
|
-
background-position:
|
14
|
+
background-position: right 0px bottom 14px;
|
15
15
|
}
|
16
16
|
|
17
17
|
// Override bootstrap default glyphicons
|
@@ -40,8 +40,7 @@ table.dataTable thead {
|
|
40
40
|
.form-control, .form-group {
|
41
41
|
width: 100%;
|
42
42
|
font-weight: normal;
|
43
|
-
margin
|
44
|
-
margin-right: 0px;
|
43
|
+
margin: 0px;
|
45
44
|
}
|
46
45
|
|
47
46
|
.datatable_search__bulk_actions { margin-left: 5px; }
|
@@ -61,11 +60,12 @@ table.dataTable.simple {
|
|
61
60
|
|
62
61
|
// Processing popup
|
63
62
|
div.dataTables_wrapper div.dataTables_processing {
|
64
|
-
top: -
|
63
|
+
top: -10px;
|
65
64
|
border: none;
|
66
65
|
box-shadow: none;
|
67
|
-
margin-left: -
|
68
|
-
|
66
|
+
margin-left: -35%;
|
67
|
+
margin-bottom: 0;
|
68
|
+
width: 70%;
|
69
69
|
}
|
70
70
|
|
71
71
|
// Show x per page
|
@@ -146,13 +146,11 @@ div.dataTables_wrapper div.dataTables_info {
|
|
146
146
|
padding: 5px 0px 6px 6px;
|
147
147
|
}
|
148
148
|
|
149
|
-
// Collapsed
|
150
|
-
table.dataTable > tbody > tr.child
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
table.dataTable.dtr-inline.collapsed > tbody > tr:not(.child) > th:first-child {
|
155
|
-
padding-left: 30px !important;
|
149
|
+
// Collapsed Responsive View
|
150
|
+
table.dataTable > tbody > tr.child {
|
151
|
+
span.dtr-title { min-width: 175px; margin-bottom: 4px; }
|
152
|
+
span.dtr-data { white-space: nowrap; }
|
153
|
+
.col-resource_item { margin-bottom: 4px; }
|
156
154
|
}
|
157
155
|
|
158
156
|
// Column specific adjustments
|
@@ -32,7 +32,7 @@ module EffectiveDatatablesHelper
|
|
32
32
|
'display-start' => datatable.display_start,
|
33
33
|
'input-js-options' => (input_js || {}).to_json.html_safe,
|
34
34
|
'reset' => datatable_reset(datatable),
|
35
|
-
'simple' => simple
|
35
|
+
'simple' => datatable.simple?.to_s,
|
36
36
|
'source' => effective_datatables.datatable_path(datatable, {format: 'json'}),
|
37
37
|
'total-records' => datatable.to_json[:recordsTotal]
|
38
38
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_datatables
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
@@ -114,7 +114,6 @@ files:
|
|
114
114
|
- app/assets/javascripts/vendor/jquery.delayedChange.js
|
115
115
|
- app/assets/javascripts/vendor/jquery.fileDownload.js
|
116
116
|
- app/assets/stylesheets/dataTables/buttons/buttons.bootstrap.css
|
117
|
-
- app/assets/stylesheets/dataTables/colReorder/colReorder.bootstrap.css
|
118
117
|
- app/assets/stylesheets/dataTables/dataTables.bootstrap.css
|
119
118
|
- app/assets/stylesheets/dataTables/responsive/responsive.bootstrap.css
|
120
119
|
- app/assets/stylesheets/effective_datatables.scss
|