@reldens/cms 0.18.0 → 0.20.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.
- package/README.md +260 -20
- package/admin/reldens-admin-client.css +127 -80
- package/admin/reldens-admin-client.js +24 -0
- package/admin/templates/clear-all-cache-button.html +18 -0
- package/lib/admin-manager/contents-builder.js +7 -6
- package/lib/admin-manager/router-contents.js +58 -16
- package/lib/admin-manager-validator.js +2 -1
- package/lib/admin-manager.js +4 -2
- package/lib/admin-translations.js +9 -1
- package/lib/cache/add-cache-button-subscriber.js +53 -5
- package/lib/cache/cache-manager.js +47 -8
- package/lib/cache/cache-routes-handler.js +23 -0
- package/lib/cms-pages-route-manager.js +16 -4
- package/lib/frontend.js +310 -119
- package/lib/manager.js +43 -3
- package/lib/pagination-handler.js +243 -0
- package/lib/search-renderer.js +116 -0
- package/lib/search.js +344 -0
- package/lib/template-engine/asset-transformer.js +41 -0
- package/lib/template-engine/collections-single-transformer.js +70 -0
- package/lib/template-engine/collections-transformer-base.js +84 -0
- package/lib/template-engine/collections-transformer.js +374 -0
- package/lib/template-engine/date-transformer.js +53 -0
- package/lib/template-engine/entities-transformer.js +67 -0
- package/lib/template-engine/partials-transformer.js +175 -0
- package/lib/template-engine/system-variables-provider.js +105 -0
- package/lib/template-engine/translate-transformer.js +98 -0
- package/lib/template-engine/translation-service.js +104 -0
- package/lib/template-engine/url-transformer.js +41 -0
- package/lib/template-engine.js +133 -438
- package/lib/templates-list.js +1 -0
- package/migrations/install.sql +18 -18
- package/package.json +4 -4
- package/templates/page.html +19 -2
- package/templates/partials/entriesListView.html +14 -0
- package/templates/partials/pagedCollection.html +33 -0
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
padding: 0;
|
|
28
28
|
font-size: 12px;
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
.wrapper {
|
|
31
31
|
display: flex;
|
|
32
32
|
flex-direction: column;
|
|
33
33
|
min-height: 100vh;
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
.notification {
|
|
37
37
|
display: none;
|
|
38
38
|
position: absolute;
|
|
39
39
|
top: 1.5rem;
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
color: var(--white);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
.close {
|
|
60
60
|
position: absolute;
|
|
61
61
|
top: 1rem;
|
|
62
62
|
right: 1rem;
|
|
@@ -65,26 +65,29 @@
|
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
.header {
|
|
69
|
+
/* height: 3.85rem; */
|
|
70
70
|
padding: 1.5rem;
|
|
71
|
+
background-color: var(--darkGrey);
|
|
71
72
|
text-align: center;
|
|
72
73
|
|
|
73
|
-
|
|
74
|
+
.title a {
|
|
74
75
|
color: var(--white);
|
|
75
76
|
text-decoration: none;
|
|
76
|
-
font-size:
|
|
77
|
+
font-size: 1.5rem;
|
|
77
78
|
font-weight: var(--bold);
|
|
78
79
|
font-family: var(--reldensFont);
|
|
79
80
|
}
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
|
|
83
|
+
.content {
|
|
83
84
|
display: flex;
|
|
85
|
+
flex-grow: 1;
|
|
84
86
|
position: relative;
|
|
87
|
+
/* min-height: calc(100vh - 11.80rem); */
|
|
85
88
|
}
|
|
86
89
|
|
|
87
|
-
|
|
90
|
+
.button {
|
|
88
91
|
padding: 0.5rem 1rem;
|
|
89
92
|
border: none;
|
|
90
93
|
border-radius: 4px;
|
|
@@ -97,7 +100,7 @@
|
|
|
97
100
|
}
|
|
98
101
|
}
|
|
99
102
|
|
|
100
|
-
|
|
103
|
+
.button-primary {
|
|
101
104
|
color: var(--white);
|
|
102
105
|
background-color: var(--lightBlue);
|
|
103
106
|
|
|
@@ -106,7 +109,7 @@
|
|
|
106
109
|
}
|
|
107
110
|
}
|
|
108
111
|
|
|
109
|
-
|
|
112
|
+
.button-secondary {
|
|
110
113
|
color: var(--white);
|
|
111
114
|
background-color: var(--grey);
|
|
112
115
|
|
|
@@ -115,7 +118,7 @@
|
|
|
115
118
|
}
|
|
116
119
|
}
|
|
117
120
|
|
|
118
|
-
|
|
121
|
+
.button-warning {
|
|
119
122
|
color: var(--white);
|
|
120
123
|
background-color: var(--orange);
|
|
121
124
|
|
|
@@ -124,7 +127,7 @@
|
|
|
124
127
|
}
|
|
125
128
|
}
|
|
126
129
|
|
|
127
|
-
|
|
130
|
+
.button-danger {
|
|
128
131
|
color: var(--white);
|
|
129
132
|
background-color: var(--red);
|
|
130
133
|
|
|
@@ -133,17 +136,17 @@
|
|
|
133
136
|
}
|
|
134
137
|
}
|
|
135
138
|
|
|
136
|
-
|
|
139
|
+
.icon {
|
|
137
140
|
&-sm {
|
|
138
141
|
width: 32px;
|
|
139
142
|
}
|
|
140
143
|
}
|
|
141
144
|
|
|
142
|
-
|
|
145
|
+
.clickable {
|
|
143
146
|
cursor: pointer;
|
|
144
147
|
}
|
|
145
148
|
|
|
146
|
-
|
|
149
|
+
.modal-overlay {
|
|
147
150
|
display: flex;
|
|
148
151
|
align-items: center;
|
|
149
152
|
justify-content: center;
|
|
@@ -156,7 +159,7 @@
|
|
|
156
159
|
background-color: rgba(0, 0, 0, 0.5);
|
|
157
160
|
}
|
|
158
161
|
|
|
159
|
-
|
|
162
|
+
.modal {
|
|
160
163
|
max-width: 92vw;
|
|
161
164
|
max-height: 92vh;
|
|
162
165
|
padding: 1rem;
|
|
@@ -170,12 +173,12 @@
|
|
|
170
173
|
}
|
|
171
174
|
}
|
|
172
175
|
|
|
173
|
-
|
|
176
|
+
.response-error {
|
|
174
177
|
color: var(--red);
|
|
175
178
|
font-weight: var(--bold);
|
|
176
179
|
}
|
|
177
180
|
|
|
178
|
-
|
|
181
|
+
.side-bar {
|
|
179
182
|
min-width: 230px;
|
|
180
183
|
padding: 1.4rem;
|
|
181
184
|
background-color: var(--darkBlue);
|
|
@@ -183,9 +186,9 @@
|
|
|
183
186
|
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
|
|
184
187
|
}
|
|
185
188
|
|
|
186
|
-
|
|
189
|
+
.with-sub-items {
|
|
187
190
|
&.active {
|
|
188
|
-
|
|
191
|
+
.side-bar-item {
|
|
189
192
|
display: block;
|
|
190
193
|
|
|
191
194
|
&:first-of-type {
|
|
@@ -200,7 +203,7 @@
|
|
|
200
203
|
}
|
|
201
204
|
}
|
|
202
205
|
|
|
203
|
-
|
|
206
|
+
.side-bar-item {
|
|
204
207
|
display: none;
|
|
205
208
|
|
|
206
209
|
& a {
|
|
@@ -222,7 +225,7 @@
|
|
|
222
225
|
}
|
|
223
226
|
}
|
|
224
227
|
|
|
225
|
-
|
|
228
|
+
.side-bar-item {
|
|
226
229
|
margin-bottom: 0.2rem;
|
|
227
230
|
|
|
228
231
|
&:first-child {
|
|
@@ -249,11 +252,11 @@
|
|
|
249
252
|
}
|
|
250
253
|
}
|
|
251
254
|
|
|
252
|
-
|
|
255
|
+
.user-area {
|
|
253
256
|
margin-top: 1.5rem;
|
|
254
257
|
}
|
|
255
258
|
|
|
256
|
-
|
|
259
|
+
.main-content {
|
|
257
260
|
padding: 2rem;
|
|
258
261
|
background-color: var(--white);
|
|
259
262
|
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
|
|
@@ -263,30 +266,30 @@
|
|
|
263
266
|
width: 100%;
|
|
264
267
|
}
|
|
265
268
|
|
|
266
|
-
|
|
269
|
+
.entity-list {
|
|
267
270
|
overflow: auto;
|
|
268
271
|
|
|
269
|
-
|
|
272
|
+
.actions {
|
|
270
273
|
display: flex;
|
|
271
274
|
justify-content: end;
|
|
272
275
|
margin-bottom: 1rem;
|
|
273
276
|
}
|
|
274
277
|
}
|
|
275
278
|
|
|
276
|
-
|
|
279
|
+
.forms-container {
|
|
277
280
|
width: 96%;
|
|
278
281
|
max-width: 400px;
|
|
279
282
|
margin: auto;
|
|
280
283
|
}
|
|
281
284
|
|
|
282
|
-
|
|
285
|
+
.form-title {
|
|
283
286
|
font-size: 22px;
|
|
284
287
|
margin-bottom: 2%;
|
|
285
288
|
color: var(--darkGrey);
|
|
286
289
|
text-align: center;
|
|
287
290
|
}
|
|
288
291
|
|
|
289
|
-
|
|
292
|
+
.input-box {
|
|
290
293
|
margin: 0 auto 4%;
|
|
291
294
|
|
|
292
295
|
& label {
|
|
@@ -320,7 +323,7 @@
|
|
|
320
323
|
min-height: 300px;
|
|
321
324
|
}
|
|
322
325
|
|
|
323
|
-
|
|
326
|
+
.table-container {
|
|
324
327
|
width: 96%;
|
|
325
328
|
margin: auto;
|
|
326
329
|
}
|
|
@@ -332,14 +335,14 @@
|
|
|
332
335
|
text-align: center;
|
|
333
336
|
}
|
|
334
337
|
|
|
335
|
-
|
|
338
|
+
.list {
|
|
336
339
|
width: 100%;
|
|
337
340
|
border-collapse: collapse;
|
|
338
341
|
margin-bottom: 2%;
|
|
339
342
|
color: var(--darkGrey);
|
|
340
343
|
table-layout: auto;
|
|
341
344
|
|
|
342
|
-
|
|
345
|
+
.row {
|
|
343
346
|
background-color: var(--white);
|
|
344
347
|
|
|
345
348
|
&.row-header {
|
|
@@ -360,7 +363,7 @@
|
|
|
360
363
|
}
|
|
361
364
|
}
|
|
362
365
|
|
|
363
|
-
|
|
366
|
+
.field {
|
|
364
367
|
padding: 0.5rem 0;
|
|
365
368
|
min-width: min-content;
|
|
366
369
|
white-space: nowrap;
|
|
@@ -368,20 +371,20 @@
|
|
|
368
371
|
border: 1px solid #ccc;
|
|
369
372
|
text-align: left;
|
|
370
373
|
|
|
371
|
-
|
|
374
|
+
.button-list-delete {
|
|
372
375
|
border: none;
|
|
373
376
|
background-color: transparent;
|
|
374
377
|
cursor: pointer;
|
|
375
378
|
}
|
|
376
379
|
|
|
377
|
-
|
|
380
|
+
.field-actions-container {
|
|
378
381
|
display: flex;
|
|
379
382
|
flex-direction: column;
|
|
380
383
|
justify-content: center;
|
|
381
384
|
align-items: center;
|
|
382
385
|
margin: 0 1rem;
|
|
383
386
|
|
|
384
|
-
|
|
387
|
+
.button {
|
|
385
388
|
margin-bottom: 1rem;
|
|
386
389
|
|
|
387
390
|
&.list-delete-selection {
|
|
@@ -405,7 +408,7 @@
|
|
|
405
408
|
}
|
|
406
409
|
}
|
|
407
410
|
|
|
408
|
-
|
|
411
|
+
.field-edit, .field-delete {
|
|
409
412
|
& span {
|
|
410
413
|
display: block;
|
|
411
414
|
text-align: center;
|
|
@@ -413,7 +416,7 @@
|
|
|
413
416
|
}
|
|
414
417
|
}
|
|
415
418
|
|
|
416
|
-
|
|
419
|
+
.field-edit {
|
|
417
420
|
& span {
|
|
418
421
|
& svg, path {
|
|
419
422
|
width: 24px;
|
|
@@ -422,7 +425,7 @@
|
|
|
422
425
|
}
|
|
423
426
|
}
|
|
424
427
|
|
|
425
|
-
|
|
428
|
+
.field-delete {
|
|
426
429
|
& span {
|
|
427
430
|
& svg, path {
|
|
428
431
|
width: 24px;
|
|
@@ -432,11 +435,11 @@
|
|
|
432
435
|
}
|
|
433
436
|
}
|
|
434
437
|
|
|
435
|
-
|
|
438
|
+
.filters-toggle {
|
|
436
439
|
cursor: pointer;
|
|
437
440
|
}
|
|
438
441
|
|
|
439
|
-
|
|
442
|
+
.filters-toggle-content {
|
|
440
443
|
display: flex;
|
|
441
444
|
flex-wrap: wrap;
|
|
442
445
|
justify-content: flex-start;
|
|
@@ -447,7 +450,7 @@
|
|
|
447
450
|
}
|
|
448
451
|
}
|
|
449
452
|
|
|
450
|
-
|
|
453
|
+
.pagination {
|
|
451
454
|
width: 100%;
|
|
452
455
|
display: flex;
|
|
453
456
|
flex-flow: wrap;
|
|
@@ -469,9 +472,9 @@
|
|
|
469
472
|
}
|
|
470
473
|
}
|
|
471
474
|
|
|
472
|
-
|
|
475
|
+
.footer {
|
|
476
|
+
padding: 2rem;
|
|
473
477
|
text-align: center;
|
|
474
|
-
padding: 2%;
|
|
475
478
|
background-color: var(--darkGrey);
|
|
476
479
|
color: var(--white);
|
|
477
480
|
|
|
@@ -485,7 +488,7 @@
|
|
|
485
488
|
}
|
|
486
489
|
}
|
|
487
490
|
|
|
488
|
-
|
|
491
|
+
.copyright {
|
|
489
492
|
position: relative;
|
|
490
493
|
display: block;
|
|
491
494
|
width: 100%;
|
|
@@ -502,23 +505,23 @@
|
|
|
502
505
|
|
|
503
506
|
}
|
|
504
507
|
|
|
505
|
-
|
|
508
|
+
.alert {
|
|
506
509
|
font-weight: var(--bold);
|
|
507
510
|
color: var(--red);
|
|
508
511
|
}
|
|
509
512
|
|
|
510
|
-
|
|
513
|
+
.shutting-down {
|
|
511
514
|
margin-bottom: 1rem;
|
|
512
515
|
}
|
|
513
516
|
|
|
514
|
-
|
|
517
|
+
.sub-content {
|
|
515
518
|
background-color: var(--lightGrey2);
|
|
516
519
|
padding: 1rem;
|
|
517
520
|
margin-bottom: 1rem;
|
|
518
521
|
border: 1px solid #ccc;
|
|
519
522
|
border-radius: 4px;
|
|
520
523
|
|
|
521
|
-
|
|
524
|
+
.sub-content-form {
|
|
522
525
|
display: flex;
|
|
523
526
|
flex-wrap: wrap;
|
|
524
527
|
align-items: flex-end;
|
|
@@ -544,13 +547,13 @@
|
|
|
544
547
|
}
|
|
545
548
|
}
|
|
546
549
|
|
|
547
|
-
|
|
550
|
+
.actions {
|
|
548
551
|
display: flex;
|
|
549
552
|
width: 100%;
|
|
550
553
|
margin: 1rem 0 0 0;
|
|
551
554
|
}
|
|
552
555
|
|
|
553
|
-
|
|
556
|
+
.sub-content-box {
|
|
554
557
|
display: flex;
|
|
555
558
|
flex-direction: column;
|
|
556
559
|
margin-bottom: 1rem;
|
|
@@ -584,18 +587,18 @@
|
|
|
584
587
|
}
|
|
585
588
|
}
|
|
586
589
|
|
|
587
|
-
|
|
588
|
-
|
|
590
|
+
.maps-wizard {
|
|
591
|
+
.main-action-container.maps-selection {
|
|
589
592
|
width: 100%;
|
|
590
593
|
|
|
591
|
-
|
|
594
|
+
.wizard-options-container {
|
|
592
595
|
display: flex;
|
|
593
596
|
justify-content: space-between;
|
|
594
597
|
flex-wrap: wrap;
|
|
595
598
|
width: 100%;
|
|
596
599
|
|
|
597
600
|
/* 3 or more items => 4 columns */
|
|
598
|
-
|
|
601
|
+
.wizard-map-option-container {
|
|
599
602
|
flex: 0 0 22%;
|
|
600
603
|
padding: 1rem 1% 0;
|
|
601
604
|
margin: 1.5rem 0 0;
|
|
@@ -603,7 +606,7 @@
|
|
|
603
606
|
}
|
|
604
607
|
|
|
605
608
|
/* 1 child => 1 columns */
|
|
606
|
-
|
|
609
|
+
.wizard-map-option-container:only-child {
|
|
607
610
|
flex: 0 0 100%;
|
|
608
611
|
padding: 1rem 0 0;
|
|
609
612
|
border: none;
|
|
@@ -611,7 +614,7 @@
|
|
|
611
614
|
|
|
612
615
|
/* 2 children => 2 columns */
|
|
613
616
|
.wizard-map-option-container:first-child:nth-last-child(2),
|
|
614
|
-
|
|
617
|
+
.wizard-map-option-container:last-child:nth-child(2) {
|
|
615
618
|
flex: 0 0 47%;
|
|
616
619
|
}
|
|
617
620
|
|
|
@@ -622,13 +625,13 @@
|
|
|
622
625
|
}
|
|
623
626
|
}
|
|
624
627
|
|
|
625
|
-
|
|
628
|
+
.checkbox-container {
|
|
626
629
|
display: flex;
|
|
627
630
|
flex-direction: row;
|
|
628
631
|
font-weight: var(--bold);
|
|
629
632
|
}
|
|
630
633
|
|
|
631
|
-
|
|
634
|
+
.wizard-options-container {
|
|
632
635
|
padding: 0;
|
|
633
636
|
margin-bottom: 1rem;
|
|
634
637
|
|
|
@@ -638,7 +641,7 @@
|
|
|
638
641
|
margin-right: 6px;
|
|
639
642
|
}
|
|
640
643
|
|
|
641
|
-
|
|
644
|
+
.wizard-map-option-container {
|
|
642
645
|
display: flex;
|
|
643
646
|
flex-direction: column;
|
|
644
647
|
list-style: none;
|
|
@@ -656,39 +659,39 @@
|
|
|
656
659
|
}
|
|
657
660
|
}
|
|
658
661
|
|
|
659
|
-
|
|
662
|
+
.wizard-option-container {
|
|
660
663
|
list-style: none;
|
|
661
664
|
margin-bottom: 1rem;
|
|
662
665
|
|
|
663
|
-
|
|
666
|
+
.main-option {
|
|
664
667
|
display: inline-block;
|
|
665
668
|
cursor: pointer;
|
|
666
669
|
}
|
|
667
670
|
|
|
668
|
-
|
|
671
|
+
.maps-wizard-option-content {
|
|
669
672
|
display: none;
|
|
670
673
|
padding-left: 1.6rem;
|
|
671
674
|
}
|
|
672
675
|
|
|
673
676
|
&.active {
|
|
674
|
-
|
|
677
|
+
.maps-wizard-option-content {
|
|
675
678
|
display: block;
|
|
676
679
|
}
|
|
677
680
|
}
|
|
678
681
|
}
|
|
679
682
|
}
|
|
680
683
|
|
|
681
|
-
|
|
684
|
+
.maps-wizard-form {
|
|
682
685
|
align-items: flex-start;
|
|
683
686
|
flex-direction: column;
|
|
684
687
|
justify-content: flex-start;
|
|
685
688
|
|
|
686
|
-
|
|
689
|
+
.submit-container {
|
|
687
690
|
display: flex;
|
|
688
691
|
}
|
|
689
692
|
}
|
|
690
693
|
|
|
691
|
-
|
|
694
|
+
.sub-map-option-description {
|
|
692
695
|
display: flex;
|
|
693
696
|
align-items: center;
|
|
694
697
|
|
|
@@ -697,7 +700,7 @@
|
|
|
697
700
|
}
|
|
698
701
|
}
|
|
699
702
|
|
|
700
|
-
|
|
703
|
+
.sub-maps-container {
|
|
701
704
|
display: block;
|
|
702
705
|
|
|
703
706
|
&.hidden {
|
|
@@ -710,7 +713,7 @@
|
|
|
710
713
|
}
|
|
711
714
|
}
|
|
712
715
|
|
|
713
|
-
|
|
716
|
+
.loading {
|
|
714
717
|
max-width: 50px;
|
|
715
718
|
|
|
716
719
|
&.hidden {
|
|
@@ -718,7 +721,7 @@
|
|
|
718
721
|
}
|
|
719
722
|
}
|
|
720
723
|
|
|
721
|
-
|
|
724
|
+
.entity-view, .entity-edit {
|
|
722
725
|
& h2 {
|
|
723
726
|
font-size: 22px;
|
|
724
727
|
margin-bottom: 2rem;
|
|
@@ -726,7 +729,7 @@
|
|
|
726
729
|
text-align: center;
|
|
727
730
|
}
|
|
728
731
|
|
|
729
|
-
|
|
732
|
+
.view-field, .edit-field {
|
|
730
733
|
display: flex;
|
|
731
734
|
justify-content: space-between;
|
|
732
735
|
padding: 0;
|
|
@@ -765,11 +768,11 @@
|
|
|
765
768
|
}
|
|
766
769
|
}
|
|
767
770
|
|
|
768
|
-
|
|
771
|
+
.view-field .field-value img {
|
|
769
772
|
max-width: 200px;
|
|
770
773
|
}
|
|
771
774
|
|
|
772
|
-
|
|
775
|
+
.edit-field {
|
|
773
776
|
& span, input {
|
|
774
777
|
&.field-value {
|
|
775
778
|
display: flex;
|
|
@@ -802,7 +805,7 @@
|
|
|
802
805
|
}
|
|
803
806
|
}
|
|
804
807
|
|
|
805
|
-
|
|
808
|
+
.actions {
|
|
806
809
|
margin-top: 2rem;
|
|
807
810
|
text-align: center;
|
|
808
811
|
|
|
@@ -810,7 +813,7 @@
|
|
|
810
813
|
display: inline;
|
|
811
814
|
}
|
|
812
815
|
|
|
813
|
-
|
|
816
|
+
.button {
|
|
814
817
|
display: inline-block;
|
|
815
818
|
margin: 0 0.5rem;
|
|
816
819
|
}
|
|
@@ -818,9 +821,10 @@
|
|
|
818
821
|
}
|
|
819
822
|
|
|
820
823
|
.extra-actions {
|
|
821
|
-
display:
|
|
824
|
+
display: flex;
|
|
822
825
|
width: 100%;
|
|
823
|
-
|
|
826
|
+
justify-content: end;
|
|
827
|
+
margin: 1rem 0;
|
|
824
828
|
}
|
|
825
829
|
|
|
826
830
|
.cache-clean-form {
|
|
@@ -828,7 +832,7 @@
|
|
|
828
832
|
text-align: center;
|
|
829
833
|
}
|
|
830
834
|
|
|
831
|
-
|
|
835
|
+
.extra-content-container, .default-room-container {
|
|
832
836
|
display: flex;
|
|
833
837
|
flex-direction: column;
|
|
834
838
|
padding: 1rem 0;
|
|
@@ -840,11 +844,54 @@
|
|
|
840
844
|
}
|
|
841
845
|
}
|
|
842
846
|
|
|
843
|
-
|
|
847
|
+
.association-maps-container {
|
|
844
848
|
display: block;
|
|
845
849
|
width: 100%;
|
|
846
850
|
max-height: 500px;
|
|
847
851
|
overflow: auto;
|
|
848
852
|
}
|
|
849
853
|
|
|
854
|
+
.cache-confirm-dialog {
|
|
855
|
+
border: none;
|
|
856
|
+
border-radius: 8px;
|
|
857
|
+
padding: 0;
|
|
858
|
+
max-width: 500px;
|
|
859
|
+
width: 90%;
|
|
860
|
+
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
.cache-confirm-dialog::backdrop {
|
|
864
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
.cache-dialog-content {
|
|
868
|
+
padding: 1rem;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
.cache-dialog-content h5 {
|
|
872
|
+
margin: 0 0 1rem 0;
|
|
873
|
+
font-size: 18px;
|
|
874
|
+
color: var(--darkGrey);
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
.cache-dialog-content p {
|
|
878
|
+
margin: 0 0 1rem 0;
|
|
879
|
+
color: var(--darkGrey);
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
.cache-warning {
|
|
883
|
+
padding: 1rem;
|
|
884
|
+
background-color: #fff3cd;
|
|
885
|
+
border: 1px solid #ffeaa7;
|
|
886
|
+
border-radius: 4px;
|
|
887
|
+
color: #856404;
|
|
888
|
+
margin-bottom: 1rem;
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
.cache-dialog-actions {
|
|
892
|
+
display: flex;
|
|
893
|
+
justify-content: flex-end;
|
|
894
|
+
gap: 1rem;
|
|
895
|
+
}
|
|
896
|
+
|
|
850
897
|
}
|
|
@@ -276,4 +276,28 @@ window.addEventListener('DOMContentLoaded', () => {
|
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
|
|
279
|
+
// cache clear all functionality:
|
|
280
|
+
let cacheClearAllButton = document.querySelector('.cache-clear-all-button');
|
|
281
|
+
let cacheConfirmDialog = document.querySelector('.cache-confirm-dialog');
|
|
282
|
+
let cacheDialogCancel = document.querySelector('.cache-dialog-cancel');
|
|
283
|
+
let cacheClearForm = document.querySelector('.cache-clear-form');
|
|
284
|
+
if(cacheClearAllButton && cacheConfirmDialog){
|
|
285
|
+
cacheClearAllButton.addEventListener('click', () => {
|
|
286
|
+
cacheConfirmDialog.showModal();
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
if(cacheDialogCancel && cacheConfirmDialog){
|
|
290
|
+
cacheDialogCancel.addEventListener('click', () => {
|
|
291
|
+
cacheConfirmDialog.close();
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
if(cacheClearForm){
|
|
295
|
+
cacheClearForm.addEventListener('submit', (event) => {
|
|
296
|
+
let submitButton = cacheClearForm.querySelector('button[type="submit"]');
|
|
297
|
+
if(submitButton){
|
|
298
|
+
submitButton.disabled = true;
|
|
299
|
+
}
|
|
300
|
+
});
|
|
301
|
+
}
|
|
302
|
+
|
|
279
303
|
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<button type="button" class="button button-warning cache-clear-all-button">
|
|
2
|
+
{{buttonText}}
|
|
3
|
+
</button>
|
|
4
|
+
<dialog class="cache-confirm-dialog">
|
|
5
|
+
<div class="cache-dialog-content">
|
|
6
|
+
<h5>{{confirmTitle}}</h5>
|
|
7
|
+
<p>{{confirmMessage}}</p>
|
|
8
|
+
<div class="alert cache-warning">
|
|
9
|
+
<strong>{{warningText}}</strong> {{warningMessage}}
|
|
10
|
+
</div>
|
|
11
|
+
<div class="cache-dialog-actions">
|
|
12
|
+
<button type="button" class="button button-secondary cache-dialog-cancel">{{cancelText}}</button>
|
|
13
|
+
<form method="post" action="{{clearAllCacheRoute}}" class="cache-clear-form">
|
|
14
|
+
<button type="submit" class="button button-danger">{{confirmText}}</button>
|
|
15
|
+
</form>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</dialog>
|