@concretecms/bedrock 1.3.1 → 1.3.4
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/RunningProcessList.vue +38 -28
- package/assets/cms/js/base.js +0 -3
- package/assets/cms/js/edit-mode/area.js +2 -2
- package/assets/cms/scss/_base.scss +1 -0
- package/assets/cms/scss/_color-picker.scss +28 -0
- package/assets/cms/scss/_inline-toolbar.scss +0 -24
- package/assets/cms/scss/_login-page.scss +0 -6
- package/assets/cms/scss/_page-areas.scss +10 -4
- package/package.json +1 -1
- package/assets/cms/js/server-events.js +0 -17
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
</template>
|
|
32
32
|
|
|
33
33
|
<script>
|
|
34
|
+
/* global CCM_DISPATCHER_FILENAME, CCM_SERVER_EVENTS_URL, CCM_SECURITY_TOKEN */
|
|
34
35
|
/* eslint-disable no-new */
|
|
35
36
|
/* eslint eqeqeq: 0 */
|
|
36
37
|
import Icon from './Icon'
|
|
@@ -117,36 +118,45 @@ export default {
|
|
|
117
118
|
}
|
|
118
119
|
})
|
|
119
120
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
}
|
|
126
|
-
})
|
|
127
|
-
}
|
|
128
|
-
})
|
|
129
|
-
ConcreteEvent.subscribe('ConcreteServerEventBatchUpdated', function(e, data) {
|
|
130
|
-
var total = data.batch.totalJobs
|
|
131
|
-
var progress = total - data.batch.pendingJobs
|
|
132
|
-
var percent = Math.round(progress / total * 100)
|
|
133
|
-
|
|
134
|
-
my.processes.forEach(function (thisProcess) {
|
|
135
|
-
if (thisProcess.batch && thisProcess.batch.id == data.batch.id) {
|
|
136
|
-
thisProcess.progress = percent
|
|
137
|
-
thisProcess.batch = data.batch
|
|
138
|
-
}
|
|
121
|
+
if (typeof (CCM_SERVER_EVENTS_URL) !== 'undefined') {
|
|
122
|
+
const eventSourceUrl = new URL(CCM_SERVER_EVENTS_URL)
|
|
123
|
+
eventSourceUrl.searchParams.append('topic', '{+siteUrl}/concrete/events/processes/{+eventName}')
|
|
124
|
+
const eventSource = new EventSource(eventSourceUrl, {
|
|
125
|
+
withCredentials: true
|
|
139
126
|
})
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
if (
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
127
|
+
|
|
128
|
+
eventSource.onmessage = event => {
|
|
129
|
+
var data = JSON.parse(event.data)
|
|
130
|
+
if (Object.prototype.hasOwnProperty.call(data, 'batch')) {
|
|
131
|
+
// Batch Updated
|
|
132
|
+
var total = data.batch.totalJobs
|
|
133
|
+
var progress = total - data.batch.pendingJobs
|
|
134
|
+
var percent = Math.round(progress / total * 100)
|
|
135
|
+
|
|
136
|
+
my.processes.forEach(function (thisProcess) {
|
|
137
|
+
if (thisProcess.batch && thisProcess.batch.id == data.batch.id) {
|
|
138
|
+
thisProcess.progress = percent
|
|
139
|
+
thisProcess.batch = data.batch
|
|
140
|
+
}
|
|
141
|
+
})
|
|
142
|
+
} else if (Object.prototype.hasOwnProperty.call(data, 'exitCode')) {
|
|
143
|
+
// Close process
|
|
144
|
+
my.processes.forEach(function (thisProcess) {
|
|
145
|
+
if (thisProcess.id == data.process.id) {
|
|
146
|
+
thisProcess.dateCompleted = data.process.dateCompleted
|
|
147
|
+
thisProcess.dateCompletedString = data.process.dateCompletedString
|
|
148
|
+
my.completeProcess(thisProcess)
|
|
149
|
+
}
|
|
150
|
+
})
|
|
151
|
+
} else if (Object.prototype.hasOwnProperty.call(data, 'processId')) {
|
|
152
|
+
my.processes.forEach(function (thisProcess) {
|
|
153
|
+
if (thisProcess.id === data.processId) {
|
|
154
|
+
thisProcess.details.push(data.message)
|
|
155
|
+
}
|
|
156
|
+
})
|
|
147
157
|
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
150
160
|
},
|
|
151
161
|
watch: {
|
|
152
162
|
processes: {
|
package/assets/cms/js/base.js
CHANGED
|
@@ -13,9 +13,6 @@ import 'ajax-bootstrap-select'
|
|
|
13
13
|
import './modifiable-ajax-bootstrap-select'
|
|
14
14
|
import 'dropzone/dist/dropzone'
|
|
15
15
|
|
|
16
|
-
// Server events
|
|
17
|
-
import './server-events'
|
|
18
|
-
|
|
19
16
|
// jQuery UI components
|
|
20
17
|
import 'jquery-ui/ui/widgets/button'
|
|
21
18
|
import 'jquery-ui/ui/widgets/dialog'
|
|
@@ -386,8 +386,8 @@
|
|
|
386
386
|
}
|
|
387
387
|
|
|
388
388
|
if (!my.getElem().parent().is('#ccm-stack-container')) {
|
|
389
|
-
var template = _(ccmi18n.emptyArea).template()
|
|
390
|
-
elem.
|
|
389
|
+
var template = _('<span>' + ccmi18n.emptyArea + '</span>').template()
|
|
390
|
+
elem.html(template({ area_handle: my.getElem().data('area-display-name') }))
|
|
391
391
|
}
|
|
392
392
|
my.getDragAreas().push(drag_area)
|
|
393
393
|
return drag_area
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
div.ccm-ui {
|
|
2
|
+
.ccm-widget-colorpicker {
|
|
3
|
+
border: 1px solid $input-border-color;
|
|
4
|
+
height: unset;
|
|
5
|
+
padding: 5px;
|
|
6
|
+
width: unset;
|
|
7
|
+
|
|
8
|
+
.sp-preview {
|
|
9
|
+
border: 1px solid $input-border-color;
|
|
10
|
+
border-radius: 2px;
|
|
11
|
+
height: 30px;
|
|
12
|
+
margin-right: 15px;
|
|
13
|
+
width: 35px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.sp-dd {
|
|
17
|
+
color: $input-color;
|
|
18
|
+
font-size: 12px;
|
|
19
|
+
line-height: 2.6rem;
|
|
20
|
+
right: 2px;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&.sp-replacer:hover,
|
|
24
|
+
&.sp-replacer.sp-active {
|
|
25
|
+
border-color: $input-focus-border-color;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -127,30 +127,6 @@
|
|
|
127
127
|
position: relative;
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
.sp-dd {
|
|
131
|
-
display: none;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.sp-replacer {
|
|
135
|
-
border: 1px solid #444;
|
|
136
|
-
border-radius: 4px;
|
|
137
|
-
height: 28px;
|
|
138
|
-
margin-left: 10px;
|
|
139
|
-
padding: 0;
|
|
140
|
-
width: 28px;
|
|
141
|
-
|
|
142
|
-
.sp-preview {
|
|
143
|
-
border: 0;
|
|
144
|
-
height: 28px;
|
|
145
|
-
width: 28px;
|
|
146
|
-
|
|
147
|
-
.sp-preview-inner {
|
|
148
|
-
height: 28px;
|
|
149
|
-
width: 28px;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
130
|
h3 {
|
|
155
131
|
font-size: $font-size-base;
|
|
156
132
|
font-weight: bold;
|
|
@@ -129,12 +129,13 @@ div.ccm-area.ccm-menu-item-hover {
|
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
div.ccm-area-footer {
|
|
132
|
-
|
|
132
|
+
bottom: 0;
|
|
133
133
|
left: 0;
|
|
134
134
|
max-width: 100%;
|
|
135
135
|
opacity: 0;
|
|
136
136
|
padding-left: 20px;
|
|
137
137
|
position: absolute;
|
|
138
|
+
transform: translateY(100%);
|
|
138
139
|
transition: opacity 0.5 s cubic-bezier(0.19, 1, 0.22, 1);
|
|
139
140
|
white-space: nowrap;
|
|
140
141
|
//padding-top: 15px;
|
|
@@ -148,7 +149,6 @@ div.ccm-area-footer {
|
|
|
148
149
|
color: #666;
|
|
149
150
|
display: inline-block;
|
|
150
151
|
font-size: $font-size-base !important;
|
|
151
|
-
height: 35px;
|
|
152
152
|
max-width: 100%;
|
|
153
153
|
padding: 8px 15px;
|
|
154
154
|
|
|
@@ -409,9 +409,12 @@ div.ccm-area-drag-area {
|
|
|
409
409
|
outline-color: rgb(170, 255, 170);
|
|
410
410
|
outline-style: solid;
|
|
411
411
|
outline-width: 0;
|
|
412
|
-
text-indent: -10000em;
|
|
413
412
|
transition: outline-width 0.5s cubic-bezier(0.19, 1, 0.22, 1), outline-color 0.5s cubic-bezier(0.19, 1, 0.22, 1);
|
|
414
413
|
|
|
414
|
+
span {
|
|
415
|
+
display: none;
|
|
416
|
+
}
|
|
417
|
+
|
|
415
418
|
&.ccm-area-drag-area-contender {
|
|
416
419
|
background-color: rgba(221, 255, 221, 0.5);
|
|
417
420
|
outline: solid 5px rgba(221, 255, 221, 0.7) !important;
|
|
@@ -445,9 +448,12 @@ html.ccm-block-dragging {
|
|
|
445
448
|
div.ccm-area[data-total-blocks='0'] {
|
|
446
449
|
div.ccm-area-drag-area {
|
|
447
450
|
color: #bbb;
|
|
451
|
+
display: block;
|
|
448
452
|
padding: 24px;
|
|
449
453
|
text-align: center !important; /* https://github.com/concrete5/concrete5/issues/10249 */
|
|
450
|
-
|
|
454
|
+
span {
|
|
455
|
+
display: inline-block;
|
|
456
|
+
}
|
|
451
457
|
}
|
|
452
458
|
}
|
|
453
459
|
|
package/package.json
CHANGED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-new, no-unused-vars, camelcase, eqeqeq */
|
|
2
|
-
|
|
3
|
-
class ConcreteServerEvents {
|
|
4
|
-
static listen(url, topicUrl) {
|
|
5
|
-
const eventSourceUrl = new URL(url)
|
|
6
|
-
eventSourceUrl.searchParams.append('topic', topicUrl + '/{+anything}')
|
|
7
|
-
const eventSource = new EventSource(eventSourceUrl)
|
|
8
|
-
eventSource.onmessage = event => {
|
|
9
|
-
// Will be called every time an update is published by the server
|
|
10
|
-
var data = JSON.parse(event.data)
|
|
11
|
-
var eventName = 'ConcreteServerEvent' + data.event
|
|
12
|
-
ConcreteEvent.publish(eventName, data.data)
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
global.ConcreteServerEvents = ConcreteServerEvents
|