@windward/core 0.2.1 → 0.2.3
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/.idea/codeStyles/Project.xml +58 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/php-docker-settings.xml +24 -0
- package/.idea/php.xml +19 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/watcherTasks.xml +4 -0
- package/.idea/windward-ui-plugin-core.iml +8 -0
- package/components/Content/Blocks/Accordion.vue +13 -4
- package/components/Content/Blocks/Email.vue +61 -23
- package/components/Content/Blocks/Feedback.vue +2 -1
- package/components/Content/Blocks/Image.vue +7 -0
- package/components/Content/Blocks/OpenResponseCollate.vue +1 -1
- package/components/Content/Blocks/UserUpload.vue +2 -2
- package/components/Settings/AccordionSettings.vue +36 -11
- package/components/Settings/EmailSettings.vue +61 -19
- package/components/Settings/MathSettings.vue +6 -4
- package/components/Settings/ScenarioChoiceSettings.vue +54 -47
- package/components/Settings/TabSettings.vue +3 -1
- package/components/Settings/TextEditorSettings.vue +72 -30
- package/components/Settings/UserUploadSettings.vue +3 -3
- package/components/Settings/VideoSettings.vue +2 -2
- package/components/utils/MathExpressionEditor.vue +4 -5
- package/components/utils/TinyMCEWrapper.vue +64 -11
- package/components/utils/glossary/CourseGlossary.vue +45 -32
- package/config/tinymce.config.ts +2 -1
- package/coverage/clover.xml +223 -0
- package/coverage/coverage-final.json +16 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +430 -0
- package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +394 -0
- package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +262 -0
- package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +295 -0
- package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +415 -0
- package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +667 -0
- package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +2275 -0
- package/coverage/lcov-report/components/Content/Blocks/index.html +206 -0
- package/coverage/lcov-report/components/utils/ContentViewer.vue.html +199 -0
- package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +919 -0
- package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +343 -0
- package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +271 -0
- package/coverage/lcov-report/components/utils/index.html +161 -0
- package/coverage/lcov-report/config/index.html +116 -0
- package/coverage/lcov-report/config/tinymce.config.js.html +493 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/helpers/MathHelper.ts.html +793 -0
- package/coverage/lcov-report/helpers/index.html +116 -0
- package/coverage/lcov-report/helpers/tinymce/index.html +116 -0
- package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +334 -0
- package/coverage/lcov-report/index.html +191 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov-report/test/index.html +116 -0
- package/coverage/lcov-report/test/mocks.js.html +457 -0
- package/coverage/lcov.info +403 -0
- package/helpers/tinymce/plugin.ts +18 -4
- package/i18n/en-US/components/content/blocks/email.ts +2 -0
- package/i18n/en-US/components/settings/accordion.ts +2 -1
- package/i18n/en-US/components/settings/email.ts +1 -0
- package/i18n/en-US/components/settings/text_editor.ts +4 -1
- package/i18n/es-ES/components/content/blocks/email.ts +2 -0
- package/i18n/es-ES/components/settings/accordion.ts +2 -1
- package/i18n/es-ES/components/settings/email.ts +1 -0
- package/i18n/es-ES/components/settings/text_editor.ts +4 -1
- package/i18n/sv-SE/components/content/blocks/email.ts +2 -0
- package/i18n/sv-SE/components/settings/accordion.ts +1 -0
- package/i18n/sv-SE/components/settings/email.ts +1 -0
- package/i18n/sv-SE/components/settings/text_editor.ts +4 -1
- package/lib/helpers/GlossaryHelper.d.ts +9 -0
- package/lib/helpers/GlossaryHelper.js +118 -0
- package/lib/helpers/GlossaryTerm.d.ts +10 -0
- package/lib/helpers/GlossaryTerm.js +22 -0
- package/lib/helpers/MathHelper.d.ts +99 -0
- package/lib/helpers/MathHelper.js +194 -0
- package/lib/helpers/tinymce/plugin.d.ts +2 -0
- package/lib/helpers/tinymce/plugin.js +86 -0
- package/lib/i18n/en-US/components/content/blocks/image.d.ts +6 -0
- package/lib/i18n/en-US/components/content/blocks/image.js +7 -0
- package/lib/i18n/en-US/components/content/blocks/index.d.ts +75 -0
- package/lib/i18n/en-US/components/content/blocks/index.js +14 -0
- package/lib/i18n/en-US/components/content/blocks/tab.d.ts +5 -0
- package/lib/i18n/en-US/components/content/blocks/tab.js +6 -0
- package/lib/i18n/en-US/components/content/blocks/table.d.ts +5 -0
- package/lib/i18n/en-US/components/content/blocks/table.js +6 -0
- package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +13 -0
- package/lib/i18n/en-US/components/content/blocks/user_upload.js +14 -0
- package/lib/i18n/en-US/components/content/blocks/video.d.ts +48 -0
- package/lib/i18n/en-US/components/content/blocks/video.js +49 -0
- package/lib/i18n/en-US/components/content/index.d.ts +77 -0
- package/lib/i18n/en-US/components/content/index.js +6 -0
- package/lib/i18n/en-US/components/index.d.ts +140 -0
- package/lib/i18n/en-US/components/index.js +12 -0
- package/lib/i18n/en-US/components/navigation/image.d.ts +5 -0
- package/lib/i18n/en-US/components/navigation/image.js +6 -0
- package/lib/i18n/en-US/components/navigation/index.d.ts +10 -0
- package/lib/i18n/en-US/components/navigation/index.js +8 -0
- package/lib/i18n/en-US/components/navigation/user_upload.d.ts +4 -0
- package/lib/i18n/en-US/components/navigation/user_upload.js +5 -0
- package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +6 -0
- package/lib/i18n/en-US/components/settings/clickable_icon.js +7 -0
- package/lib/i18n/en-US/components/settings/image.d.ts +2 -0
- package/lib/i18n/en-US/components/settings/image.js +3 -0
- package/lib/i18n/en-US/components/settings/index.d.ts +39 -0
- package/lib/i18n/en-US/components/settings/index.js +14 -0
- package/lib/i18n/en-US/components/settings/text_editor.d.ts +8 -0
- package/lib/i18n/en-US/components/settings/text_editor.js +9 -0
- package/lib/i18n/en-US/components/settings/user_upload.d.ts +12 -0
- package/lib/i18n/en-US/components/settings/user_upload.js +13 -0
- package/lib/i18n/en-US/components/settings/video.d.ts +13 -0
- package/lib/i18n/en-US/components/settings/video.js +14 -0
- package/lib/i18n/en-US/components/utils/index.d.ts +15 -0
- package/lib/i18n/en-US/components/utils/index.js +6 -0
- package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +13 -0
- package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +14 -0
- package/lib/i18n/en-US/index.d.ts +197 -0
- package/lib/i18n/en-US/index.js +16 -0
- package/lib/i18n/en-US/modules/index.d.ts +2 -0
- package/lib/i18n/en-US/modules/index.js +6 -0
- package/lib/i18n/en-US/pages/glossary.d.ts +8 -0
- package/lib/i18n/en-US/pages/glossary.js +9 -0
- package/lib/i18n/en-US/pages/index.d.ts +13 -0
- package/lib/i18n/en-US/pages/index.js +8 -0
- package/lib/i18n/en-US/pages/user_upload.d.ts +4 -0
- package/lib/i18n/en-US/pages/user_upload.js +5 -0
- package/lib/i18n/en-US/shared/content_blocks.d.ts +20 -0
- package/lib/i18n/en-US/shared/content_blocks.js +21 -0
- package/lib/i18n/en-US/shared/index.d.ts +39 -0
- package/lib/i18n/en-US/shared/index.js +10 -0
- package/lib/i18n/en-US/shared/menu.d.ts +4 -0
- package/lib/i18n/en-US/shared/menu.js +5 -0
- package/lib/i18n/en-US/shared/settings.d.ts +15 -0
- package/lib/i18n/en-US/shared/settings.js +16 -0
- package/lib/i18n/en-US.d.ts +197 -0
- package/lib/i18n/en-US.js +15 -0
- package/lib/models/UserFileAsset.d.ts +5 -0
- package/lib/models/UserFileAsset.js +37 -0
- package/package.json +1 -1
- package/test/Components/Settings/EmailSettings.spec.js +18 -2
|
@@ -18,20 +18,14 @@
|
|
|
18
18
|
:label="$t('windward.core.shared.settings.title.instructions')"
|
|
19
19
|
></v-textarea>
|
|
20
20
|
</v-container>
|
|
21
|
-
<v-container class="pa-0">
|
|
22
|
-
<v-text-field
|
|
23
|
-
v-model="block.metadata.config.subject"
|
|
24
|
-
outlined
|
|
25
|
-
:label="$t('windward.core.components.settings.email.subject')"
|
|
26
|
-
></v-text-field>
|
|
27
|
-
</v-container>
|
|
28
21
|
<v-divider class="my-4 primary"></v-divider>
|
|
29
22
|
<v-container class="pa-0">
|
|
30
|
-
<p>
|
|
23
|
+
<p>{{ $t('windward.core.components.settings.email.items') }}</p>
|
|
31
24
|
<SortableExpansionPanel
|
|
32
25
|
v-model="block.metadata.config.emails"
|
|
33
26
|
@click:close="onRemoveElement($event)"
|
|
34
27
|
@change="onDragged"
|
|
28
|
+
@update:currentPanel="onUpdatePanel"
|
|
35
29
|
>
|
|
36
30
|
<template #header="{ item }">{{
|
|
37
31
|
item.from
|
|
@@ -66,6 +60,17 @@
|
|
|
66
60
|
$t('windward.core.components.settings.email.cc')
|
|
67
61
|
"
|
|
68
62
|
></v-text-field>
|
|
63
|
+
<v-text-field
|
|
64
|
+
v-model="
|
|
65
|
+
block.metadata.config.emails[index].subject
|
|
66
|
+
"
|
|
67
|
+
outlined
|
|
68
|
+
:label="
|
|
69
|
+
$t(
|
|
70
|
+
'windward.core.components.settings.email.subject'
|
|
71
|
+
)
|
|
72
|
+
"
|
|
73
|
+
></v-text-field>
|
|
69
74
|
<v-btn
|
|
70
75
|
@click="
|
|
71
76
|
onToggleExpand(
|
|
@@ -73,24 +78,37 @@
|
|
|
73
78
|
index
|
|
74
79
|
)
|
|
75
80
|
"
|
|
81
|
+
text
|
|
76
82
|
>
|
|
77
83
|
<v-icon
|
|
78
84
|
v-if="
|
|
79
|
-
!block.metadata.config.emails[index]
|
|
85
|
+
!block.metadata.config.emails[index]
|
|
86
|
+
.tinymce_expand
|
|
80
87
|
"
|
|
88
|
+
color="primary"
|
|
81
89
|
>mdi-arrow-expand-all</v-icon
|
|
82
90
|
>
|
|
83
91
|
<v-icon
|
|
84
92
|
v-if="
|
|
85
|
-
block.metadata.config.emails[index]
|
|
93
|
+
block.metadata.config.emails[index]
|
|
94
|
+
.tinymce_expand
|
|
86
95
|
"
|
|
96
|
+
color="primary"
|
|
87
97
|
>
|
|
88
98
|
mdi-arrow-collapse-all
|
|
89
99
|
</v-icon>
|
|
90
100
|
</v-btn>
|
|
91
101
|
<TextEditor
|
|
92
|
-
v-show="
|
|
102
|
+
v-show="
|
|
103
|
+
!block.metadata.config.emails[index]
|
|
104
|
+
.tinymce_expand
|
|
105
|
+
"
|
|
93
106
|
v-model="block.metadata.config.emails[index].body"
|
|
107
|
+
:label="
|
|
108
|
+
$t(
|
|
109
|
+
'windward.core.components.settings.email.placeholder'
|
|
110
|
+
)
|
|
111
|
+
"
|
|
94
112
|
></TextEditor>
|
|
95
113
|
</v-container>
|
|
96
114
|
</template>
|
|
@@ -101,7 +119,7 @@
|
|
|
101
119
|
<v-btn color="primary" @click="onAddElement"
|
|
102
120
|
><v-icon>mdi-plus</v-icon
|
|
103
121
|
>{{
|
|
104
|
-
$t('windward.core.components.settings.
|
|
122
|
+
$t('windward.core.components.settings.email.add')
|
|
105
123
|
}}</v-btn
|
|
106
124
|
>
|
|
107
125
|
</v-row>
|
|
@@ -155,19 +173,23 @@ export default {
|
|
|
155
173
|
from: '',
|
|
156
174
|
to: '',
|
|
157
175
|
cc: '',
|
|
176
|
+
subject: '',
|
|
158
177
|
body: '',
|
|
159
|
-
|
|
178
|
+
tinymce_expand: false,
|
|
160
179
|
initials: '',
|
|
161
180
|
}
|
|
162
181
|
this.block.metadata.config.emails.push(defaultObject)
|
|
163
182
|
}
|
|
164
|
-
this.block.body = this.$t(
|
|
183
|
+
this.block.body = this.$t(
|
|
184
|
+
'windward.core.components.content.blocks.email.title'
|
|
185
|
+
)
|
|
165
186
|
},
|
|
166
187
|
data() {
|
|
167
188
|
return {
|
|
168
189
|
valid: true,
|
|
169
190
|
loading: false,
|
|
170
191
|
expansionPanelKey: 0,
|
|
192
|
+
editingPanel: 0,
|
|
171
193
|
}
|
|
172
194
|
},
|
|
173
195
|
beforeDestroy() {
|
|
@@ -175,14 +197,29 @@ export default {
|
|
|
175
197
|
clearTimeout(this.debouncer)
|
|
176
198
|
}
|
|
177
199
|
},
|
|
200
|
+
mounted() {
|
|
201
|
+
this.block.metadata.config.selectedPanels = 0
|
|
202
|
+
},
|
|
178
203
|
methods: {
|
|
179
204
|
onBeforeSave() {
|
|
180
205
|
this.block.metadata.config.emails.forEach((element) => {
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
206
|
+
if (element.from) {
|
|
207
|
+
let matches = element.from.match(/\b(\w)/g)
|
|
208
|
+
element.initials = matches.join('')
|
|
209
|
+
}
|
|
210
|
+
element.tinymce_expand = false
|
|
184
211
|
})
|
|
185
212
|
},
|
|
213
|
+
onUpdatePanel($event) {
|
|
214
|
+
if ($event !== this.block.metadata.config.selectedPanels) {
|
|
215
|
+
//catch click event to open selected panel to edit
|
|
216
|
+
this.block.metadata.config.selectedPanels = $event
|
|
217
|
+
} else {
|
|
218
|
+
// if user clicks same panel again expansion panel closes
|
|
219
|
+
// setting selected to null will close content blocks expansion panels
|
|
220
|
+
this.block.metadata.config.selectedPanels = null
|
|
221
|
+
}
|
|
222
|
+
},
|
|
186
223
|
onRemoveElement(event) {
|
|
187
224
|
this.block.metadata.config.emails.splice(event, 1)
|
|
188
225
|
this.expansionPanelKey = Crypto.id()
|
|
@@ -192,19 +229,24 @@ export default {
|
|
|
192
229
|
from: '',
|
|
193
230
|
to: '',
|
|
194
231
|
cc: '',
|
|
232
|
+
subject: '',
|
|
195
233
|
body: '',
|
|
196
|
-
|
|
234
|
+
tinymce_expand: false,
|
|
197
235
|
initials: '',
|
|
198
236
|
}
|
|
199
237
|
this.block.metadata.config.emails.push(defaultObject)
|
|
238
|
+
this.block.metadata.config.selectedPanels =
|
|
239
|
+
this.block.metadata.config.emails.length - 1
|
|
200
240
|
},
|
|
201
241
|
onToggleExpand(item, index) {
|
|
202
242
|
this.expansionPanelKey = Crypto.id()
|
|
203
|
-
return (item.
|
|
243
|
+
return (item.tinymce_expand = !item.tinymce_expand)
|
|
204
244
|
},
|
|
205
245
|
onDragged() {
|
|
206
246
|
// need to remount body after dragged to update the content body on the element
|
|
207
247
|
this.expansionPanelKey = Crypto.id()
|
|
248
|
+
//close all panels on drag, leaving them open confuses the tracking as indexes changes around
|
|
249
|
+
this.block.metadata.config.selectedPanels = null
|
|
208
250
|
},
|
|
209
251
|
},
|
|
210
252
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
3
|
<br />
|
|
4
|
-
<v-btn @click="onToggleExpand" class="mb-2">
|
|
5
|
-
<v-icon v-if="!block.metadata.config.expand"
|
|
4
|
+
<v-btn @click="onToggleExpand" text class="mb-2">
|
|
5
|
+
<v-icon v-if="!block.metadata.config.expand" color="primary"
|
|
6
6
|
>mdi-arrow-expand-all</v-icon
|
|
7
7
|
>
|
|
8
|
-
<v-icon v-if="block.metadata.config.expand">
|
|
8
|
+
<v-icon v-if="block.metadata.config.expand" color="primary">
|
|
9
9
|
mdi-arrow-collapse-all
|
|
10
10
|
</v-icon>
|
|
11
11
|
</v-btn>
|
|
@@ -36,7 +36,9 @@ export default {
|
|
|
36
36
|
this.block = {}
|
|
37
37
|
}
|
|
38
38
|
if (_.isEmpty(this.block.body)) {
|
|
39
|
-
this.block.body = this.$t(
|
|
39
|
+
this.block.body = this.$t(
|
|
40
|
+
'windward.core.shared.content_blocks.title.math'
|
|
41
|
+
)
|
|
40
42
|
}
|
|
41
43
|
if (_.isEmpty(this.block.metadata)) {
|
|
42
44
|
this.block.metadata = {}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<v-container>
|
|
3
|
+
<v-container class="pa-0">
|
|
4
4
|
<v-col class="pa-0">
|
|
5
5
|
<v-text-field
|
|
6
6
|
v-model="block.metadata.config.title"
|
|
@@ -47,28 +47,8 @@
|
|
|
47
47
|
)
|
|
48
48
|
"
|
|
49
49
|
></v-switch>
|
|
50
|
-
|
|
51
|
-
<v-btn
|
|
52
|
-
color="primary"
|
|
53
|
-
outlined
|
|
54
|
-
block
|
|
55
|
-
:disabled="block.metadata.config.items.length > 26"
|
|
56
|
-
@click="onAddElement"
|
|
57
|
-
>
|
|
58
|
-
<v-icon>mdi-plus</v-icon>
|
|
59
|
-
<span v-if="block.metadata.config.items.length <= 26">
|
|
60
|
-
{{ $t('shared.forms.add') }}
|
|
61
|
-
</span>
|
|
62
|
-
<span v-else>
|
|
63
|
-
{{
|
|
64
|
-
$t(
|
|
65
|
-
'windward.core.components.settings.scenario_choice.over_item_limit'
|
|
66
|
-
)
|
|
67
|
-
}}
|
|
68
|
-
</span>
|
|
69
|
-
</v-btn>
|
|
70
50
|
</v-col>
|
|
71
|
-
<v-col>
|
|
51
|
+
<v-col class="pa-0">
|
|
72
52
|
<SortableExpansionPanel
|
|
73
53
|
v-model="block.metadata.config.items"
|
|
74
54
|
@click:close="onRemoveElement"
|
|
@@ -84,37 +64,64 @@
|
|
|
84
64
|
</span>
|
|
85
65
|
</template>
|
|
86
66
|
<template #body="{ index }">
|
|
87
|
-
<v-
|
|
88
|
-
v-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
67
|
+
<v-container>
|
|
68
|
+
<v-text-field
|
|
69
|
+
v-model="
|
|
70
|
+
block.metadata.config.items[index].title
|
|
71
|
+
"
|
|
72
|
+
:id="'item-' + index + '-title'"
|
|
73
|
+
:label="
|
|
74
|
+
$t(
|
|
75
|
+
'windward.core.components.settings.scenario_choice.item_title'
|
|
76
|
+
)
|
|
77
|
+
"
|
|
78
|
+
></v-text-field>
|
|
96
79
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
80
|
+
<v-switch
|
|
81
|
+
v-model="
|
|
82
|
+
block.metadata.config.items[index].correct
|
|
83
|
+
"
|
|
84
|
+
:label="
|
|
85
|
+
$t(
|
|
86
|
+
'windward.core.components.settings.scenario_choice.correct_choice'
|
|
87
|
+
)
|
|
88
|
+
"
|
|
89
|
+
></v-switch>
|
|
90
|
+
|
|
91
|
+
<span>{{
|
|
100
92
|
$t(
|
|
101
|
-
'windward.core.components.settings.scenario_choice.
|
|
93
|
+
'windward.core.components.settings.scenario_choice.item_text'
|
|
102
94
|
)
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
<TextEditor
|
|
112
|
-
v-model="block.metadata.config.items[index].body"
|
|
113
|
-
:height="200"
|
|
114
|
-
></TextEditor>
|
|
95
|
+
}}</span>
|
|
96
|
+
<TextEditor
|
|
97
|
+
v-model="
|
|
98
|
+
block.metadata.config.items[index].body
|
|
99
|
+
"
|
|
100
|
+
:height="200"
|
|
101
|
+
></TextEditor>
|
|
102
|
+
</v-container>
|
|
115
103
|
</template>
|
|
116
104
|
</SortableExpansionPanel>
|
|
117
105
|
</v-col>
|
|
106
|
+
<v-row justify="center" class="my-4">
|
|
107
|
+
<v-btn
|
|
108
|
+
color="primary"
|
|
109
|
+
:disabled="block.metadata.config.items.length > 26"
|
|
110
|
+
@click="onAddElement"
|
|
111
|
+
>
|
|
112
|
+
<v-icon>mdi-plus</v-icon>
|
|
113
|
+
<span v-if="block.metadata.config.items.length <= 26">
|
|
114
|
+
{{ $t('shared.forms.add') }}
|
|
115
|
+
</span>
|
|
116
|
+
<span v-else>
|
|
117
|
+
{{
|
|
118
|
+
$t(
|
|
119
|
+
'windward.core.components.settings.scenario_choice.over_item_limit'
|
|
120
|
+
)
|
|
121
|
+
}}
|
|
122
|
+
</span>
|
|
123
|
+
</v-btn>
|
|
124
|
+
</v-row>
|
|
118
125
|
</v-container>
|
|
119
126
|
|
|
120
127
|
<DialogBox
|
|
@@ -29,15 +29,17 @@
|
|
|
29
29
|
"
|
|
30
30
|
:placeholder="'item ' + (index + 1)"
|
|
31
31
|
></v-text-field>
|
|
32
|
-
<v-btn @click="onToggleExpand(index)" class="mb-3">
|
|
32
|
+
<v-btn @click="onToggleExpand(index)" text class="mb-3">
|
|
33
33
|
<v-icon
|
|
34
34
|
v-if="
|
|
35
35
|
!block.metadata.config.items[index].expand
|
|
36
36
|
"
|
|
37
|
+
color="primary"
|
|
37
38
|
>mdi-arrow-expand-all</v-icon
|
|
38
39
|
>
|
|
39
40
|
<v-icon
|
|
40
41
|
v-if="block.metadata.config.items[index].expand"
|
|
42
|
+
color="primary"
|
|
41
43
|
>
|
|
42
44
|
mdi-arrow-collapse-all
|
|
43
45
|
</v-icon>
|
|
@@ -2,37 +2,79 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<br />
|
|
4
4
|
<v-card elevation="0">
|
|
5
|
-
<v-btn-toggle v-model="settingSelector" multiple>
|
|
6
|
-
<v-
|
|
7
|
-
<
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
5
|
+
<v-btn-toggle v-model="settingSelector" multiple borderless>
|
|
6
|
+
<v-tooltip top>
|
|
7
|
+
<template #activator="{ on, attrs }">
|
|
8
|
+
<v-btn v-bind="attrs" v-on="on" text>
|
|
9
|
+
<v-icon>mdi-comment-text-multiple</v-icon>
|
|
10
|
+
{{
|
|
11
|
+
$t(
|
|
12
|
+
'windward.core.components.settings.text_editor.glossary'
|
|
13
|
+
)
|
|
14
|
+
}}
|
|
15
|
+
</v-btn>
|
|
16
|
+
</template>
|
|
17
|
+
<span>
|
|
18
|
+
{{
|
|
19
|
+
$t(
|
|
20
|
+
'windward.core.components.settings.text_editor.click_to_hide_glossary'
|
|
21
|
+
)
|
|
22
|
+
}}</span
|
|
23
|
+
>
|
|
24
|
+
</v-tooltip>
|
|
25
|
+
|
|
26
|
+
<v-tooltip top>
|
|
27
|
+
<template #activator="{ on, attrs }">
|
|
28
|
+
<v-btn v-bind="attrs" v-on="on" text>
|
|
29
|
+
<v-icon> mdi-text-long</v-icon>
|
|
30
|
+
{{
|
|
31
|
+
$t(
|
|
32
|
+
'windward.core.components.settings.text_editor.text_editor'
|
|
33
|
+
)
|
|
34
|
+
}}
|
|
35
|
+
</v-btn>
|
|
36
|
+
</template>
|
|
37
|
+
<span>
|
|
38
|
+
{{
|
|
39
|
+
$t(
|
|
40
|
+
'windward.core.components.settings.text_editor.click_to_hide_editor'
|
|
41
|
+
)
|
|
42
|
+
}}</span
|
|
43
|
+
>
|
|
44
|
+
</v-tooltip>
|
|
45
|
+
|
|
46
|
+
<v-tooltip top v-if="settingSelector.includes(1)">
|
|
47
|
+
<template #activator="{ on, attrs }">
|
|
48
|
+
<v-btn
|
|
49
|
+
v-bind="attrs"
|
|
50
|
+
v-on="on"
|
|
51
|
+
@click="
|
|
52
|
+
block.metadata.config.expand =
|
|
53
|
+
!block.metadata.config.expand
|
|
54
|
+
"
|
|
55
|
+
text
|
|
56
|
+
>
|
|
57
|
+
<v-icon
|
|
58
|
+
v-if="!block.metadata.config.expand"
|
|
59
|
+
color="primary"
|
|
60
|
+
>mdi-arrow-expand-all</v-icon
|
|
61
|
+
>
|
|
62
|
+
<v-icon
|
|
63
|
+
v-if="block.metadata.config.expand"
|
|
64
|
+
color="primary"
|
|
65
|
+
>
|
|
66
|
+
mdi-arrow-collapse-all
|
|
67
|
+
</v-icon>
|
|
68
|
+
</v-btn>
|
|
69
|
+
</template>
|
|
70
|
+
<span>
|
|
71
|
+
{{
|
|
72
|
+
$t(
|
|
73
|
+
'windward.core.components.settings.text_editor.click_to_expand'
|
|
74
|
+
)
|
|
75
|
+
}}</span
|
|
31
76
|
>
|
|
32
|
-
|
|
33
|
-
mdi-arrow-collapse-all
|
|
34
|
-
</v-icon>
|
|
35
|
-
</v-btn>
|
|
77
|
+
</v-tooltip>
|
|
36
78
|
</v-btn-toggle>
|
|
37
79
|
<br />
|
|
38
80
|
</v-card>
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
$t('windward.core.components.settings.user_upload.accept_types')
|
|
21
21
|
"
|
|
22
22
|
></v-select>
|
|
23
|
-
<v-btn @click="onToggleExpand()" class="mt-4">
|
|
24
|
-
<v-icon v-if="!block.metadata.config.expand"
|
|
23
|
+
<v-btn @click="onToggleExpand()" text class="mt-4">
|
|
24
|
+
<v-icon v-if="!block.metadata.config.expand" color="primary"
|
|
25
25
|
>mdi-arrow-expand-all</v-icon
|
|
26
26
|
>
|
|
27
|
-
<v-icon v-if="block.metadata.config.expand">
|
|
27
|
+
<v-icon v-if="block.metadata.config.expand" color="primary">
|
|
28
28
|
mdi-arrow-collapse-all
|
|
29
29
|
</v-icon>
|
|
30
30
|
</v-btn>
|
|
@@ -257,7 +257,7 @@
|
|
|
257
257
|
<v-btn
|
|
258
258
|
v-bind="attrs"
|
|
259
259
|
v-on="on"
|
|
260
|
-
|
|
260
|
+
text
|
|
261
261
|
color="error"
|
|
262
262
|
:disabled="
|
|
263
263
|
block.metadata.config.playlist.length <= 1
|
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
v-bind="attrs"
|
|
288
288
|
v-on="on"
|
|
289
289
|
color="primary"
|
|
290
|
-
|
|
290
|
+
text
|
|
291
291
|
@click="onAddPlaylistItem"
|
|
292
292
|
>
|
|
293
293
|
<v-icon>mdi-plus</v-icon>
|
|
@@ -34,17 +34,16 @@
|
|
|
34
34
|
>
|
|
35
35
|
<v-container>
|
|
36
36
|
<div class="flex-wrap col-12">
|
|
37
|
-
<
|
|
38
|
-
:min-height="index < 4 ? 40 : 60"
|
|
37
|
+
<button
|
|
39
38
|
v-for="(
|
|
40
39
|
button, buttonIndex
|
|
41
40
|
) in keyboard.buttons"
|
|
42
41
|
:key="buttonIndex"
|
|
43
42
|
class="btn"
|
|
44
43
|
@click="insert(button)"
|
|
45
|
-
v-html="convertLatexToMarkup(button.text)"
|
|
44
|
+
v-html="'<strong>'+convertLatexToMarkup(button.text)+'</strong>'"
|
|
46
45
|
>
|
|
47
|
-
</
|
|
46
|
+
</button>
|
|
48
47
|
</div>
|
|
49
48
|
</v-container>
|
|
50
49
|
</v-tab-item>
|
|
@@ -134,7 +133,7 @@ export default {
|
|
|
134
133
|
options: {
|
|
135
134
|
smartFence: true,
|
|
136
135
|
smartMode: false,
|
|
137
|
-
virtualKeyboardMode: '
|
|
136
|
+
virtualKeyboardMode: 'none',
|
|
138
137
|
keypressSound: 'none',
|
|
139
138
|
plonkSound: 'none',
|
|
140
139
|
readOnly: false,
|
|
@@ -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"
|
|
@@ -10,13 +10,31 @@
|
|
|
10
10
|
tag-name="div"
|
|
11
11
|
model-events="change keydown blur focus mouseDown paste input submit SetContent"
|
|
12
12
|
@onfocus="onEditorFocus"
|
|
13
|
+
v-click-outside="{
|
|
14
|
+
handler: onClickOutside,
|
|
15
|
+
closeConditional,
|
|
16
|
+
include,
|
|
17
|
+
}"
|
|
13
18
|
>
|
|
14
19
|
</editor>
|
|
15
20
|
</div>
|
|
21
|
+
|
|
16
22
|
<v-btn-toggle dense multiple class="pt-1 d-flex justify-end">
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
23
|
+
<slot name="actions-prepend" :render="render"></slot>
|
|
24
|
+
<slot name="actions" :render="render">
|
|
25
|
+
<v-btn
|
|
26
|
+
v-if="render"
|
|
27
|
+
color="primary"
|
|
28
|
+
outlined
|
|
29
|
+
@click="onClickOutside"
|
|
30
|
+
>{{
|
|
31
|
+
$t(
|
|
32
|
+
'windward.core.components.utils.tiny_mce_wrapper.minimize'
|
|
33
|
+
)
|
|
34
|
+
}}
|
|
35
|
+
</v-btn>
|
|
36
|
+
</slot>
|
|
37
|
+
<slot name="actions-append" :render="render"></slot>
|
|
20
38
|
</v-btn-toggle>
|
|
21
39
|
</div>
|
|
22
40
|
</template>
|
|
@@ -45,9 +63,10 @@ export default {
|
|
|
45
63
|
type: String,
|
|
46
64
|
required: false,
|
|
47
65
|
default:
|
|
48
|
-
'undo redo | formatselect | fontsizeselect | bold italic underline strikethrough removeformat | alignleft aligncenter alignright | table bullist numlist outdent indent | mathButton ',
|
|
66
|
+
'undo redo | formatselect | fontsizeselect | bold italic underline strikethrough removeformat | alignleft aligncenter alignright | table bullist numlist outdent indent | glossaryButton fibButton mathButton ',
|
|
49
67
|
},
|
|
50
68
|
root_block: { type: String, required: false, default: 'div' },
|
|
69
|
+
label: { type: String, required: true, default: '' },
|
|
51
70
|
},
|
|
52
71
|
beforeMount() {
|
|
53
72
|
this.text = this.value
|
|
@@ -81,7 +100,7 @@ export default {
|
|
|
81
100
|
},
|
|
82
101
|
filteredHeight() {
|
|
83
102
|
if (!this.render) {
|
|
84
|
-
return
|
|
103
|
+
return 100
|
|
85
104
|
} else if (this.height !== null) {
|
|
86
105
|
return this.height
|
|
87
106
|
} else {
|
|
@@ -90,6 +109,7 @@ export default {
|
|
|
90
109
|
},
|
|
91
110
|
config() {
|
|
92
111
|
return {
|
|
112
|
+
draggable_modal: true,
|
|
93
113
|
height: this.filteredHeight,
|
|
94
114
|
visual: false,
|
|
95
115
|
forced_root_block: this.root_block,
|
|
@@ -263,9 +283,11 @@ export default {
|
|
|
263
283
|
},
|
|
264
284
|
],
|
|
265
285
|
style_formats_merge: true,
|
|
266
|
-
placeholder: this
|
|
267
|
-
|
|
268
|
-
|
|
286
|
+
placeholder: this.label
|
|
287
|
+
? this.label
|
|
288
|
+
: this.$t(
|
|
289
|
+
'windward.core.shared.settings.title.placeholder'
|
|
290
|
+
),
|
|
269
291
|
//required as it will be displayed as inline style in tinymce renderer
|
|
270
292
|
|
|
271
293
|
skin: this.$vuetify.theme.isDark ? 'oxide-dark' : 'oxide',
|
|
@@ -284,6 +306,10 @@ export default {
|
|
|
284
306
|
importcss_append: true,
|
|
285
307
|
}
|
|
286
308
|
},
|
|
309
|
+
|
|
310
|
+
elementBody() {
|
|
311
|
+
return [document.querySelector('.tinymce-included-' + this.seed)]
|
|
312
|
+
},
|
|
287
313
|
},
|
|
288
314
|
methods: {
|
|
289
315
|
onEditorFocus() {
|
|
@@ -292,12 +318,39 @@ export default {
|
|
|
292
318
|
this.render = true
|
|
293
319
|
}
|
|
294
320
|
},
|
|
295
|
-
|
|
321
|
+
onClickOutside() {
|
|
296
322
|
if (this.render) {
|
|
297
323
|
this.seed = Crypto.id()
|
|
298
324
|
this.render = false
|
|
299
325
|
}
|
|
300
326
|
},
|
|
327
|
+
include() {
|
|
328
|
+
// vuetify function to include an element with this class into clickable area without close
|
|
329
|
+
return this.elementBody
|
|
330
|
+
},
|
|
331
|
+
|
|
332
|
+
closeConditional(e) {
|
|
333
|
+
const targetClass = e.target.className
|
|
334
|
+
let parentNode
|
|
335
|
+
//check if target is svg element
|
|
336
|
+
if (e.target.matches('svg') || e.target instanceof SVGElement) {
|
|
337
|
+
parentNode = e.target.parentNode.parentNode
|
|
338
|
+
} else {
|
|
339
|
+
parentNode = e.target.parentNode
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
if (
|
|
343
|
+
parentNode.closest('.tinymce-included-' + this.seed) ||
|
|
344
|
+
_.includes(targetClass, 'tinymce-included-' + this.seed) ||
|
|
345
|
+
_.includes(targetClass, 'tox') ||
|
|
346
|
+
_.includes(parentNode.className, 'tox')
|
|
347
|
+
) {
|
|
348
|
+
return false
|
|
349
|
+
} else {
|
|
350
|
+
this.onClickOutside()
|
|
351
|
+
return true
|
|
352
|
+
}
|
|
353
|
+
},
|
|
301
354
|
},
|
|
302
355
|
}
|
|
303
356
|
</script>
|