@concretecms/bedrock 1.4.15 → 1.5.1
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/assets/cms/components/file-manager/Uploader/UploadFromComputer.vue +8 -0
- package/assets/cms/js/tree.js +37 -10
- package/assets/cms/scss/_hud.scss +5 -0
- package/assets/cms/scss/_tables.scss +1 -1
- package/assets/cms/scss/_toolbar.scss +19 -0
- package/assets/cms/scss/jquery-ui/_overrides.scss +7 -2
- package/assets/cms/scss/panels/pages/_attributes.scss +11 -0
- package/package.json +2 -3
|
@@ -68,6 +68,10 @@ export default {
|
|
|
68
68
|
type: Number,
|
|
69
69
|
required: false,
|
|
70
70
|
default: null
|
|
71
|
+
},
|
|
72
|
+
reloadOnReplace: {
|
|
73
|
+
type: Boolean,
|
|
74
|
+
default: false
|
|
71
75
|
}
|
|
72
76
|
},
|
|
73
77
|
computed: {
|
|
@@ -274,6 +278,10 @@ export default {
|
|
|
274
278
|
this.dropzone.processQueue()
|
|
275
279
|
},
|
|
276
280
|
uploadComplete(fileIds) {
|
|
281
|
+
if (this.replaceFileId && fileIds && fileIds.length && this.reloadOnReplace) {
|
|
282
|
+
window.location.reload()
|
|
283
|
+
return
|
|
284
|
+
}
|
|
277
285
|
this.$emit('upload-complete', fileIds)
|
|
278
286
|
|
|
279
287
|
ConcreteAlert.notify({
|
package/assets/cms/js/tree.js
CHANGED
|
@@ -138,10 +138,10 @@ ConcreteTree.prototype = {
|
|
|
138
138
|
},
|
|
139
139
|
select: function (select, data) {
|
|
140
140
|
if (options.chooseNodeInForm) {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
141
|
+
const keys = my.getSelectedNodeKeys(data.tree.getRootNode(), ajaxData.treeNodeSelectedIDs)
|
|
142
|
+
if (keys.length) {
|
|
143
|
+
options.onSelect(keys)
|
|
144
|
+
}
|
|
145
145
|
}
|
|
146
146
|
},
|
|
147
147
|
|
|
@@ -168,12 +168,9 @@ ConcreteTree.prototype = {
|
|
|
168
168
|
|
|
169
169
|
var selectedNodes
|
|
170
170
|
if (options.chooseNodeInForm) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
if (
|
|
174
|
-
var keys = $.map(selectedNodes, function (node) {
|
|
175
|
-
return node.key
|
|
176
|
-
})
|
|
171
|
+
const tree = $.ui.fancytree.getTree($tree)
|
|
172
|
+
const keys = my.getSelectedNodeKeys(tree.getRootNode(), ajaxData.treeNodeSelectedIDs)
|
|
173
|
+
if (keys.length) {
|
|
177
174
|
options.onSelect(keys)
|
|
178
175
|
}
|
|
179
176
|
}
|
|
@@ -310,6 +307,36 @@ ConcreteTree.prototype = {
|
|
|
310
307
|
})
|
|
311
308
|
},
|
|
312
309
|
|
|
310
|
+
getSelectedNodeKeys: function (node, selected) {
|
|
311
|
+
var my = this
|
|
312
|
+
|
|
313
|
+
// Initialize selected array
|
|
314
|
+
selected = selected || []
|
|
315
|
+
|
|
316
|
+
// Remove keys that are not in the tree anymore
|
|
317
|
+
selected = selected.filter(function (key) {
|
|
318
|
+
return $.ui.fancytree.getTree(my.$element).getNodeByKey(parseInt(key)) !== null
|
|
319
|
+
})
|
|
320
|
+
|
|
321
|
+
// Walk through all child nodes
|
|
322
|
+
if (node.hasChildren()) {
|
|
323
|
+
node.getChildren().forEach(function (child) {
|
|
324
|
+
// If the node is selected and not already in the selected array, add it
|
|
325
|
+
if (child.isSelected() && !selected.includes(parseInt(child.key))) {
|
|
326
|
+
selected.push(parseInt(child.key))
|
|
327
|
+
}
|
|
328
|
+
// If the node is not selected and is in the selected array, remove it
|
|
329
|
+
if (!child.isSelected() && selected.includes(parseInt(child.key))) {
|
|
330
|
+
selected.splice(selected.indexOf(parseInt(child.key)), 1)
|
|
331
|
+
}
|
|
332
|
+
// call the function recursively and merge the result with the selected array
|
|
333
|
+
selected = my.getSelectedNodeKeys(child, selected)
|
|
334
|
+
})
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
return selected
|
|
338
|
+
},
|
|
339
|
+
|
|
313
340
|
getLoadNodePromise: function (node) {
|
|
314
341
|
var my = this
|
|
315
342
|
var ajaxData = my.options.ajaxData != false ? my.options.ajaxData : {}
|
|
@@ -131,6 +131,11 @@ div#ccm-popup-alert-message {
|
|
|
131
131
|
right: 30px;
|
|
132
132
|
width: 380px;
|
|
133
133
|
z-index: $index-level-page-alert;
|
|
134
|
+
@media only screen and (max-width: 768px) {
|
|
135
|
+
left: 0;
|
|
136
|
+
right: 0;
|
|
137
|
+
width: 100vw;
|
|
138
|
+
}
|
|
134
139
|
}
|
|
135
140
|
|
|
136
141
|
.ccm-notifications-box-header {
|
|
@@ -7,6 +7,9 @@ div#ccm-toolbar {
|
|
|
7
7
|
position: fixed;
|
|
8
8
|
top: 0;
|
|
9
9
|
width: 100%;
|
|
10
|
+
@media only screen and (max-width: 768px) {
|
|
11
|
+
width: 100vw;
|
|
12
|
+
}
|
|
10
13
|
z-index: $index-level-main-bar; /* over the top of the highlighter, which is 1000 */
|
|
11
14
|
|
|
12
15
|
.ccm-toolbar-accessibility-title {
|
|
@@ -373,6 +376,22 @@ ul.ccm-mobile-menu {
|
|
|
373
376
|
}
|
|
374
377
|
}
|
|
375
378
|
|
|
379
|
+
.ccm-toolbar-mobile-add-pages-button {
|
|
380
|
+
border-left: 1px solid $gray-200;
|
|
381
|
+
cursor: pointer;
|
|
382
|
+
height: 47px;
|
|
383
|
+
padding: 14px 18px;
|
|
384
|
+
|
|
385
|
+
svg {
|
|
386
|
+
fill: $gray-600;
|
|
387
|
+
height: 16px;
|
|
388
|
+
margin: 0 auto;
|
|
389
|
+
transition: fill 0.25s ease-in-out;
|
|
390
|
+
vertical-align: baseline;
|
|
391
|
+
width: 16px;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
|
|
376
395
|
.ccm-mobile-toolbar-menu {
|
|
377
396
|
display: none;
|
|
378
397
|
|
|
@@ -9,9 +9,15 @@ html.ccm-toolbar-visible {
|
|
|
9
9
|
|
|
10
10
|
.ui-dialog {
|
|
11
11
|
box-shadow: $modal-content-box-shadow-sm-up;
|
|
12
|
+
max-width: 100vw;
|
|
12
13
|
padding: 0;
|
|
13
|
-
|
|
14
14
|
z-index: $index-level-dialog;
|
|
15
|
+
@media only screen and (max-width: 768px) {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
max-height: 100vh;
|
|
19
|
+
}
|
|
20
|
+
|
|
15
21
|
/* hide section titles for panels when those panels are shown in dialogs */
|
|
16
22
|
section {
|
|
17
23
|
header {
|
|
@@ -144,6 +150,5 @@ html.ccm-toolbar-visible {
|
|
|
144
150
|
button {
|
|
145
151
|
margin: $modal-footer-margin-between / 2;
|
|
146
152
|
}
|
|
147
|
-
|
|
148
153
|
}
|
|
149
154
|
}
|
|
@@ -99,6 +99,10 @@
|
|
|
99
99
|
display: block;
|
|
100
100
|
float: left;
|
|
101
101
|
width: 100%;
|
|
102
|
+
@media only screen and (max-width: 768px) {
|
|
103
|
+
display: flex;
|
|
104
|
+
flex-direction: column-reverse;
|
|
105
|
+
}
|
|
102
106
|
}
|
|
103
107
|
|
|
104
108
|
#ccm-dialog-attributes-menu {
|
|
@@ -107,6 +111,9 @@
|
|
|
107
111
|
margin: 0;
|
|
108
112
|
padding: 0;
|
|
109
113
|
width: 30%;
|
|
114
|
+
@media only screen and (max-width: 768px) {
|
|
115
|
+
width: auto;
|
|
116
|
+
}
|
|
110
117
|
}
|
|
111
118
|
|
|
112
119
|
#ccm-dialog-attributes-detail {
|
|
@@ -115,6 +122,10 @@
|
|
|
115
122
|
margin: 0 0 0 65px;
|
|
116
123
|
padding: 0;
|
|
117
124
|
width: calc(70% - 65px);
|
|
125
|
+
@media only screen and (max-width: 768px) {
|
|
126
|
+
margin: 0;
|
|
127
|
+
width: auto;
|
|
128
|
+
}
|
|
118
129
|
}
|
|
119
130
|
|
|
120
131
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@concretecms/bedrock",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "The asset framework and dependencies for Concrete CMS.",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"lint": "standardx \"**/*.{js,vue}\" && stylelint assets/**/*.{scss,vue}",
|
|
@@ -12,14 +12,13 @@
|
|
|
12
12
|
"storybook": "start-storybook -p55600 -s./.storybook/public"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@concretecms/bedrock": "^1.4.13",
|
|
16
15
|
"@fortawesome/fontawesome-free": "^5.15.1",
|
|
17
16
|
"ace-builds": "^1.4.12",
|
|
18
17
|
"ajax-bootstrap-select": "^1.4.5",
|
|
19
18
|
"backstretch": "^1.2.2",
|
|
20
19
|
"blueimp-file-upload": "^10.31.0",
|
|
21
20
|
"bootbox": "github:makeusabrew/bootbox#master",
|
|
22
|
-
"bootstrap": "5.
|
|
21
|
+
"bootstrap": "5.3.3",
|
|
23
22
|
"bootstrap-select": "github:snapappointments/bootstrap-select",
|
|
24
23
|
"bootstrap-tourist": "git+https://git@github.com/concrete5/bootstrap-tourist.git",
|
|
25
24
|
"check-password-strength": "^2.0.7",
|