@concretecms/bedrock 1.4.11 → 1.4.12
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/AddScheduledBoardElementButton.vue +31 -0
- package/assets/cms/components/AddScheduledBoardElementModal.vue +224 -0
- package/assets/cms/js/file-manager/file-manager.js +2 -2
- package/assets/social/scss/frontend/_share-this-page.scss +6 -0
- package/assets/social/scss/frontend/_social-links.scss +6 -0
- package/package.json +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button class="btn btn-primary float-end"
|
|
3
|
+
type="button"
|
|
4
|
+
:disabled="disabled"
|
|
5
|
+
data-bs-toggle="modal" :data-bs-target="modalTarget">{{buttonText}}</button>
|
|
6
|
+
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script>
|
|
10
|
+
export default {
|
|
11
|
+
props: {
|
|
12
|
+
disabled: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: false
|
|
15
|
+
},
|
|
16
|
+
buttonText: {
|
|
17
|
+
type: String,
|
|
18
|
+
required: true
|
|
19
|
+
},
|
|
20
|
+
modalTarget: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: '#modal-add-scheduled-board-element'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
data: () => ({}),
|
|
26
|
+
methods: {},
|
|
27
|
+
mounted() {
|
|
28
|
+
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="modal fade" tabindex="-1" role="dialog" id="modal-add-scheduled-board-element">
|
|
3
|
+
<div class="modal-dialog modal-dialog-centered">
|
|
4
|
+
<div class="modal-content">
|
|
5
|
+
<form @submit.prevent="submit">
|
|
6
|
+
<div class="modal-header">
|
|
7
|
+
<h5 class="modal-title">Add Scheduled Board Content</h5>
|
|
8
|
+
<button type="button" class="btn-close btn-close-white" data-bs-dismiss="modal"
|
|
9
|
+
aria-label="Close"></button>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="modal-body">
|
|
12
|
+
<div class="mb-3">
|
|
13
|
+
<label class="control-label form-label" for="element">Element</label>
|
|
14
|
+
<select :class='{"form-control": true, "is-invalid": invalidSelectedElement}' id="element"
|
|
15
|
+
v-model="scheduleBoardSelectedElement">
|
|
16
|
+
<option value="0">** Choose Element</option>
|
|
17
|
+
<option v-for="element in elements" :value="element.id">{{ element.name }}</option>
|
|
18
|
+
</select>
|
|
19
|
+
</div>
|
|
20
|
+
<div class="mb-3">
|
|
21
|
+
<label class="form-label">From</label>
|
|
22
|
+
<div class="row mb-3">
|
|
23
|
+
<div class="col-6">
|
|
24
|
+
<input type="date" v-model="startDate"
|
|
25
|
+
:class="{'form-control': true, 'is-invalid': invalidStartDate}">
|
|
26
|
+
</div>
|
|
27
|
+
<div class="col-6">
|
|
28
|
+
<input type="time" class="form-control" v-model="startTime">
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
<div class="mb-3">
|
|
33
|
+
<label class="form-label">To</label>
|
|
34
|
+
<div class="row">
|
|
35
|
+
<div class="col-6">
|
|
36
|
+
<input type="date" v-model="endDate"
|
|
37
|
+
:class="{'form-control': true, 'is-invalid': invalidEndDate}">
|
|
38
|
+
</div>
|
|
39
|
+
<div class="col-6">
|
|
40
|
+
<input type="time" class="form-control" v-model="endTime">
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="mb-3">
|
|
45
|
+
<div class="row">
|
|
46
|
+
<div class="col-6">
|
|
47
|
+
<label for="timezone" class="form-label">Time Zone</label>
|
|
48
|
+
<select class="form-select" v-model="scheduleBoardTimezone" id="timezone">
|
|
49
|
+
<option v-for="(timezone, timezoneID) in timezones" :value="timezoneID">
|
|
50
|
+
{{ timezone }}
|
|
51
|
+
</option>
|
|
52
|
+
</select>
|
|
53
|
+
</div>
|
|
54
|
+
<div class="col-6">
|
|
55
|
+
<label class="control-label form-label" for="chooseSlot">Slot</label>
|
|
56
|
+
<select class="form-select" id="chooseSlot" v-model="scheduleBoardBoardSlot">
|
|
57
|
+
<option v-for="currentSlot in totalSlots" :value="currentSlot">
|
|
58
|
+
{{ currentSlot }}
|
|
59
|
+
</option>
|
|
60
|
+
</select>
|
|
61
|
+
</div>
|
|
62
|
+
</div>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="mb-3">
|
|
65
|
+
<label class="form-label">Curation</label>
|
|
66
|
+
<div class="form-check">
|
|
67
|
+
<input class="form-check-input" id="lockType1" type="radio" v-model="lockType"
|
|
68
|
+
value="L">
|
|
69
|
+
<label class="form-check-label" for="lockType1">
|
|
70
|
+
Lock stripe – only admins can change.
|
|
71
|
+
</label>
|
|
72
|
+
</div>
|
|
73
|
+
<div class="form-check">
|
|
74
|
+
<input class="form-check-input" type="radio" id="lockType2" v-model="lockType"
|
|
75
|
+
value="U">
|
|
76
|
+
<label class="form-check-label" for="lockType2">
|
|
77
|
+
Share stripe – editors can remove.
|
|
78
|
+
</label>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="modal-footer">
|
|
83
|
+
<button type="button" class="btn btn-secondary me-auto" data-bs-dismiss="modal">Cancel</button>
|
|
84
|
+
<button type="submit" class="btn btn-primary">{{ submitButtonText }}</button>
|
|
85
|
+
</div>
|
|
86
|
+
</form>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
|
|
91
|
+
</template>
|
|
92
|
+
|
|
93
|
+
<script>
|
|
94
|
+
/* eslint-disable no-new */
|
|
95
|
+
/* global moment */
|
|
96
|
+
export default {
|
|
97
|
+
props: {
|
|
98
|
+
scheduleBoardElementAction: {
|
|
99
|
+
type: String,
|
|
100
|
+
required: true
|
|
101
|
+
},
|
|
102
|
+
selectedInstanceIds: {
|
|
103
|
+
type: Array,
|
|
104
|
+
required: false,
|
|
105
|
+
value: function() {
|
|
106
|
+
return []
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
scheduleBoardElementToken: {
|
|
110
|
+
type: String,
|
|
111
|
+
required: true
|
|
112
|
+
},
|
|
113
|
+
totalSlots: {
|
|
114
|
+
type: Number,
|
|
115
|
+
required: false,
|
|
116
|
+
default: 1
|
|
117
|
+
},
|
|
118
|
+
boardSlot: {
|
|
119
|
+
type: Number,
|
|
120
|
+
required: false,
|
|
121
|
+
default: 1
|
|
122
|
+
},
|
|
123
|
+
timezone: {
|
|
124
|
+
type: String,
|
|
125
|
+
required: true
|
|
126
|
+
},
|
|
127
|
+
timezones: {
|
|
128
|
+
type: Object,
|
|
129
|
+
required: true
|
|
130
|
+
},
|
|
131
|
+
selectedElement: {
|
|
132
|
+
type: Number,
|
|
133
|
+
required: false,
|
|
134
|
+
default: null
|
|
135
|
+
},
|
|
136
|
+
elements: {
|
|
137
|
+
type: Array,
|
|
138
|
+
required: true
|
|
139
|
+
},
|
|
140
|
+
submitButtonText: {
|
|
141
|
+
type: String,
|
|
142
|
+
required: false,
|
|
143
|
+
default: 'Publish'
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
data: () => ({
|
|
147
|
+
scheduleBoardSelectedElement: '',
|
|
148
|
+
invalidSelectedElement: false,
|
|
149
|
+
invalidStartDate: false,
|
|
150
|
+
invalidEndDate: false,
|
|
151
|
+
startDate: '',
|
|
152
|
+
endDate: '',
|
|
153
|
+
startTime: '00:00',
|
|
154
|
+
endTime: '23:59',
|
|
155
|
+
scheduleBoardTimezone: '',
|
|
156
|
+
scheduleBoardBoardSlot: 0,
|
|
157
|
+
lockType: 'L'
|
|
158
|
+
}),
|
|
159
|
+
methods: {
|
|
160
|
+
submit() {
|
|
161
|
+
const my = this
|
|
162
|
+
let valid = true
|
|
163
|
+
if (!this.startDateFormatted) {
|
|
164
|
+
this.invalidStartDate = true
|
|
165
|
+
} else {
|
|
166
|
+
this.invalidStartDate = false
|
|
167
|
+
}
|
|
168
|
+
if (!this.endDateFormatted) {
|
|
169
|
+
this.invalidEndDate = true
|
|
170
|
+
} else {
|
|
171
|
+
this.invalidEndDate = false
|
|
172
|
+
}
|
|
173
|
+
if (this.scheduleBoardSelectedElement < 1) {
|
|
174
|
+
this.invalidSelectedElement = true
|
|
175
|
+
} else {
|
|
176
|
+
this.invalidSelectedElement = false
|
|
177
|
+
}
|
|
178
|
+
if (this.invalidStartDate || this.invalidEndDate || this.invalidSelectedElement) {
|
|
179
|
+
valid = false
|
|
180
|
+
}
|
|
181
|
+
if (valid) {
|
|
182
|
+
new ConcreteAjaxRequest({
|
|
183
|
+
url: my.scheduleBoardElementAction,
|
|
184
|
+
method: 'POST',
|
|
185
|
+
data: {
|
|
186
|
+
ccm_token: my.scheduleBoardElementToken,
|
|
187
|
+
elementId: this.scheduleBoardSelectedElement,
|
|
188
|
+
slot: this.scheduleBoardBoardSlot,
|
|
189
|
+
startDate: this.startDateFormatted,
|
|
190
|
+
endDate: this.endDateFormatted,
|
|
191
|
+
startTime: this.startTime,
|
|
192
|
+
endTime: this.endTime,
|
|
193
|
+
lockType: this.lockType,
|
|
194
|
+
timezone: this.timezone,
|
|
195
|
+
instances: this.selectedInstanceIds
|
|
196
|
+
},
|
|
197
|
+
success: function (r) {
|
|
198
|
+
window.location.reload()
|
|
199
|
+
}
|
|
200
|
+
})
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
computed: {
|
|
205
|
+
startDateFormatted() {
|
|
206
|
+
if (this.startDate) {
|
|
207
|
+
return moment(this.startDate).format('YYYY-MM-DD')
|
|
208
|
+
}
|
|
209
|
+
return null
|
|
210
|
+
},
|
|
211
|
+
endDateFormatted() {
|
|
212
|
+
if (this.endDate) {
|
|
213
|
+
return moment(this.endDate).format('YYYY-MM-DD')
|
|
214
|
+
}
|
|
215
|
+
return null
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
mounted() {
|
|
219
|
+
this.scheduleBoardSelectedElement = this.selectedElement
|
|
220
|
+
this.scheduleBoardTimezone = this.timezone
|
|
221
|
+
this.scheduleBoardBoardSlot = this.boardSlot
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
</script>
|
|
@@ -28,8 +28,8 @@ class ConcreteFileManager {
|
|
|
28
28
|
data: data,
|
|
29
29
|
title: ccmi18n_filemanager.chooseFile,
|
|
30
30
|
onOpen: function(dialog) {
|
|
31
|
-
ConcreteEvent.unsubscribe('FileManagerSelectFile')
|
|
32
|
-
ConcreteEvent.subscribe('FileManagerSelectFile', function(e, r) {
|
|
31
|
+
ConcreteEvent.unsubscribe('FileManagerSelectFile.core')
|
|
32
|
+
ConcreteEvent.subscribe('FileManagerSelectFile.core', function(e, r) {
|
|
33
33
|
var response = r || {}
|
|
34
34
|
if (!options.multipleSelection) {
|
|
35
35
|
response.fID = r.fID[0]
|
package/package.json
CHANGED