@concretecms/bedrock 1.6.0 → 1.6.2
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/Chooser.vue +11 -2
- package/assets/cms/js/edit-mode/heartbeat.js +1 -1
- package/assets/cms/js/legacy-dialog.js +2 -0
- package/assets/cms/js/sitemap/sitemap-selector.js +38 -10
- package/assets/cms/scss/_sitemap.scss +3 -3
- package/assets/cms/scss/_variables.scss +1 -1
- package/assets/cms/scss/panels/_shared.scss +15 -5
- package/assets/cms/scss/panels/add/_blocks.scss +1 -1
- package/assets/cms/scss/panels/pages/_attributes.scss +5 -3
- package/package.json +1 -1
|
@@ -152,10 +152,16 @@ export default {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
+
|
|
155
156
|
this.applyLocalization()
|
|
156
157
|
ConcreteEvent.subscribe('FileUploaderFilesReadyToUpload', function(e, filesReadyToUpload) {
|
|
157
158
|
my.filesReadyToUpload = filesReadyToUpload
|
|
158
159
|
})
|
|
160
|
+
|
|
161
|
+
const fileChooserItemKey = $.cookie('ConcreteFileChooserItemKey')
|
|
162
|
+
if (fileChooserItemKey) {
|
|
163
|
+
this.activateTabByKey(fileChooserItemKey)
|
|
164
|
+
}
|
|
159
165
|
},
|
|
160
166
|
watch: {
|
|
161
167
|
choosers() {
|
|
@@ -222,12 +228,12 @@ export default {
|
|
|
222
228
|
activateTabByKey(key) {
|
|
223
229
|
var my = this
|
|
224
230
|
this.choosers.forEach(function(chooser) {
|
|
225
|
-
if (chooser.
|
|
231
|
+
if (chooser.componentKey === key) {
|
|
226
232
|
my.activateTab(chooser)
|
|
227
233
|
}
|
|
228
234
|
})
|
|
229
235
|
this.uploaders.forEach(function(uploader) {
|
|
230
|
-
if (uploader.
|
|
236
|
+
if (uploader.componentKey === key) {
|
|
231
237
|
my.activateTab(uploader)
|
|
232
238
|
}
|
|
233
239
|
})
|
|
@@ -235,6 +241,9 @@ export default {
|
|
|
235
241
|
activateTab(item) {
|
|
236
242
|
this.activeNavItem = item
|
|
237
243
|
|
|
244
|
+
// Store the last selected tab ID in a cookie (expires in 7 days)
|
|
245
|
+
$.cookie('ConcreteFileChooserItemKey', item.componentKey, { expires: 7, path: '/' })
|
|
246
|
+
|
|
238
247
|
// Reset Selected Files because the component always rerender after Tab switch
|
|
239
248
|
// Otherwise we have to use keep-alive built-in component [@see https://vuejs.org/v2/api/#keep-alive]
|
|
240
249
|
// to keep selection from different Tabs
|
|
@@ -16,6 +16,6 @@ $(window).on('mousemove keydown keyup', function() {
|
|
|
16
16
|
cache: false,
|
|
17
17
|
dataType: 'json',
|
|
18
18
|
type: 'GET',
|
|
19
|
-
url: CCM_DISPATCHER_FILENAME + '/ccm/system/heartbeat'
|
|
19
|
+
url: CCM_DISPATCHER_FILENAME + '/ccm/system/heartbeat?cID=' + (Number(window.CCM_CID) || '')
|
|
20
20
|
})
|
|
21
21
|
})
|
|
@@ -277,6 +277,8 @@
|
|
|
277
277
|
var finalSettings = { autoOpen: false, data: {} }
|
|
278
278
|
$.extend(finalSettings, defaults, options)
|
|
279
279
|
|
|
280
|
+
finalSettings.classes = { 'ui-dialog': finalSettings.dialogClass }
|
|
281
|
+
|
|
280
282
|
if (finalSettings.element) {
|
|
281
283
|
$(finalSettings.element).jqdialog(finalSettings).jqdialog()
|
|
282
284
|
$(finalSettings.element).jqdialog('open')
|
|
@@ -33,20 +33,48 @@
|
|
|
33
33
|
},
|
|
34
34
|
init: function() {
|
|
35
35
|
if (options.selected) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
var tree = $.ui.fancytree.getTree(my.$element.find('.ccm-sitemap-tree'))
|
|
37
|
+
|
|
38
|
+
var paths
|
|
39
|
+
if (options.mode === 'multiple') {
|
|
40
|
+
paths = options.selectedPath.map(pathGroup => pathGroup.map(String))
|
|
41
|
+
} else {
|
|
42
|
+
paths = []
|
|
43
|
+
paths.push(options.selectedPath.map(String))
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
var promise = Promise.resolve()
|
|
47
|
+
|
|
48
|
+
paths.forEach(function(pathGroup) {
|
|
49
|
+
pathGroup.forEach(function(nodeKey) {
|
|
50
|
+
promise = promise.then(function() {
|
|
51
|
+
var node = tree.getNodeByKey(nodeKey)
|
|
52
|
+
if (node) {
|
|
53
|
+
return node.setExpanded(true)
|
|
54
|
+
}
|
|
55
|
+
})
|
|
56
|
+
})
|
|
57
|
+
|
|
58
|
+
promise = promise.then(function() {
|
|
59
|
+
return Promise.resolve()
|
|
60
|
+
})
|
|
61
|
+
})
|
|
62
|
+
|
|
63
|
+
promise.then(function() {
|
|
64
|
+
if (options.mode === 'multiple') {
|
|
65
|
+
options.selected.forEach(function(cID) {
|
|
66
|
+
var node = tree.getNodeByKey(String(cID))
|
|
67
|
+
if (node) {
|
|
68
|
+
node.setSelected(true)
|
|
69
|
+
}
|
|
70
|
+
})
|
|
71
|
+
} else {
|
|
72
|
+
var node = tree.getNodeByKey(String(options.selected))
|
|
39
73
|
if (node) {
|
|
40
74
|
node.setSelected(true)
|
|
41
75
|
}
|
|
42
|
-
})
|
|
43
|
-
} else {
|
|
44
|
-
var tree = $.ui.fancytree.getTree(my.$element.find('.ccm-sitemap-tree'))
|
|
45
|
-
var node = tree.getNodeByKey(String(options.selected))
|
|
46
|
-
if (node) {
|
|
47
|
-
node.setSelected(true)
|
|
48
76
|
}
|
|
49
|
-
}
|
|
77
|
+
})
|
|
50
78
|
}
|
|
51
79
|
},
|
|
52
80
|
onSelectNode: function(node, flag) {
|
|
@@ -219,9 +219,9 @@
|
|
|
219
219
|
|
|
220
220
|
@include color-mode(dark) {
|
|
221
221
|
.ccm-ui {
|
|
222
|
-
.
|
|
223
|
-
|
|
224
|
-
|
|
222
|
+
ul.ui-fancytree {
|
|
223
|
+
li[role=treeitem] {
|
|
224
|
+
span.fancytree-node {
|
|
225
225
|
span.fancytree-expander,
|
|
226
226
|
span.icon-folder,
|
|
227
227
|
span.icon-home,
|
|
@@ -63,7 +63,7 @@ $form-select-border-color: rgb(235, 235, 235);
|
|
|
63
63
|
$form-select-box-shadow: 0 0;
|
|
64
64
|
$input-border-radius: 4px;
|
|
65
65
|
//$input-border-width: 1px;
|
|
66
|
-
|
|
66
|
+
//$input-color: $dark-blue;
|
|
67
67
|
$input-padding-y: 0.5rem;
|
|
68
68
|
$label-margin-bottom: 0.4rem;
|
|
69
69
|
$input-box-shadow: inset 0 0;
|
|
@@ -607,12 +607,22 @@ div.ccm-panel-content {
|
|
|
607
607
|
}
|
|
608
608
|
|
|
609
609
|
@include color-mode(dark) {
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
610
|
+
div.ccm-panel-content {
|
|
611
|
+
header {
|
|
612
|
+
a {
|
|
613
|
+
color: $gray-400;
|
|
613
614
|
|
|
614
|
-
|
|
615
|
-
|
|
615
|
+
svg {
|
|
616
|
+
fill: $gray-400;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
&:hover {
|
|
620
|
+
color: $blue;
|
|
621
|
+
|
|
622
|
+
svg {
|
|
623
|
+
fill: $blue;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
616
626
|
}
|
|
617
627
|
}
|
|
618
628
|
}
|
|
@@ -178,9 +178,11 @@
|
|
|
178
178
|
|
|
179
179
|
@include color-mode(dark) {
|
|
180
180
|
#ccm-detail-page-attributes {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
181
|
+
.form-group {
|
|
182
|
+
&[data-attribute-key-id] {
|
|
183
|
+
background-color: $panel-background-color-dark;
|
|
184
|
+
border: 2px solid lighten($panel-background-color-dark, 0.3);
|
|
185
|
+
}
|
|
184
186
|
}
|
|
185
187
|
}
|
|
186
188
|
|
package/package.json
CHANGED