@windward/core 0.2.2 → 0.3.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.
- package/babel.config.js +1 -1
- package/components/Content/Blocks/Image.vue +1 -1
- package/components/Content/Blocks/UserUpload/ManageDataTableUserFiles.vue +1 -1
- package/components/Content/Blocks/UserUpload.vue +1 -1
- package/components/Navigation/Items/AskTheExpert.vue +2 -1
- package/components/Navigation/Items/CourseGlossaryToolNav.vue +2 -1
- package/components/Settings/AccordionSettings.vue +11 -4
- package/components/Settings/BlockQuoteSettings.vue +9 -1
- package/components/Settings/ClickableIconsSettings.vue +20 -6
- package/components/Settings/EmailSettings.vue +13 -4
- package/components/Settings/FeedbackSettings.vue +2 -1
- package/components/Settings/HorizontalRuleSettings.vue +2 -1
- package/components/Settings/ImageSettings.vue +7 -1
- package/components/Settings/MathSettings.vue +6 -5
- package/components/Settings/OpenResponseCollateSettings.vue +5 -1
- package/components/Settings/OpenResponseSettings.vue +8 -2
- package/components/Settings/ScenarioChoiceSettings.vue +15 -4
- package/components/Settings/TabSettings.vue +12 -4
- package/components/Settings/TextEditorSettings.vue +14 -7
- package/components/Settings/UserUploadSettings.vue +11 -4
- package/components/Settings/VideoSettings.vue +28 -10
- package/components/utils/TinyMCEWrapper.vue +37 -4
- package/components/utils/glossary/CourseGlossary.vue +3 -2
- package/components/utils/glossary/CourseGlossaryForm.vue +1 -1
- package/i18n/en-US/components/content/blocks/image.ts +1 -1
- package/i18n/es-ES/components/content/blocks/image.ts +1 -1
- package/i18n/sv-SE/components/content/blocks/image.ts +1 -1
- package/package.json +1 -1
- package/test/__mocks__/componentsMock.js +57 -97
- package/test/__mocks__/contentBlockMock.js +1 -1
- package/test/__mocks__/contentSettingsMock.js +2 -1
- package/test/__mocks__/helpersMock.js +9 -0
- package/test/__mocks__/modelMock.js +101 -31
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
'windward.core.components.settings.scenario_choice.title'
|
|
11
11
|
)
|
|
12
12
|
"
|
|
13
|
+
:disabled="render"
|
|
13
14
|
></v-text-field>
|
|
14
15
|
<v-text-field
|
|
15
16
|
v-model="block.metadata.config.description"
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
'windward.core.components.settings.scenario_choice.description'
|
|
20
21
|
)
|
|
21
22
|
"
|
|
23
|
+
:disabled="render"
|
|
22
24
|
></v-text-field>
|
|
23
25
|
<v-select
|
|
24
26
|
v-model="block.metadata.config.display_style"
|
|
@@ -28,6 +30,7 @@
|
|
|
28
30
|
'windward.core.components.settings.scenario_choice.display_style'
|
|
29
31
|
)
|
|
30
32
|
"
|
|
33
|
+
:disabled="render"
|
|
31
34
|
></v-select>
|
|
32
35
|
<v-switch
|
|
33
36
|
v-model="isLinked"
|
|
@@ -36,6 +39,7 @@
|
|
|
36
39
|
'windward.core.components.settings.scenario_choice.is_linked'
|
|
37
40
|
)
|
|
38
41
|
"
|
|
42
|
+
:disabled="render"
|
|
39
43
|
@click="onClickLinkSwitch"
|
|
40
44
|
></v-switch>
|
|
41
45
|
|
|
@@ -46,11 +50,13 @@
|
|
|
46
50
|
'windward.core.components.settings.scenario_choice.show_reset'
|
|
47
51
|
)
|
|
48
52
|
"
|
|
53
|
+
:disabled="render"
|
|
49
54
|
></v-switch>
|
|
50
55
|
</v-col>
|
|
51
56
|
<v-col class="pa-0">
|
|
52
57
|
<SortableExpansionPanel
|
|
53
58
|
v-model="block.metadata.config.items"
|
|
59
|
+
:disabled="render"
|
|
54
60
|
@click:close="onRemoveElement"
|
|
55
61
|
>
|
|
56
62
|
<template #header="{ item }">
|
|
@@ -75,6 +81,7 @@
|
|
|
75
81
|
'windward.core.components.settings.scenario_choice.item_title'
|
|
76
82
|
)
|
|
77
83
|
"
|
|
84
|
+
:disabled="render"
|
|
78
85
|
></v-text-field>
|
|
79
86
|
|
|
80
87
|
<v-switch
|
|
@@ -86,6 +93,7 @@
|
|
|
86
93
|
'windward.core.components.settings.scenario_choice.correct_choice'
|
|
87
94
|
)
|
|
88
95
|
"
|
|
96
|
+
:disabled="render"
|
|
89
97
|
></v-switch>
|
|
90
98
|
|
|
91
99
|
<span>{{
|
|
@@ -98,6 +106,7 @@
|
|
|
98
106
|
block.metadata.config.items[index].body
|
|
99
107
|
"
|
|
100
108
|
:height="200"
|
|
109
|
+
:disabled="render"
|
|
101
110
|
></TextEditor>
|
|
102
111
|
</v-container>
|
|
103
112
|
</template>
|
|
@@ -106,7 +115,9 @@
|
|
|
106
115
|
<v-row justify="center" class="my-4">
|
|
107
116
|
<v-btn
|
|
108
117
|
color="primary"
|
|
109
|
-
:disabled="
|
|
118
|
+
:disabled="
|
|
119
|
+
render || block.metadata.config.items.length > 26
|
|
120
|
+
"
|
|
110
121
|
@click="onAddElement"
|
|
111
122
|
>
|
|
112
123
|
<v-icon>mdi-plus</v-icon>
|
|
@@ -184,10 +195,10 @@
|
|
|
184
195
|
<script>
|
|
185
196
|
import _ from 'lodash'
|
|
186
197
|
import { mapGetters } from 'vuex'
|
|
187
|
-
import BaseContentSettings from '~/components/Content/
|
|
198
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
188
199
|
import TextEditor from '~/components/Text/TextEditor'
|
|
189
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
190
|
-
import DialogBox from '~/components/DialogBox.vue'
|
|
200
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
201
|
+
import DialogBox from '~/components/Core/DialogBox.vue'
|
|
191
202
|
|
|
192
203
|
export default {
|
|
193
204
|
name: 'ScenarioChoiceSettings',
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
<SortableExpansionPanel
|
|
7
7
|
v-model="block.metadata.config.items"
|
|
8
8
|
v-bind:currentPanel.sync="block.metadata.config.currentTab"
|
|
9
|
+
:disabled="render"
|
|
9
10
|
@change="onDragged"
|
|
10
11
|
@click:close="onRemoveElement($event)"
|
|
11
12
|
>
|
|
@@ -28,8 +29,14 @@
|
|
|
28
29
|
block.metadata.config.items[index].tabHeader
|
|
29
30
|
"
|
|
30
31
|
:placeholder="'item ' + (index + 1)"
|
|
32
|
+
:disabled="render"
|
|
31
33
|
></v-text-field>
|
|
32
|
-
<v-btn
|
|
34
|
+
<v-btn
|
|
35
|
+
@click="onToggleExpand(index)"
|
|
36
|
+
text
|
|
37
|
+
class="mb-3"
|
|
38
|
+
:disabled="render"
|
|
39
|
+
>
|
|
33
40
|
<v-icon
|
|
34
41
|
v-if="
|
|
35
42
|
!block.metadata.config.items[index].expand
|
|
@@ -48,12 +55,13 @@
|
|
|
48
55
|
v-model="block.metadata.config.items[index].content"
|
|
49
56
|
v-if="!item.expand"
|
|
50
57
|
:key="textEditorUpdateKey"
|
|
58
|
+
:disabled="render"
|
|
51
59
|
></TextEditor>
|
|
52
60
|
</v-container>
|
|
53
61
|
</template>
|
|
54
62
|
</SortableExpansionPanel>
|
|
55
63
|
<v-row justify="center" class="my-4">
|
|
56
|
-
<v-btn color="primary" @click="onAddElement">
|
|
64
|
+
<v-btn color="primary" :disabled="render" @click="onAddElement">
|
|
57
65
|
<v-icon>mdi-plus</v-icon>
|
|
58
66
|
{{ $t('windward.core.components.settings.tab.add_tab') }}
|
|
59
67
|
</v-btn>
|
|
@@ -74,8 +82,8 @@
|
|
|
74
82
|
import _, { get } from 'lodash'
|
|
75
83
|
import Crypto from '~/helpers/Crypto'
|
|
76
84
|
import TextEditor from '~/components/Text/TextEditor'
|
|
77
|
-
import BaseContentSettings from '~/components/Content/
|
|
78
|
-
import SortableExpansionPanel from '~/components/SortableExpansionPanel.vue'
|
|
85
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
86
|
+
import SortableExpansionPanel from '~/components/Core/SortableExpansionPanel.vue'
|
|
79
87
|
|
|
80
88
|
export default {
|
|
81
89
|
name: 'TabSettings',
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<v-btn-toggle v-model="settingSelector" multiple borderless>
|
|
6
6
|
<v-tooltip top>
|
|
7
7
|
<template #activator="{ on, attrs }">
|
|
8
|
-
<v-btn v-bind="attrs" v-on="on" text>
|
|
8
|
+
<v-btn v-bind="attrs" v-on="on" text :disabled="render">
|
|
9
9
|
<v-icon>mdi-comment-text-multiple</v-icon>
|
|
10
10
|
{{
|
|
11
11
|
$t(
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
|
|
26
26
|
<v-tooltip top>
|
|
27
27
|
<template #activator="{ on, attrs }">
|
|
28
|
-
<v-btn v-bind="attrs" v-on="on" text>
|
|
28
|
+
<v-btn v-bind="attrs" v-on="on" text :disabled="render">
|
|
29
29
|
<v-icon> mdi-text-long</v-icon>
|
|
30
30
|
{{
|
|
31
31
|
$t(
|
|
@@ -48,11 +48,12 @@
|
|
|
48
48
|
<v-btn
|
|
49
49
|
v-bind="attrs"
|
|
50
50
|
v-on="on"
|
|
51
|
+
text
|
|
52
|
+
:disabled="render"
|
|
51
53
|
@click="
|
|
52
54
|
block.metadata.config.expand =
|
|
53
55
|
!block.metadata.config.expand
|
|
54
56
|
"
|
|
55
|
-
text
|
|
56
57
|
>
|
|
57
58
|
<v-icon
|
|
58
59
|
v-if="!block.metadata.config.expand"
|
|
@@ -96,6 +97,7 @@
|
|
|
96
97
|
close
|
|
97
98
|
color="success"
|
|
98
99
|
close-icon="mdi-pencil"
|
|
100
|
+
:disabled="render"
|
|
99
101
|
@click:close="editTerm(verified)"
|
|
100
102
|
>
|
|
101
103
|
{{ verified.term }}
|
|
@@ -118,6 +120,7 @@
|
|
|
118
120
|
close
|
|
119
121
|
color="error"
|
|
120
122
|
close-icon="mdi-content-save-plus-outline"
|
|
123
|
+
:disabled="render"
|
|
121
124
|
@click:close="addGlossaryTerm(unVerified)"
|
|
122
125
|
>
|
|
123
126
|
{{ unVerified.term }}
|
|
@@ -140,11 +143,12 @@
|
|
|
140
143
|
>
|
|
141
144
|
</div>
|
|
142
145
|
<br />
|
|
143
|
-
<
|
|
144
|
-
v-model="block.body"
|
|
146
|
+
<TextEditor
|
|
145
147
|
v-if="settingSelector.includes(1) && !block.metadata.config.expand"
|
|
148
|
+
v-model="block.body"
|
|
146
149
|
autofill
|
|
147
|
-
|
|
150
|
+
:disabled="render"
|
|
151
|
+
></TextEditor>
|
|
148
152
|
<v-skeleton-loader
|
|
149
153
|
v-bind="attrs"
|
|
150
154
|
type=" table-row-divider, list-item, divider, list-item, divider, image,image"
|
|
@@ -156,6 +160,7 @@
|
|
|
156
160
|
max-width="600px"
|
|
157
161
|
action-save
|
|
158
162
|
:trigger="false"
|
|
163
|
+
:disabled="render"
|
|
159
164
|
@click:save="save"
|
|
160
165
|
@click:outside="close"
|
|
161
166
|
@click:close="close"
|
|
@@ -177,15 +182,17 @@
|
|
|
177
182
|
|
|
178
183
|
<script>
|
|
179
184
|
import { mapGetters, mapMutations } from 'vuex'
|
|
185
|
+
import DialogBox from '~/components/Core/DialogBox.vue'
|
|
180
186
|
import GlossaryHelper from '../../helpers/GlossaryHelper'
|
|
181
187
|
import Course from '~/models/Course'
|
|
182
|
-
import BaseContentSettings from '~/components/Content/
|
|
188
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
183
189
|
import TextEditor from '~/components/Text/TextEditor'
|
|
184
190
|
import CourseGlossaryForm from '../utils/glossary/CourseGlossaryForm.vue'
|
|
185
191
|
export default {
|
|
186
192
|
name: 'TextEditorSettings',
|
|
187
193
|
extends: BaseContentSettings,
|
|
188
194
|
components: {
|
|
195
|
+
DialogBox,
|
|
189
196
|
TextEditor,
|
|
190
197
|
CourseGlossaryForm,
|
|
191
198
|
},
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
'windward.core.components.settings.user_upload.accept_multiple'
|
|
8
8
|
)
|
|
9
9
|
"
|
|
10
|
+
:disabled="render"
|
|
10
11
|
></v-switch>
|
|
11
12
|
<v-select
|
|
12
13
|
v-model="block.metadata.config.uploadSettings.accept"
|
|
@@ -19,8 +20,9 @@
|
|
|
19
20
|
:label="
|
|
20
21
|
$t('windward.core.components.settings.user_upload.accept_types')
|
|
21
22
|
"
|
|
23
|
+
:disabled="render"
|
|
22
24
|
></v-select>
|
|
23
|
-
<v-btn
|
|
25
|
+
<v-btn text class="mt-4" :disabled="render" @click="onToggleExpand()">
|
|
24
26
|
<v-icon v-if="!block.metadata.config.expand" color="primary"
|
|
25
27
|
>mdi-arrow-expand-all</v-icon
|
|
26
28
|
>
|
|
@@ -37,7 +39,10 @@
|
|
|
37
39
|
)
|
|
38
40
|
}}
|
|
39
41
|
</h4>
|
|
40
|
-
<TextEditor
|
|
42
|
+
<TextEditor
|
|
43
|
+
v-model="block.metadata.config.instructions"
|
|
44
|
+
:disabled="render"
|
|
45
|
+
/>
|
|
41
46
|
</v-col>
|
|
42
47
|
</v-row>
|
|
43
48
|
<v-skeleton-loader
|
|
@@ -48,7 +53,7 @@
|
|
|
48
53
|
</div>
|
|
49
54
|
</template>
|
|
50
55
|
<script>
|
|
51
|
-
import BaseContentSettings from '~/components/Content/
|
|
56
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
52
57
|
import Crypto from '~/helpers/Crypto'
|
|
53
58
|
import TextEditor from '~/components/Text/TextEditor'
|
|
54
59
|
import _ from 'lodash'
|
|
@@ -62,7 +67,9 @@ export default {
|
|
|
62
67
|
this.block = {}
|
|
63
68
|
}
|
|
64
69
|
if (_.isEmpty(this.block.body)) {
|
|
65
|
-
this.block.body = this.$t(
|
|
70
|
+
this.block.body = this.$t(
|
|
71
|
+
'windward.core.shared.content_blocks.title.user_upload'
|
|
72
|
+
)
|
|
66
73
|
}
|
|
67
74
|
if (_.isEmpty(this.block.metadata)) {
|
|
68
75
|
this.block.metadata = {}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
<v-text-field
|
|
6
6
|
v-model="block.metadata.config.title"
|
|
7
7
|
:label="$t('windward.core.components.settings.video.title')"
|
|
8
|
+
:disabled="render"
|
|
8
9
|
></v-text-field>
|
|
9
10
|
<h4 class="mb-3">
|
|
10
11
|
{{ $t('windward.core.components.settings.video.sources') }}
|
|
@@ -45,9 +46,10 @@
|
|
|
45
46
|
<ContentBlockAsset
|
|
46
47
|
v-model="media.source"
|
|
47
48
|
mimes="video/mp4,audio/mpeg,video/webm"
|
|
48
|
-
@click:file="onSourceSelect"
|
|
49
49
|
allow-url
|
|
50
50
|
class="mb-4"
|
|
51
|
+
:disabled="render"
|
|
52
|
+
@click:file="onSourceSelect"
|
|
51
53
|
>
|
|
52
54
|
<template #title>
|
|
53
55
|
{{
|
|
@@ -68,9 +70,10 @@
|
|
|
68
70
|
<ContentBlockAsset
|
|
69
71
|
v-model="media.track"
|
|
70
72
|
mimes="text/vtt,text/xml"
|
|
71
|
-
@click:file="onTrackSelect"
|
|
72
73
|
allow-url
|
|
73
74
|
class="mb-4"
|
|
75
|
+
:disabled="render"
|
|
76
|
+
@click:file="onTrackSelect"
|
|
74
77
|
>
|
|
75
78
|
<template #title>
|
|
76
79
|
{{
|
|
@@ -93,8 +96,9 @@
|
|
|
93
96
|
<ContentBlockAsset
|
|
94
97
|
v-model="media.poster"
|
|
95
98
|
mimes="image/png,image/jpeg"
|
|
96
|
-
@click:file="onPosterSelect"
|
|
97
99
|
allow-url
|
|
100
|
+
:disabled="render"
|
|
101
|
+
@click:file="onPosterSelect"
|
|
98
102
|
>
|
|
99
103
|
<template #title>
|
|
100
104
|
{{
|
|
@@ -117,9 +121,10 @@
|
|
|
117
121
|
<ContentBlockAsset
|
|
118
122
|
v-model="media.ads.preroll.source"
|
|
119
123
|
mimes="video/mp4,video/webm"
|
|
120
|
-
@click:file="onAdSourceSelect($event, 0)"
|
|
121
124
|
allow-url
|
|
122
125
|
class="mb-4"
|
|
126
|
+
:disabled="render"
|
|
127
|
+
@click:file="onAdSourceSelect($event, 0)"
|
|
123
128
|
>
|
|
124
129
|
<template #title>
|
|
125
130
|
{{
|
|
@@ -140,8 +145,9 @@
|
|
|
140
145
|
<ContentBlockAsset
|
|
141
146
|
v-model="media.ads.preroll.track"
|
|
142
147
|
mimes="text/vtt,text/xml"
|
|
143
|
-
@click:file="onAdTrackSelect($event, 0)"
|
|
144
148
|
allow-url
|
|
149
|
+
:disabled="render"
|
|
150
|
+
@click:file="onAdTrackSelect($event, 0)"
|
|
145
151
|
>
|
|
146
152
|
<template #title>
|
|
147
153
|
{{
|
|
@@ -164,9 +170,10 @@
|
|
|
164
170
|
<ContentBlockAsset
|
|
165
171
|
v-model="media.ads.postroll.source"
|
|
166
172
|
mimes="video/mp4,video/webm"
|
|
167
|
-
@click:file="onAdSourceSelect($event, 100)"
|
|
168
173
|
allow-url
|
|
169
174
|
class="mb-4"
|
|
175
|
+
:disabled="render"
|
|
176
|
+
@click:file="onAdSourceSelect($event, 100)"
|
|
170
177
|
>
|
|
171
178
|
<template #title>
|
|
172
179
|
{{
|
|
@@ -187,8 +194,9 @@
|
|
|
187
194
|
<ContentBlockAsset
|
|
188
195
|
v-model="media.ads.postroll.track"
|
|
189
196
|
mimes="text/vtt,text/xml"
|
|
190
|
-
@click:file="onAdTrackSelect($event, 100)"
|
|
191
197
|
allow-url
|
|
198
|
+
:disabled="render"
|
|
199
|
+
@click:file="onAdTrackSelect($event, 100)"
|
|
192
200
|
>
|
|
193
201
|
<template #title>
|
|
194
202
|
{{
|
|
@@ -239,6 +247,7 @@
|
|
|
239
247
|
)
|
|
240
248
|
"
|
|
241
249
|
:disabled="
|
|
250
|
+
render ||
|
|
242
251
|
!block.metadata.config.playlist[playlistIndex]
|
|
243
252
|
.sources ||
|
|
244
253
|
!block.metadata.config.playlist[playlistIndex]
|
|
@@ -260,6 +269,7 @@
|
|
|
260
269
|
text
|
|
261
270
|
color="error"
|
|
262
271
|
:disabled="
|
|
272
|
+
render ||
|
|
263
273
|
block.metadata.config.playlist.length <= 1
|
|
264
274
|
"
|
|
265
275
|
@click="onRemovePlaylistItem"
|
|
@@ -288,6 +298,7 @@
|
|
|
288
298
|
v-on="on"
|
|
289
299
|
color="primary"
|
|
290
300
|
text
|
|
301
|
+
:disabled="render"
|
|
291
302
|
@click="onAddPlaylistItem"
|
|
292
303
|
>
|
|
293
304
|
<v-icon>mdi-plus</v-icon>
|
|
@@ -330,6 +341,7 @@
|
|
|
330
341
|
)
|
|
331
342
|
"
|
|
332
343
|
multiple
|
|
344
|
+
:disabled="render"
|
|
333
345
|
@change="onPlaybackChange"
|
|
334
346
|
>
|
|
335
347
|
<template #selection="{ item }">
|
|
@@ -350,6 +362,7 @@
|
|
|
350
362
|
'windward.core.components.content.blocks.video.video.controls'
|
|
351
363
|
)
|
|
352
364
|
"
|
|
365
|
+
:disabled="render"
|
|
353
366
|
></v-switch>
|
|
354
367
|
<v-switch
|
|
355
368
|
v-model="
|
|
@@ -360,6 +373,7 @@
|
|
|
360
373
|
'windward.core.components.content.blocks.video.video.rewind'
|
|
361
374
|
)
|
|
362
375
|
"
|
|
376
|
+
:disabled="render"
|
|
363
377
|
></v-switch>
|
|
364
378
|
<v-switch
|
|
365
379
|
v-model="
|
|
@@ -371,6 +385,7 @@
|
|
|
371
385
|
'windward.core.components.content.blocks.video.video.captionsmenu'
|
|
372
386
|
)
|
|
373
387
|
"
|
|
388
|
+
:disabled="render"
|
|
374
389
|
></v-switch>
|
|
375
390
|
<v-switch
|
|
376
391
|
v-model="
|
|
@@ -382,6 +397,7 @@
|
|
|
382
397
|
'windward.core.components.content.blocks.video.video.disablepictureinpicture'
|
|
383
398
|
)
|
|
384
399
|
"
|
|
400
|
+
:disabled="render"
|
|
385
401
|
></v-switch>
|
|
386
402
|
<!--
|
|
387
403
|
<v-switch
|
|
@@ -404,6 +420,7 @@
|
|
|
404
420
|
'windward.core.components.content.blocks.video.video.muted'
|
|
405
421
|
)
|
|
406
422
|
"
|
|
423
|
+
:disabled="render"
|
|
407
424
|
></v-switch>
|
|
408
425
|
<v-switch
|
|
409
426
|
v-model="
|
|
@@ -414,6 +431,7 @@
|
|
|
414
431
|
'windward.core.components.content.blocks.video.video.loop'
|
|
415
432
|
)
|
|
416
433
|
"
|
|
434
|
+
:disabled="render"
|
|
417
435
|
></v-switch>
|
|
418
436
|
<v-switch
|
|
419
437
|
v-model="
|
|
@@ -425,6 +443,7 @@
|
|
|
425
443
|
'windward.core.components.content.blocks.video.video.playsinline'
|
|
426
444
|
)
|
|
427
445
|
"
|
|
446
|
+
:disabled="render"
|
|
428
447
|
></v-switch>
|
|
429
448
|
</v-col>
|
|
430
449
|
</v-row>
|
|
@@ -435,8 +454,7 @@
|
|
|
435
454
|
</div>
|
|
436
455
|
</template>
|
|
437
456
|
<script>
|
|
438
|
-
import BaseContentSettings from '~/components/Content/
|
|
439
|
-
import Vue from 'vue'
|
|
457
|
+
import BaseContentSettings from '~/components/Content/Settings/BaseContentSettings.js'
|
|
440
458
|
|
|
441
459
|
export default {
|
|
442
460
|
name: 'VideoSettings',
|
|
@@ -553,7 +571,7 @@ export default {
|
|
|
553
571
|
]
|
|
554
572
|
)
|
|
555
573
|
) {
|
|
556
|
-
|
|
574
|
+
this.$set(
|
|
557
575
|
this.block.metadata.config.playlist[this.playlistIndex].ads,
|
|
558
576
|
adIndex,
|
|
559
577
|
{ sources: [], tracks: [] }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div
|
|
2
|
+
<div :class="'tinymce-included-' + seed">
|
|
3
|
+
<div>
|
|
4
4
|
<editor
|
|
5
5
|
:key="seed + config.skin"
|
|
6
6
|
v-model="text"
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
@onfocus="onEditorFocus"
|
|
13
13
|
v-click-outside="{
|
|
14
14
|
handler: onClickOutside,
|
|
15
|
+
closeConditional,
|
|
15
16
|
include,
|
|
16
17
|
}"
|
|
17
18
|
>
|
|
@@ -99,7 +100,7 @@ export default {
|
|
|
99
100
|
},
|
|
100
101
|
filteredHeight() {
|
|
101
102
|
if (!this.render) {
|
|
102
|
-
return
|
|
103
|
+
return 100
|
|
103
104
|
} else if (this.height !== null) {
|
|
104
105
|
return this.height
|
|
105
106
|
} else {
|
|
@@ -305,6 +306,15 @@ export default {
|
|
|
305
306
|
importcss_append: true,
|
|
306
307
|
}
|
|
307
308
|
},
|
|
309
|
+
|
|
310
|
+
elementBody() {
|
|
311
|
+
const ele = document.querySelector('.tinymce-included-' + this.seed)
|
|
312
|
+
|
|
313
|
+
if (ele) {
|
|
314
|
+
return [ele]
|
|
315
|
+
}
|
|
316
|
+
return []
|
|
317
|
+
},
|
|
308
318
|
},
|
|
309
319
|
methods: {
|
|
310
320
|
onEditorFocus() {
|
|
@@ -321,7 +331,30 @@ export default {
|
|
|
321
331
|
},
|
|
322
332
|
include() {
|
|
323
333
|
// vuetify function to include an element with this class into clickable area without close
|
|
324
|
-
return
|
|
334
|
+
return this.elementBody
|
|
335
|
+
},
|
|
336
|
+
|
|
337
|
+
closeConditional(e) {
|
|
338
|
+
const targetClass = e.target.className
|
|
339
|
+
let parentNode
|
|
340
|
+
//check if target is svg element
|
|
341
|
+
if (e.target.matches('svg') || e.target instanceof SVGElement) {
|
|
342
|
+
parentNode = e.target.parentNode.parentNode
|
|
343
|
+
} else {
|
|
344
|
+
parentNode = e.target.parentNode
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
if (
|
|
348
|
+
parentNode.closest('.tinymce-included-' + this.seed) ||
|
|
349
|
+
_.includes(targetClass, 'tinymce-included-' + this.seed) ||
|
|
350
|
+
_.includes(targetClass, 'tox') ||
|
|
351
|
+
_.includes(parentNode.className, 'tox')
|
|
352
|
+
) {
|
|
353
|
+
return false
|
|
354
|
+
} else {
|
|
355
|
+
this.onClickOutside()
|
|
356
|
+
return true
|
|
357
|
+
}
|
|
325
358
|
},
|
|
326
359
|
},
|
|
327
360
|
}
|
|
@@ -145,14 +145,15 @@
|
|
|
145
145
|
<script>
|
|
146
146
|
import { mapGetters, mapMutations } from 'vuex'
|
|
147
147
|
import _ from 'lodash'
|
|
148
|
+
import DialogBox from '~/components/Core/DialogBox.vue'
|
|
148
149
|
import Crypto from '~/helpers/Crypto'
|
|
149
150
|
import Course from '~/models/Course'
|
|
150
|
-
import SpeedDial from '~/components/SpeedDial.vue'
|
|
151
|
+
import SpeedDial from '~/components/Core/SpeedDial.vue'
|
|
151
152
|
|
|
152
153
|
import CourseGlossaryForm from './CourseGlossaryForm'
|
|
153
154
|
export default {
|
|
154
155
|
name: 'CourseGlossary',
|
|
155
|
-
components: { CourseGlossaryForm, SpeedDial },
|
|
156
|
+
components: { DialogBox, CourseGlossaryForm, SpeedDial },
|
|
156
157
|
layout: 'course',
|
|
157
158
|
middleware: ['auth'],
|
|
158
159
|
props: {},
|