effective_datatables 2.6.6 → 2.6.7
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 +47 -47
- data/app/assets/javascripts/dataTables/buttons/buttons.colVis.js +182 -181
- data/app/assets/javascripts/dataTables/buttons/buttons.html5.js +1201 -684
- data/app/assets/javascripts/dataTables/buttons/buttons.print.js +144 -127
- data/app/assets/javascripts/dataTables/buttons/dataTables.buttons.js +1463 -1405
- data/app/assets/javascripts/dataTables/colreorder/dataTables.colReorder.js +27 -0
- data/app/assets/javascripts/dataTables/dataTables.bootstrap.js +182 -0
- data/app/assets/javascripts/dataTables/jquery.dataTables.js +15278 -0
- data/app/assets/javascripts/dataTables/jszip/jszip.js +9155 -0
- data/app/assets/javascripts/dataTables/responsive/dataTables.responsive.js +1232 -0
- data/app/assets/javascripts/dataTables/responsive/responsive.bootstrap.js +81 -0
- data/app/assets/javascripts/effective_datatables.js +7 -8
- data/app/assets/stylesheets/dataTables/buttons/{buttons.bootstrap.min.css → buttons.bootstrap.css} +0 -0
- data/app/assets/stylesheets/dataTables/colReorder/colReorder.bootstrap.css +11 -0
- data/app/assets/stylesheets/dataTables/{dataTables.bootstrap.min.css → dataTables.bootstrap.css} +1 -3
- data/app/assets/stylesheets/dataTables/responsive/responsive.bootstrap.css +181 -0
- data/app/assets/stylesheets/effective_datatables.scss +4 -10
- data/app/assets/stylesheets/effective_datatables/_overrides.scss.erb +5 -25
- data/lib/effective_datatables/version.rb +1 -1
- metadata +12 -16
- data/app/assets/javascripts/dataTables/dataTables.colReorder.min.js +0 -26
- data/app/assets/javascripts/dataTables/jquery.dataTables.bootstrap.js +0 -220
- data/app/assets/javascripts/dataTables/jquery.dataTables.min.js +0 -164
- data/app/assets/javascripts/dataTables/responsive/dataTables.responsive.min.js +0 -23
- data/app/assets/javascripts/dataTables/responsive/responsive.bootstrap.min.js +0 -7
- data/app/assets/javascripts/vendor/jszip.min.js +0 -14
- data/app/assets/stylesheets/dataTables/buttons/buttons.dataTables.min.css +0 -298
- data/app/assets/stylesheets/dataTables/colReorder/colReorder.bootstrap.min.css +0 -1
- data/app/assets/stylesheets/dataTables/colReorder/colReorder.dataTables.min.css +0 -1
- data/app/assets/stylesheets/dataTables/jquery.dataTables.min.css +0 -453
- data/app/assets/stylesheets/dataTables/responsive/responsive.bootstrap.min.css +0 -1
- data/app/assets/stylesheets/dataTables/responsive/responsive.dataTables.min.css +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 785f08010eeacf3514ddf868347c5719a00aa1de
|
4
|
+
data.tar.gz: 62cae48ebd12531d63a3e323ff144c464ea7bb83
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9aedcc7ee4675cb68b2dedf452de2400cd508b96ade8eb1f6681e545ac91fa5786ffb7a79e8d62fe57509e2c2a7948293bcaee4c6e9a5b76b20beb4900503507
|
7
|
+
data.tar.gz: 8756e72f0973466a19794d14218ea8b793a27ccddf22f4104e488051ab782f5aa7b99ec166b61a2ec4ed5aed03be9726872f6a447de835a616cedc8996e4b1e3
|
@@ -1,66 +1,66 @@
|
|
1
1
|
/*! Bootstrap integration for DataTables' Buttons
|
2
|
-
* ©
|
2
|
+
* ©2016 SpryMedia Ltd - datatables.net/license
|
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-buttons'], 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.Buttons ) {
|
24
|
+
require('datatables.net-buttons')(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;
|
37
37
|
|
38
38
|
|
39
39
|
$.extend( true, DataTable.Buttons.defaults, {
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
40
|
+
dom: {
|
41
|
+
container: {
|
42
|
+
className: 'dt-buttons btn-group'
|
43
|
+
},
|
44
|
+
button: {
|
45
|
+
className: 'btn btn-default'
|
46
|
+
},
|
47
|
+
collection: {
|
48
|
+
tag: 'ul',
|
49
|
+
className: 'dt-button-collection dropdown-menu',
|
50
|
+
button: {
|
51
|
+
tag: 'li',
|
52
|
+
className: 'dt-button'
|
53
|
+
},
|
54
|
+
buttonLiner: {
|
55
|
+
tag: 'a',
|
56
|
+
className: ''
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
60
|
} );
|
61
61
|
|
62
62
|
DataTable.ext.buttons.collection.text = function ( dt ) {
|
63
|
-
|
63
|
+
return dt.i18n('buttons.collection', 'Collection <span class="caret"/>');
|
64
64
|
};
|
65
65
|
|
66
66
|
|
@@ -1,195 +1,196 @@
|
|
1
1
|
/*!
|
2
2
|
* Column visibility buttons for Buttons and DataTables.
|
3
|
-
*
|
3
|
+
* 2016 SpryMedia Ltd - datatables.net/license
|
4
4
|
*/
|
5
5
|
|
6
6
|
(function( factory ){
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
7
|
+
if ( typeof define === 'function' && define.amd ) {
|
8
|
+
// AMD
|
9
|
+
define( ['jquery', 'datatables.net', 'datatables.net-buttons'], function ( $ ) {
|
10
|
+
return factory( $, window, document );
|
11
|
+
} );
|
12
|
+
}
|
13
|
+
else if ( typeof exports === 'object' ) {
|
14
|
+
// CommonJS
|
15
|
+
module.exports = function (root, $) {
|
16
|
+
if ( ! root ) {
|
17
|
+
root = window;
|
18
|
+
}
|
19
|
+
|
20
|
+
if ( ! $ || ! $.fn.dataTable ) {
|
21
|
+
$ = require('datatables.net')(root, $).$;
|
22
|
+
}
|
23
|
+
|
24
|
+
if ( ! $.fn.dataTable.Buttons ) {
|
25
|
+
require('datatables.net-buttons')(root, $);
|
26
|
+
}
|
27
|
+
|
28
|
+
return factory( $, root, root.document );
|
29
|
+
};
|
30
|
+
}
|
31
|
+
else {
|
32
|
+
// Browser
|
33
|
+
factory( jQuery, window, document );
|
34
|
+
}
|
35
35
|
}(function( $, window, document, undefined ) {
|
36
36
|
'use strict';
|
37
37
|
var DataTable = $.fn.dataTable;
|
38
38
|
|
39
39
|
|
40
40
|
$.extend( DataTable.ext.buttons, {
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
41
|
+
// A collection of column visibility buttons
|
42
|
+
colvis: function ( dt, conf ) {
|
43
|
+
return {
|
44
|
+
extend: 'collection',
|
45
|
+
text: function ( dt ) {
|
46
|
+
return dt.i18n( 'buttons.colvis', 'Column visibility' );
|
47
|
+
},
|
48
|
+
className: 'buttons-colvis',
|
49
|
+
buttons: [ {
|
50
|
+
extend: 'columnsToggle',
|
51
|
+
columns: conf.columns
|
52
|
+
} ]
|
53
|
+
};
|
54
|
+
},
|
55
|
+
|
56
|
+
// Selected columns with individual buttons - toggle column visibility
|
57
|
+
columnsToggle: function ( dt, conf ) {
|
58
|
+
var columns = dt.columns( conf.columns ).indexes().map( function ( idx ) {
|
59
|
+
return {
|
60
|
+
extend: 'columnToggle',
|
61
|
+
columns: idx
|
62
|
+
};
|
63
|
+
} ).toArray();
|
64
|
+
|
65
|
+
return columns;
|
66
|
+
},
|
67
|
+
|
68
|
+
// Single button to toggle column visibility
|
69
|
+
columnToggle: function ( dt, conf ) {
|
70
|
+
return {
|
71
|
+
extend: 'columnVisibility',
|
72
|
+
columns: conf.columns
|
73
|
+
};
|
74
|
+
},
|
75
|
+
|
76
|
+
// Selected columns with individual buttons - set column visibility
|
77
|
+
columnsVisibility: function ( dt, conf ) {
|
78
|
+
var columns = dt.columns( conf.columns ).indexes().map( function ( idx ) {
|
79
|
+
return {
|
80
|
+
extend: 'columnVisibility',
|
81
|
+
columns: idx,
|
82
|
+
visibility: conf.visibility
|
83
|
+
};
|
84
|
+
} ).toArray();
|
85
|
+
|
86
|
+
return columns;
|
87
|
+
},
|
88
|
+
|
89
|
+
// Single button to set column visibility
|
90
|
+
columnVisibility: {
|
91
|
+
columns: undefined, // column selector
|
92
|
+
text: function ( dt, button, conf ) {
|
93
|
+
return conf._columnText( dt, conf.columns );
|
94
|
+
},
|
95
|
+
className: 'buttons-columnVisibility',
|
96
|
+
action: function ( e, dt, button, conf ) {
|
97
|
+
var col = dt.columns( conf.columns );
|
98
|
+
var curr = col.visible();
|
99
|
+
|
100
|
+
col.visible( conf.visibility !== undefined ?
|
101
|
+
conf.visibility :
|
102
|
+
! (curr.length ? curr[0] : false )
|
103
|
+
);
|
104
|
+
},
|
105
|
+
init: function ( dt, button, conf ) {
|
106
|
+
var that = this;
|
107
|
+
|
108
|
+
dt
|
109
|
+
.on( 'column-visibility.dt'+conf.namespace, function (e, settings) {
|
110
|
+
if ( ! settings.bDestroying ) {
|
111
|
+
that.active( dt.column( conf.columns ).visible() );
|
112
|
+
}
|
113
|
+
} )
|
114
|
+
.on( 'column-reorder.dt'+conf.namespace, function (e, settings, details) {
|
115
|
+
// Don't rename buttons based on column name if the button
|
116
|
+
// controls more than one column!
|
117
|
+
if ( dt.columns( conf.columns ).count() !== 1 ) {
|
118
|
+
return;
|
119
|
+
}
|
120
|
+
|
121
|
+
if ( typeof conf.columns === 'number' ) {
|
122
|
+
conf.columns = details.mapping[ conf.columns ];
|
123
|
+
}
|
124
|
+
|
125
|
+
var col = dt.column( conf.columns );
|
126
|
+
|
127
|
+
that.text( conf._columnText( dt, conf.columns ) );
|
128
|
+
that.active( col.visible() );
|
129
|
+
} );
|
130
|
+
|
131
|
+
this.active( dt.column( conf.columns ).visible() );
|
132
|
+
},
|
133
|
+
destroy: function ( dt, button, conf ) {
|
134
|
+
dt
|
135
|
+
.off( 'column-visibility.dt'+conf.namespace )
|
136
|
+
.off( 'column-reorder.dt'+conf.namespace );
|
137
|
+
},
|
138
|
+
|
139
|
+
_columnText: function ( dt, col ) {
|
140
|
+
// Use DataTables' internal data structure until this is presented
|
141
|
+
// is a public API. The other option is to use
|
142
|
+
// `$( column(col).node() ).text()` but the node might not have been
|
143
|
+
// populated when Buttons is constructed.
|
144
|
+
var idx = dt.column( col ).index();
|
145
|
+
return dt.settings()[0].aoColumns[ idx ].sTitle
|
146
|
+
.replace(/\n/g," ") // remove new lines
|
147
|
+
.replace( /<.*?>/g, "" ) // strip HTML
|
148
|
+
.replace(/^\s+|\s+$/g,""); // trim
|
149
|
+
}
|
150
|
+
},
|
151
|
+
|
152
|
+
|
153
|
+
colvisRestore: {
|
154
|
+
className: 'buttons-colvisRestore',
|
155
|
+
|
156
|
+
text: function ( dt ) {
|
157
|
+
return dt.i18n( 'buttons.colvisRestore', 'Restore visibility' );
|
158
|
+
},
|
159
|
+
|
160
|
+
init: function ( dt, button, conf ) {
|
161
|
+
conf._visOriginal = dt.columns().indexes().map( function ( idx ) {
|
162
|
+
return dt.column( idx ).visible();
|
163
|
+
} ).toArray();
|
164
|
+
},
|
165
|
+
|
166
|
+
action: function ( e, dt, button, conf ) {
|
167
|
+
dt.columns().every( function ( i ) {
|
168
|
+
// Take into account that ColReorder might have disrupted our
|
169
|
+
// indexes
|
170
|
+
var idx = dt.colReorder && dt.colReorder.transpose ?
|
171
|
+
dt.colReorder.transpose( i, 'toOriginal' ) :
|
172
|
+
i;
|
173
|
+
|
174
|
+
this.visible( conf._visOriginal[ idx ] );
|
175
|
+
} );
|
176
|
+
}
|
177
|
+
},
|
178
|
+
|
179
|
+
|
180
|
+
colvisGroup: {
|
181
|
+
className: 'buttons-colvisGroup',
|
182
|
+
|
183
|
+
action: function ( e, dt, button, conf ) {
|
184
|
+
dt.columns( conf.show ).visible( true, false );
|
185
|
+
dt.columns( conf.hide ).visible( false, false );
|
186
|
+
|
187
|
+
dt.columns.adjust();
|
188
|
+
},
|
189
|
+
|
190
|
+
show: [],
|
191
|
+
|
192
|
+
hide: []
|
193
|
+
}
|
193
194
|
} );
|
194
195
|
|
195
196
|
|