effective_datatables 4.17.4 → 4.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/dataTables/UPGRADE.md +17 -0
- data/app/assets/javascripts/dataTables/buttons/buttons.bootstrap4.js +73 -19
- data/app/assets/javascripts/dataTables/buttons/buttons.colVis.js +166 -120
- data/app/assets/javascripts/dataTables/buttons/buttons.html5.js +749 -667
- data/app/assets/javascripts/dataTables/buttons/buttons.print.js +96 -64
- data/app/assets/javascripts/dataTables/buttons/dataTables.buttons.js +1568 -909
- data/app/assets/javascripts/dataTables/dataTables.bootstrap4.js +172 -154
- data/app/assets/javascripts/dataTables/jquery.dataTables.js +3119 -2704
- data/app/assets/javascripts/dataTables/responsive/dataTables.responsive.js +707 -531
- data/app/assets/javascripts/dataTables/responsive/responsive.bootstrap4.js +61 -33
- data/app/assets/javascripts/dataTables/rowReorder/dataTables.rowReorder.js +961 -740
- data/app/assets/javascripts/dataTables/rowReorder/rowReorder.bootstrap4.js +50 -30
- data/app/assets/stylesheets/dataTables/buttons/buttons.bootstrap4.scss +178 -151
- data/app/assets/stylesheets/dataTables/dataTables.bootstrap4.scss +300 -81
- data/app/assets/stylesheets/dataTables/responsive/responsive.bootstrap4.scss +54 -71
- data/app/assets/stylesheets/dataTables/rowReorder/rowReorder.bootstrap4.scss +23 -4
- data/app/assets/stylesheets/effective_datatables/_overrides.bootstrap4.scss +81 -39
- data/lib/effective_datatables/version.rb +1 -1
- metadata +3 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
/*! Bootstrap 4 integration for DataTables' Responsive
|
2
|
-
* ©
|
2
|
+
* © SpryMedia Ltd - datatables.net/license
|
3
3
|
*/
|
4
4
|
|
5
5
|
(function( factory ){
|
@@ -11,21 +11,37 @@
|
|
11
11
|
}
|
12
12
|
else if ( typeof exports === 'object' ) {
|
13
13
|
// CommonJS
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
if ( ! $ || ! $.fn.dataTable ) {
|
20
|
-
$ = require('datatables.net-bs4')(root, $).$;
|
14
|
+
var jq = require('jquery');
|
15
|
+
var cjsRequires = function (root, $) {
|
16
|
+
if ( ! $.fn.dataTable ) {
|
17
|
+
require('datatables.net-bs4')(root, $);
|
21
18
|
}
|
22
19
|
|
23
20
|
if ( ! $.fn.dataTable.Responsive ) {
|
24
21
|
require('datatables.net-responsive')(root, $);
|
25
22
|
}
|
26
|
-
|
27
|
-
return factory( $, root, root.document );
|
28
23
|
};
|
24
|
+
|
25
|
+
if (typeof window === 'undefined') {
|
26
|
+
module.exports = function (root, $) {
|
27
|
+
if ( ! root ) {
|
28
|
+
// CommonJS environments without a window global must pass a
|
29
|
+
// root. This will give an error otherwise
|
30
|
+
root = window;
|
31
|
+
}
|
32
|
+
|
33
|
+
if ( ! $ ) {
|
34
|
+
$ = jq( root );
|
35
|
+
}
|
36
|
+
|
37
|
+
cjsRequires( root, $ );
|
38
|
+
return factory( $, root, root.document );
|
39
|
+
};
|
40
|
+
}
|
41
|
+
else {
|
42
|
+
cjsRequires( window, jq );
|
43
|
+
module.exports = factory( jq, window, window.document );
|
44
|
+
}
|
29
45
|
}
|
30
46
|
else {
|
31
47
|
// Browser
|
@@ -36,50 +52,62 @@
|
|
36
52
|
var DataTable = $.fn.dataTable;
|
37
53
|
|
38
54
|
|
55
|
+
|
39
56
|
var _display = DataTable.Responsive.display;
|
40
57
|
var _original = _display.modal;
|
41
58
|
var _modal = $(
|
42
|
-
'<div class="modal fade dtr-bs-modal" role="dialog">'+
|
43
|
-
'<div class="modal-dialog" role="document">'+
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
'</div>'+
|
51
|
-
|
59
|
+
'<div class="modal fade dtr-bs-modal" role="dialog">' +
|
60
|
+
'<div class="modal-dialog" role="document">' +
|
61
|
+
'<div class="modal-content">' +
|
62
|
+
'<div class="modal-header">' +
|
63
|
+
'<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>' +
|
64
|
+
'</div>' +
|
65
|
+
'<div class="modal-body"/>' +
|
66
|
+
'</div>' +
|
67
|
+
'</div>' +
|
68
|
+
'</div>'
|
52
69
|
);
|
53
70
|
|
54
|
-
_display.modal = function (
|
55
|
-
return function (
|
56
|
-
if (
|
57
|
-
_original(
|
71
|
+
_display.modal = function (options) {
|
72
|
+
return function (row, update, render, closeCallback) {
|
73
|
+
if (!$.fn.modal) {
|
74
|
+
return _original(row, update, render, closeCallback);
|
58
75
|
}
|
59
76
|
else {
|
60
|
-
if (
|
61
|
-
if (
|
77
|
+
if (!update) {
|
78
|
+
if (options && options.header) {
|
62
79
|
var header = _modal.find('div.modal-header');
|
63
80
|
var button = header.find('button').detach();
|
64
81
|
|
65
82
|
header
|
66
83
|
.empty()
|
67
|
-
.append(
|
68
|
-
.append(
|
84
|
+
.append('<h4 class="modal-title">' + options.header(row) + '</h4>')
|
85
|
+
.append(button);
|
69
86
|
}
|
70
87
|
|
71
|
-
_modal.find(
|
72
|
-
.empty()
|
73
|
-
.append( render() );
|
88
|
+
_modal.find('div.modal-body').empty().append(render());
|
74
89
|
|
75
90
|
_modal
|
76
|
-
.
|
91
|
+
.data('dtr-row-idx', row.index())
|
92
|
+
.one('hidden.bs.modal', closeCallback)
|
93
|
+
.appendTo('body')
|
77
94
|
.modal();
|
78
95
|
}
|
96
|
+
else {
|
97
|
+
if ($.contains(document, _modal[0]) && row.index() === _modal.data('dtr-row-idx')) {
|
98
|
+
_modal.find('div.modal-body').empty().append(render());
|
99
|
+
}
|
100
|
+
else {
|
101
|
+
// Modal not shown - do nothing
|
102
|
+
return null;
|
103
|
+
}
|
104
|
+
}
|
105
|
+
|
106
|
+
return true;
|
79
107
|
}
|
80
108
|
};
|
81
109
|
};
|
82
110
|
|
83
111
|
|
84
|
-
return DataTable
|
112
|
+
return DataTable;
|
85
113
|
}));
|