@concretecms/bedrock 1.6.7 → 1.7.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.
@@ -15,6 +15,9 @@
15
15
  jQuery.fn.dialog.showLoader()
16
16
  ConcreteFileManager.getFileDetails(data.fID, function (r) {
17
17
  jQuery.fn.dialog.hideLoader()
18
+ if (!r) {
19
+ return
20
+ }
18
21
  var file = r.files[0]
19
22
  if ((dialog.getName() == 'image' || dialog.getName() == 'image2') && dialog._.currentTabId == 'info') {
20
23
  CKEDITOR.tools.callFunction(editor._.filebrowserFn, file.urlInline, function () {
@@ -121,10 +121,10 @@ export default {
121
121
  var my = this
122
122
  my.isLoading = true
123
123
  ConcreteFileManager.getFileDetails(fileId, function (r) {
124
- my.selectedFile = r.files[0]
125
- my.selectedFileID = fileId
124
+ my.selectedFile = r ? r.files[0] : null
125
+ my.selectedFileID = r ? fileId : 0
126
126
  my.isLoading = false
127
- my.$emit('selectedfile', r.files[0])
127
+ my.$emit('selectedfile', my.selectedFile)
128
128
  })
129
129
  }
130
130
 
@@ -183,7 +183,7 @@ export default {
183
183
  ConcreteFileManager.launchDialog(function(data) {
184
184
  for (var fID of data.fID) {
185
185
  ConcreteFileManager.getFileDetails(fID, function (file) {
186
- file = file.files[0] || {}
186
+ file = file?.files[0] || {}
187
187
  me.gallery.push({
188
188
  id: file.fID,
189
189
  title: file.title,
@@ -142,7 +142,10 @@ export default {
142
142
  },
143
143
  triggerSelect(gID, gName, gDisplayName) {
144
144
  gID = parseInt(gID) || 0
145
- ConcreteEvent.publish('SelectGroup', { gID, gName, gDisplayName })
145
+ // Fallback to legacy event if no Vue listener is defined
146
+ if (!this.$listeners.select) {
147
+ ConcreteEvent.publish('SelectGroup', { gID, gName, gDisplayName })
148
+ }
146
149
  this.$emit('select', { gID, gName, gDisplayName })
147
150
  },
148
151
  performSearch(event) {
@@ -210,7 +210,7 @@
210
210
  }
211
211
  $.fn.dialog.hideLoader()
212
212
  _.defer(function () {
213
- my.getEditMode().scanBlocks()
213
+ Concrete.getEditMode().scanBlocks()
214
214
  my.showSuccessfulAdd()
215
215
  Concrete.forceRefresh()
216
216
 
@@ -51,6 +51,7 @@ class ConcreteFileManager {
51
51
  data: { fID: fID },
52
52
  error: function(r) {
53
53
  ConcreteAlert.dialog(ccmi18n.error, r.responseText)
54
+ callback(null)
54
55
  },
55
56
  success: function(r) {
56
57
  callback(r)
File without changes
@@ -0,0 +1,2 @@
1
+ // Components
2
+ import './backend/stack-editor'
@@ -0,0 +1,2 @@
1
+ @import 'stack-editor';
2
+
@@ -0,0 +1,21 @@
1
+ @import '../../../cms/scss/variables';
2
+
3
+ #ccm-stack-editor {
4
+ margin-top: 100px;
5
+
6
+ .ccm-dashboard-breadcrumb {
7
+ font-size: 1rem;
8
+ margin-bottom: 0;
9
+ margin-top: 0;
10
+ padding-bottom: 0;
11
+ padding-top: 0;
12
+
13
+ a.dropdown-toggle {
14
+ color: $gray-600;
15
+ }
16
+ }
17
+
18
+ .ccm-stack-editor-column {
19
+ transition: width 0.1s cubic-bezier(0.19, 1, 0.22, 1);
20
+ }
21
+ }
@@ -0,0 +1,4 @@
1
+ // This is an entry point so it just includes the partial that includes everything else.
2
+ // That way if we want to include full support in our theme we just include the partial (rather
3
+ // than including the entry point because I think it's bad practice.)
4
+ @import 'backend/backend';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@concretecms/bedrock",
3
- "version": "1.6.7",
3
+ "version": "1.7.0",
4
4
  "description": "The asset framework and dependencies for Concrete CMS.",
5
5
  "scripts": {
6
6
  "lint": "standardx \"**/*.{js,vue}\" && stylelint assets/**/*.{scss,vue}",