oxidized-web 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of oxidized-web might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.github/PULL_REQUEST_TEMPLATE.md +12 -0
- data/.github/dependabot.yml +25 -0
- data/.github/workflows/codeql.yml +76 -0
- data/.github/workflows/ruby.yml +42 -0
- data/.github/workflows/stale.yml +18 -0
- data/.gitignore +3 -0
- data/.rubocop.yml +38 -3
- data/.rubocop_todo.yml +28 -207
- data/CHANGELOG.md +28 -0
- data/README.md +8 -5
- data/Rakefile +60 -4
- data/docs/development.md +170 -0
- data/lib/oxidized/web/mig.rb +37 -47
- data/lib/oxidized/web/public/css/oxidized.css +59 -0
- data/lib/oxidized/web/public/scripts/oxidized.js +1 -12
- data/lib/oxidized/web/public/weblibs/bootstrap-icons.css +2078 -0
- data/lib/oxidized/web/public/weblibs/bootstrap.bundle.js +6314 -0
- data/lib/oxidized/web/public/weblibs/bootstrap.bundle.js.map +1 -0
- data/lib/oxidized/web/public/weblibs/bootstrap.css +12057 -0
- data/lib/oxidized/web/public/weblibs/bootstrap.css.map +1 -0
- data/lib/oxidized/web/public/weblibs/bootstrap.js +4494 -0
- data/lib/oxidized/web/public/weblibs/bootstrap.js.map +1 -0
- data/lib/oxidized/web/public/weblibs/buttons.bootstrap5.css +398 -0
- data/lib/oxidized/web/public/weblibs/buttons.bootstrap5.js +117 -0
- data/lib/oxidized/web/public/weblibs/buttons.colVis.js +256 -0
- data/lib/oxidized/web/public/weblibs/dataTables.bootstrap5.css +487 -0
- data/lib/oxidized/web/public/weblibs/dataTables.bootstrap5.js +147 -0
- data/lib/oxidized/web/public/weblibs/dataTables.buttons.js +2820 -0
- data/lib/oxidized/web/public/weblibs/dataTables.js +13171 -0
- data/lib/oxidized/web/public/weblibs/fonts/bootstrap-icons.woff +0 -0
- data/lib/oxidized/web/public/weblibs/fonts/bootstrap-icons.woff2 +0 -0
- data/lib/oxidized/web/public/weblibs/jquery.js +10716 -0
- data/lib/oxidized/web/version.rb +7 -0
- data/lib/oxidized/web/views/conf_search.haml +14 -13
- data/lib/oxidized/web/views/diffs.haml +5 -5
- data/lib/oxidized/web/views/footer.haml +5 -4
- data/lib/oxidized/web/views/head.haml +21 -7
- data/lib/oxidized/web/views/layout.haml +29 -34
- data/lib/oxidized/web/views/migration.haml +7 -0
- data/lib/oxidized/web/views/node.haml +10 -8
- data/lib/oxidized/web/views/nodes.haml +45 -35
- data/lib/oxidized/web/views/stats.haml +32 -24
- data/lib/oxidized/web/views/version.haml +8 -6
- data/lib/oxidized/web/views/versions.haml +23 -24
- data/lib/oxidized/web/webapp.rb +106 -87
- data/lib/oxidized/web.rb +10 -7
- data/oxidized-web.gemspec +28 -15
- data/package-lock.json +104 -0
- data/package.json +21 -0
- data/spec/node_spec.rb +143 -0
- data/spec/root_spec.rb +18 -0
- data/spec/spec_helper.rb +8 -0
- data/spec/webapp_spec.rb +28 -0
- metadata +187 -73
- data/lib/oxidized/web/public/css/bootstrap.min.css +0 -5
- data/lib/oxidized/web/public/css/buttons.bootstrap.min.css +0 -1
- data/lib/oxidized/web/public/css/dataTables.bootstrap.css +0 -299
- data/lib/oxidized/web/public/css/dataTables.colVis.css +0 -171
- data/lib/oxidized/web/public/css/oxidized_custom.css +0 -19
- data/lib/oxidized/web/public/fonts/glyphicons-halflings-regular.eot +0 -0
- data/lib/oxidized/web/public/fonts/glyphicons-halflings-regular.svg +0 -229
- data/lib/oxidized/web/public/fonts/glyphicons-halflings-regular.ttf +0 -0
- data/lib/oxidized/web/public/fonts/glyphicons-halflings-regular.woff +0 -0
- data/lib/oxidized/web/public/images/diff_15x17.png +0 -0
- data/lib/oxidized/web/public/images/sort_asc.png +0 -0
- data/lib/oxidized/web/public/images/sort_asc_disabled.png +0 -0
- data/lib/oxidized/web/public/images/sort_both.png +0 -0
- data/lib/oxidized/web/public/images/sort_desc.png +0 -0
- data/lib/oxidized/web/public/images/sort_desc_disabled.png +0 -0
- data/lib/oxidized/web/public/images/versioning_18px.png +0 -0
- data/lib/oxidized/web/public/scripts/bootstrap.min.js +0 -6
- data/lib/oxidized/web/public/scripts/dataTables.bootstrap.js +0 -186
- data/lib/oxidized/web/public/scripts/dataTables.colVis.js +0 -1123
- data/lib/oxidized/web/public/scripts/jquery-2.1.1.min.js +0 -4
- data/lib/oxidized/web/public/scripts/jquery.dataTables.min.js +0 -157
- data/lib/oxidized/web/public/scripts/jquery.min.js +0 -6
- data/lib/oxidized/web/views/sass/oxidized.sass +0 -113
@@ -0,0 +1,398 @@
|
|
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
|
+
}
|
30
|
+
div.dataTables_wrapper {
|
31
|
+
position: relative;
|
32
|
+
}
|
33
|
+
|
34
|
+
div.dt-buttons {
|
35
|
+
position: initial;
|
36
|
+
}
|
37
|
+
div.dt-buttons .dt-button {
|
38
|
+
overflow: hidden;
|
39
|
+
text-overflow: ellipsis;
|
40
|
+
white-space: nowrap;
|
41
|
+
}
|
42
|
+
|
43
|
+
div.dt-button-info {
|
44
|
+
position: fixed;
|
45
|
+
top: 50%;
|
46
|
+
left: 50%;
|
47
|
+
width: 400px;
|
48
|
+
margin-top: -100px;
|
49
|
+
margin-left: -200px;
|
50
|
+
background-color: white;
|
51
|
+
border-radius: 0.75em;
|
52
|
+
box-shadow: 3px 4px 10px 1px rgba(0, 0, 0, 0.8);
|
53
|
+
text-align: center;
|
54
|
+
z-index: 2003;
|
55
|
+
overflow: hidden;
|
56
|
+
}
|
57
|
+
div.dt-button-info h2 {
|
58
|
+
padding: 2rem 2rem 1rem 2rem;
|
59
|
+
margin: 0;
|
60
|
+
font-weight: normal;
|
61
|
+
}
|
62
|
+
div.dt-button-info > div {
|
63
|
+
padding: 1em 2em 2em 2em;
|
64
|
+
}
|
65
|
+
|
66
|
+
div.dtb-popover-close {
|
67
|
+
position: absolute;
|
68
|
+
top: 6px;
|
69
|
+
right: 6px;
|
70
|
+
width: 22px;
|
71
|
+
height: 22px;
|
72
|
+
text-align: center;
|
73
|
+
border-radius: 3px;
|
74
|
+
cursor: pointer;
|
75
|
+
z-index: 2003;
|
76
|
+
}
|
77
|
+
|
78
|
+
button.dtb-hide-drop {
|
79
|
+
display: none !important;
|
80
|
+
}
|
81
|
+
|
82
|
+
div.dt-button-collection-title {
|
83
|
+
text-align: center;
|
84
|
+
padding: 0.3em 0.5em 0.5em;
|
85
|
+
margin-left: 0.5em;
|
86
|
+
margin-right: 0.5em;
|
87
|
+
font-size: 0.9em;
|
88
|
+
white-space: nowrap;
|
89
|
+
overflow: hidden;
|
90
|
+
text-overflow: ellipsis;
|
91
|
+
}
|
92
|
+
|
93
|
+
div.dt-button-collection-title:empty {
|
94
|
+
display: none;
|
95
|
+
}
|
96
|
+
|
97
|
+
span.dt-button-spacer {
|
98
|
+
display: inline-block;
|
99
|
+
margin: 0.5em;
|
100
|
+
white-space: nowrap;
|
101
|
+
}
|
102
|
+
span.dt-button-spacer.bar {
|
103
|
+
border-left: 1px solid rgba(0, 0, 0, 0.3);
|
104
|
+
vertical-align: middle;
|
105
|
+
padding-left: 0.5em;
|
106
|
+
}
|
107
|
+
span.dt-button-spacer.bar:empty {
|
108
|
+
height: 1em;
|
109
|
+
width: 1px;
|
110
|
+
padding-left: 0;
|
111
|
+
}
|
112
|
+
|
113
|
+
div.dt-button-collection .dt-button-active {
|
114
|
+
padding-right: 3em;
|
115
|
+
}
|
116
|
+
div.dt-button-collection .dt-button-active:after {
|
117
|
+
position: absolute;
|
118
|
+
top: 50%;
|
119
|
+
margin-top: -10px;
|
120
|
+
right: 1em;
|
121
|
+
display: inline-block;
|
122
|
+
content: "✓";
|
123
|
+
color: inherit;
|
124
|
+
}
|
125
|
+
div.dt-button-collection .dt-button-active.dt-button-split {
|
126
|
+
padding-right: 0;
|
127
|
+
}
|
128
|
+
div.dt-button-collection .dt-button-active.dt-button-split:after {
|
129
|
+
display: none;
|
130
|
+
}
|
131
|
+
div.dt-button-collection .dt-button-active.dt-button-split > *:first-child {
|
132
|
+
padding-right: 3em;
|
133
|
+
}
|
134
|
+
div.dt-button-collection .dt-button-active.dt-button-split > *:first-child:after {
|
135
|
+
position: absolute;
|
136
|
+
top: 50%;
|
137
|
+
margin-top: -10px;
|
138
|
+
right: 1em;
|
139
|
+
display: inline-block;
|
140
|
+
content: "✓";
|
141
|
+
color: inherit;
|
142
|
+
}
|
143
|
+
div.dt-button-collection .dt-button-active-a a {
|
144
|
+
padding-right: 3em;
|
145
|
+
}
|
146
|
+
div.dt-button-collection .dt-button-active-a a:after {
|
147
|
+
position: absolute;
|
148
|
+
right: 1em;
|
149
|
+
display: inline-block;
|
150
|
+
content: "✓";
|
151
|
+
color: inherit;
|
152
|
+
}
|
153
|
+
div.dt-button-collection span.dt-button-spacer {
|
154
|
+
width: 100%;
|
155
|
+
font-size: 0.9em;
|
156
|
+
text-align: center;
|
157
|
+
margin: 0.5em 0;
|
158
|
+
}
|
159
|
+
div.dt-button-collection span.dt-button-spacer:empty {
|
160
|
+
height: 0;
|
161
|
+
width: 100%;
|
162
|
+
}
|
163
|
+
div.dt-button-collection span.dt-button-spacer.bar {
|
164
|
+
border-left: none;
|
165
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
166
|
+
padding-left: 0;
|
167
|
+
}
|
168
|
+
|
169
|
+
@media print {
|
170
|
+
table.dataTable tr > * {
|
171
|
+
box-shadow: none !important;
|
172
|
+
}
|
173
|
+
}
|
174
|
+
html.dark div.dt-button-info {
|
175
|
+
background-color: var(--dt-html-background);
|
176
|
+
border: 1px solid rgba(255, 255, 255, 0.15);
|
177
|
+
}
|
178
|
+
|
179
|
+
div.dt-buttons div.btn-group {
|
180
|
+
position: initial;
|
181
|
+
}
|
182
|
+
div.dt-buttons div.dropdown-menu {
|
183
|
+
margin-top: 4px;
|
184
|
+
width: 200px;
|
185
|
+
}
|
186
|
+
div.dt-buttons div.dropdown-menu .dt-button {
|
187
|
+
position: relative;
|
188
|
+
}
|
189
|
+
div.dt-buttons div.dropdown-menu div.dt-button-split {
|
190
|
+
display: flex;
|
191
|
+
flex-direction: row;
|
192
|
+
flex-wrap: wrap;
|
193
|
+
justify-content: flex-start;
|
194
|
+
align-content: flex-start;
|
195
|
+
align-items: stretch;
|
196
|
+
}
|
197
|
+
div.dt-buttons div.dropdown-menu div.dt-button-split a:first-child {
|
198
|
+
min-width: auto;
|
199
|
+
flex: 1 0 50px;
|
200
|
+
padding-right: 0;
|
201
|
+
}
|
202
|
+
div.dt-buttons div.dropdown-menu div.dt-button-split button:last-child {
|
203
|
+
min-width: 33px;
|
204
|
+
flex: 0;
|
205
|
+
background: transparent;
|
206
|
+
border: none;
|
207
|
+
line-height: 1rem;
|
208
|
+
color: var(--bs-dropdown-link-color);
|
209
|
+
padding: var(--bs-dropdown-item-padding-y) var(--bs-dropdown-item-padding-x);
|
210
|
+
overflow: visible;
|
211
|
+
}
|
212
|
+
div.dt-buttons div.dropdown-menu div.dt-button-split button:last-child:hover {
|
213
|
+
color: var(--bs-dropdown-link-hover-color);
|
214
|
+
background-color: var(--bs-dropdown-link-hover-bg);
|
215
|
+
}
|
216
|
+
div.dt-buttons div.dropdown-menu div.dt-button-split button:last-child:after {
|
217
|
+
position: relative;
|
218
|
+
left: -3px;
|
219
|
+
}
|
220
|
+
div.dt-buttons div.dropdown-menu.fixed {
|
221
|
+
position: fixed;
|
222
|
+
display: block;
|
223
|
+
top: 50%;
|
224
|
+
left: 50%;
|
225
|
+
margin-left: -75px;
|
226
|
+
border-radius: 5px;
|
227
|
+
background-color: white;
|
228
|
+
padding: 0.5em;
|
229
|
+
}
|
230
|
+
div.dt-buttons div.dropdown-menu.fixed.two-column {
|
231
|
+
margin-left: -200px;
|
232
|
+
}
|
233
|
+
div.dt-buttons div.dropdown-menu.fixed.three-column {
|
234
|
+
margin-left: -225px;
|
235
|
+
}
|
236
|
+
div.dt-buttons div.dropdown-menu.fixed.four-column {
|
237
|
+
margin-left: -300px;
|
238
|
+
}
|
239
|
+
div.dt-buttons div.dropdown-menu.fixed.columns {
|
240
|
+
margin-left: -409px;
|
241
|
+
}
|
242
|
+
@media screen and (max-width: 1024px) {
|
243
|
+
div.dt-buttons div.dropdown-menu.fixed.columns {
|
244
|
+
margin-left: -308px;
|
245
|
+
}
|
246
|
+
}
|
247
|
+
@media screen and (max-width: 640px) {
|
248
|
+
div.dt-buttons div.dropdown-menu.fixed.columns {
|
249
|
+
margin-left: -203px;
|
250
|
+
}
|
251
|
+
}
|
252
|
+
@media screen and (max-width: 460px) {
|
253
|
+
div.dt-buttons div.dropdown-menu.fixed.columns {
|
254
|
+
margin-left: -100px;
|
255
|
+
}
|
256
|
+
}
|
257
|
+
div.dt-buttons div.dropdown-menu.fixed > :last-child {
|
258
|
+
max-height: 100vh;
|
259
|
+
overflow: auto;
|
260
|
+
}
|
261
|
+
div.dt-buttons div.dropdown-menu.two-column > :last-child, div.dt-buttons div.dropdown-menu.three-column > :last-child, div.dt-buttons div.dropdown-menu.four-column > :last-child {
|
262
|
+
display: block !important;
|
263
|
+
-webkit-column-gap: 8px;
|
264
|
+
-moz-column-gap: 8px;
|
265
|
+
-ms-column-gap: 8px;
|
266
|
+
-o-column-gap: 8px;
|
267
|
+
column-gap: 8px;
|
268
|
+
}
|
269
|
+
div.dt-buttons div.dropdown-menu.two-column > :last-child > *, div.dt-buttons div.dropdown-menu.three-column > :last-child > *, div.dt-buttons div.dropdown-menu.four-column > :last-child > * {
|
270
|
+
-webkit-column-break-inside: avoid;
|
271
|
+
break-inside: avoid;
|
272
|
+
}
|
273
|
+
div.dt-buttons div.dropdown-menu.two-column {
|
274
|
+
width: 400px;
|
275
|
+
}
|
276
|
+
div.dt-buttons div.dropdown-menu.two-column > :last-child {
|
277
|
+
padding-bottom: 1px;
|
278
|
+
column-count: 2;
|
279
|
+
}
|
280
|
+
div.dt-buttons div.dropdown-menu.three-column {
|
281
|
+
width: 450px;
|
282
|
+
}
|
283
|
+
div.dt-buttons div.dropdown-menu.three-column > :last-child {
|
284
|
+
padding-bottom: 1px;
|
285
|
+
column-count: 3;
|
286
|
+
}
|
287
|
+
div.dt-buttons div.dropdown-menu.four-column {
|
288
|
+
width: 600px;
|
289
|
+
}
|
290
|
+
div.dt-buttons div.dropdown-menu.four-column > :last-child {
|
291
|
+
padding-bottom: 1px;
|
292
|
+
column-count: 4;
|
293
|
+
}
|
294
|
+
div.dt-buttons div.dropdown-menu .dt-button {
|
295
|
+
border-radius: 0;
|
296
|
+
}
|
297
|
+
div.dt-buttons div.dropdown-menu.columns {
|
298
|
+
width: auto;
|
299
|
+
}
|
300
|
+
div.dt-buttons div.dropdown-menu.columns > :last-child {
|
301
|
+
display: flex;
|
302
|
+
flex-wrap: wrap;
|
303
|
+
justify-content: flex-start;
|
304
|
+
align-items: center;
|
305
|
+
gap: 6px;
|
306
|
+
width: 818px;
|
307
|
+
padding-bottom: 1px;
|
308
|
+
}
|
309
|
+
div.dt-buttons div.dropdown-menu.columns > :last-child .dt-button {
|
310
|
+
min-width: 200px;
|
311
|
+
flex: 0 1;
|
312
|
+
margin: 0;
|
313
|
+
}
|
314
|
+
div.dt-buttons div.dropdown-menu.columns.dtb-b3 > :last-child, div.dt-buttons div.dropdown-menu.columns.dtb-b2 > :last-child, div.dt-buttons div.dropdown-menu.columns.dtb-b1 > :last-child {
|
315
|
+
justify-content: space-between;
|
316
|
+
}
|
317
|
+
div.dt-buttons div.dropdown-menu.columns.dtb-b3 .dt-button {
|
318
|
+
flex: 1 1 32%;
|
319
|
+
}
|
320
|
+
div.dt-buttons div.dropdown-menu.columns.dtb-b2 .dt-button {
|
321
|
+
flex: 1 1 48%;
|
322
|
+
}
|
323
|
+
div.dt-buttons div.dropdown-menu.columns.dtb-b1 .dt-button {
|
324
|
+
flex: 1 1 100%;
|
325
|
+
}
|
326
|
+
@media screen and (max-width: 1024px) {
|
327
|
+
div.dt-buttons div.dropdown-menu.columns > :last-child {
|
328
|
+
width: 612px;
|
329
|
+
}
|
330
|
+
}
|
331
|
+
@media screen and (max-width: 640px) {
|
332
|
+
div.dt-buttons div.dropdown-menu.columns > :last-child {
|
333
|
+
width: 406px;
|
334
|
+
}
|
335
|
+
div.dt-buttons div.dropdown-menu.columns.dtb-b3 .dt-button {
|
336
|
+
flex: 0 1 32%;
|
337
|
+
}
|
338
|
+
}
|
339
|
+
@media screen and (max-width: 460px) {
|
340
|
+
div.dt-buttons div.dropdown-menu.columns > :last-child {
|
341
|
+
width: 200px;
|
342
|
+
}
|
343
|
+
}
|
344
|
+
div.dt-buttons span.dt-button-spacer.empty {
|
345
|
+
margin: 1px;
|
346
|
+
}
|
347
|
+
div.dt-buttons span.dt-button-spacer.bar:empty {
|
348
|
+
height: inherit;
|
349
|
+
}
|
350
|
+
div.dt-buttons .btn.processing {
|
351
|
+
color: rgba(0, 0, 0, 0.2);
|
352
|
+
}
|
353
|
+
div.dt-buttons .btn.processing:after {
|
354
|
+
position: absolute;
|
355
|
+
top: 50%;
|
356
|
+
left: 50%;
|
357
|
+
width: 16px;
|
358
|
+
height: 16px;
|
359
|
+
margin: -8px 0 0 -8px;
|
360
|
+
box-sizing: border-box;
|
361
|
+
display: block;
|
362
|
+
content: " ";
|
363
|
+
border: 2px solid rgb(40, 40, 40);
|
364
|
+
border-radius: 50%;
|
365
|
+
border-left-color: transparent;
|
366
|
+
border-right-color: transparent;
|
367
|
+
animation: dtb-spinner 1500ms infinite linear;
|
368
|
+
-o-animation: dtb-spinner 1500ms infinite linear;
|
369
|
+
-ms-animation: dtb-spinner 1500ms infinite linear;
|
370
|
+
-webkit-animation: dtb-spinner 1500ms infinite linear;
|
371
|
+
-moz-animation: dtb-spinner 1500ms infinite linear;
|
372
|
+
}
|
373
|
+
|
374
|
+
div.dt-button-background {
|
375
|
+
position: fixed;
|
376
|
+
top: 0;
|
377
|
+
left: 0;
|
378
|
+
width: 100%;
|
379
|
+
height: 100%;
|
380
|
+
z-index: 999;
|
381
|
+
}
|
382
|
+
|
383
|
+
@media screen and (max-width: 767px) {
|
384
|
+
div.dt-buttons {
|
385
|
+
float: none;
|
386
|
+
width: 100%;
|
387
|
+
text-align: center;
|
388
|
+
margin-bottom: 0.5em;
|
389
|
+
}
|
390
|
+
div.dt-buttons a.btn {
|
391
|
+
float: none;
|
392
|
+
}
|
393
|
+
}
|
394
|
+
:root[data-bs-theme=dark] div.dropdown-menu.dt-button-collection.fixed {
|
395
|
+
background-color: rgb(33, 37, 41);
|
396
|
+
border: 1px solid rgba(255, 255, 255, 0.15);
|
397
|
+
border-radius: 8px;
|
398
|
+
}
|
@@ -0,0 +1,117 @@
|
|
1
|
+
/*! Bootstrap integration for DataTables' Buttons
|
2
|
+
* © SpryMedia Ltd - datatables.net/license
|
3
|
+
*/
|
4
|
+
|
5
|
+
(function( factory ){
|
6
|
+
if ( typeof define === 'function' && define.amd ) {
|
7
|
+
// AMD
|
8
|
+
define( ['jquery', 'datatables.net-bs5', 'datatables.net-buttons'], function ( $ ) {
|
9
|
+
return factory( $, window, document );
|
10
|
+
} );
|
11
|
+
}
|
12
|
+
else if ( typeof exports === 'object' ) {
|
13
|
+
// CommonJS
|
14
|
+
var jq = require('jquery');
|
15
|
+
var cjsRequires = function (root, $) {
|
16
|
+
if ( ! $.fn.dataTable ) {
|
17
|
+
require('datatables.net-bs5')(root, $);
|
18
|
+
}
|
19
|
+
|
20
|
+
if ( ! $.fn.dataTable.Buttons ) {
|
21
|
+
require('datatables.net-buttons')(root, $);
|
22
|
+
}
|
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
|
+
}
|
45
|
+
}
|
46
|
+
else {
|
47
|
+
// Browser
|
48
|
+
factory( jQuery, window, document );
|
49
|
+
}
|
50
|
+
}(function( $, window, document ) {
|
51
|
+
'use strict';
|
52
|
+
var DataTable = $.fn.dataTable;
|
53
|
+
|
54
|
+
|
55
|
+
|
56
|
+
$.extend(true, DataTable.Buttons.defaults, {
|
57
|
+
dom: {
|
58
|
+
container: {
|
59
|
+
className: 'dt-buttons btn-group flex-wrap'
|
60
|
+
},
|
61
|
+
button: {
|
62
|
+
className: 'btn btn-secondary',
|
63
|
+
active: 'active'
|
64
|
+
},
|
65
|
+
collection: {
|
66
|
+
action: {
|
67
|
+
dropHtml: ''
|
68
|
+
},
|
69
|
+
container: {
|
70
|
+
tag: 'div',
|
71
|
+
className: 'dropdown-menu dt-button-collection'
|
72
|
+
},
|
73
|
+
closeButton: false,
|
74
|
+
button: {
|
75
|
+
tag: 'a',
|
76
|
+
className: 'dt-button dropdown-item',
|
77
|
+
active: 'dt-button-active',
|
78
|
+
disabled: 'disabled',
|
79
|
+
spacer: {
|
80
|
+
className: 'dropdown-divider',
|
81
|
+
tag: 'hr'
|
82
|
+
}
|
83
|
+
}
|
84
|
+
},
|
85
|
+
split: {
|
86
|
+
action: {
|
87
|
+
tag: 'a',
|
88
|
+
className: 'btn btn-secondary dt-button-split-drop-button',
|
89
|
+
closeButton: false
|
90
|
+
},
|
91
|
+
dropdown: {
|
92
|
+
tag: 'button',
|
93
|
+
dropHtml: '',
|
94
|
+
className:
|
95
|
+
'btn btn-secondary dt-button-split-drop dropdown-toggle dropdown-toggle-split',
|
96
|
+
closeButton: false,
|
97
|
+
align: 'split-left',
|
98
|
+
splitAlignClass: 'dt-button-split-left'
|
99
|
+
},
|
100
|
+
wrapper: {
|
101
|
+
tag: 'div',
|
102
|
+
className: 'dt-button-split btn-group',
|
103
|
+
closeButton: false
|
104
|
+
}
|
105
|
+
}
|
106
|
+
},
|
107
|
+
buttonCreated: function (config, button) {
|
108
|
+
return config.buttons ? $('<div class="btn-group"/>').append(button) : button;
|
109
|
+
}
|
110
|
+
});
|
111
|
+
|
112
|
+
DataTable.ext.buttons.collection.className += ' dropdown-toggle';
|
113
|
+
DataTable.ext.buttons.collection.rightAlignClassName = 'dropdown-menu-right';
|
114
|
+
|
115
|
+
|
116
|
+
return DataTable;
|
117
|
+
}));
|