@windward/core 0.2.0 → 0.2.2
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/components/Content/Blocks/Accordion.vue +25 -11
- package/components/Content/Blocks/BlockQuote.vue +3 -1
- package/components/Content/Blocks/ClickableIcons.vue +29 -27
- package/components/Content/Blocks/Email.vue +64 -24
- package/components/Content/Blocks/Feedback.vue +5 -13
- package/components/Content/Blocks/Image.vue +8 -1
- package/components/Content/Blocks/Math.vue +3 -1
- package/components/Content/Blocks/OpenResponseCollate.vue +1 -1
- package/components/Content/Blocks/ScenarioChoice.vue +3 -1
- package/components/Content/Blocks/Tab.vue +3 -1
- package/components/Content/Blocks/UserUpload.vue +5 -3
- package/components/Settings/AccordionSettings.vue +34 -11
- package/components/Settings/BlockQuoteSettings.vue +1 -1
- package/components/Settings/ClickableIconsSettings.vue +1 -1
- package/components/Settings/EmailSettings.vue +61 -19
- package/components/Settings/FeedbackSettings.vue +3 -1
- package/components/Settings/MathSettings.vue +6 -4
- package/components/Settings/ScenarioChoiceSettings.vue +57 -48
- package/components/Settings/TabSettings.vue +4 -2
- package/components/Settings/TextEditorSettings.vue +72 -30
- package/components/Settings/UserUploadSettings.vue +4 -4
- package/components/Settings/VideoSettings.vue +2 -2
- package/components/utils/ContentViewer.vue +2 -1
- package/components/utils/FillInBlank/FillInTheBlanksManager.vue +20 -24
- package/components/utils/MathExpressionEditor.vue +81 -85
- package/components/utils/MathLiveWrapper.vue +3 -1
- package/components/utils/TinyMCEWrapper.vue +91 -21
- package/components/utils/glossary/CourseGlossary.vue +45 -32
- package/components/utils/glossary/CourseGlossaryForm.vue +1 -0
- package/config/tinymce.config.ts +314 -0
- package/helpers/tinymce/plugin.ts +48 -27
- 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/en-US/components/utils/math_expression_editor.ts +11 -0
- package/i18n/en-US/components/utils/tiny_mce_wrapper.ts +1 -0
- package/i18n/en-US/pages/index.ts +2 -0
- package/i18n/en-US/pages/plugins/error.ts +9 -0
- package/i18n/en-US/pages/plugins/index.ts +5 -0
- package/i18n/en-US/shared/settings.ts +1 -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/es-ES/components/utils/math_expression_editor.ts +11 -0
- package/i18n/es-ES/components/utils/tiny_mce_wrapper.ts +1 -0
- package/i18n/es-ES/pages/index.ts +2 -0
- package/i18n/es-ES/pages/plugins/error.ts +9 -0
- package/i18n/es-ES/pages/plugins/index.ts +5 -0
- 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/i18n/sv-SE/components/utils/math_expression_editor.ts +11 -0
- package/i18n/sv-SE/components/utils/tiny_mce_wrapper.ts +1 -0
- package/i18n/sv-SE/pages/index.ts +2 -0
- package/i18n/sv-SE/pages/plugins/error.ts +8 -0
- package/i18n/sv-SE/pages/plugins/index.ts +5 -0
- package/package.json +1 -1
- package/pages/plugins/tinymce/_plugin.vue +79 -0
- package/plugin.js +10 -0
- package/test/Components/Settings/EmailSettings.spec.js +18 -2
- package/test/Pages/Plugins/TinyMce.spec.js +23 -0
- package/test/__mocks__/componentsMock.js +0 -12
- package/test/mocks.js +1 -0
- package/config/tinymce.config.js +0 -136
|
@@ -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 =
|
|
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
|
}
|
|
@@ -53,7 +53,9 @@ export default {
|
|
|
53
53
|
if (_.isEmpty(this.block.metadata.config.definition)) {
|
|
54
54
|
this.block.metadata.config.definition = {}
|
|
55
55
|
}
|
|
56
|
-
this.block.body =
|
|
56
|
+
this.block.body = this.$t(
|
|
57
|
+
'windward.core.components.content.blocks.feedback.feedback'
|
|
58
|
+
)
|
|
57
59
|
},
|
|
58
60
|
data() {
|
|
59
61
|
return {
|
|
@@ -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 =
|
|
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>
|
|
79
|
+
|
|
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>
|
|
96
90
|
|
|
97
|
-
|
|
98
|
-
v-model="block.metadata.config.items[index].correct"
|
|
99
|
-
:label="
|
|
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
|
|
@@ -231,7 +238,9 @@ export default {
|
|
|
231
238
|
this.block = {}
|
|
232
239
|
}
|
|
233
240
|
if (_.isEmpty(this.block.body)) {
|
|
234
|
-
this.block.body =
|
|
241
|
+
this.block.body = this.$t(
|
|
242
|
+
'windward.core.shared.content_blocks.title.scenario_choice'
|
|
243
|
+
)
|
|
235
244
|
}
|
|
236
245
|
if (_.isEmpty(this.block.metadata)) {
|
|
237
246
|
this.block.metadata = {}
|
|
@@ -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>
|
|
@@ -85,7 +87,7 @@ export default {
|
|
|
85
87
|
}
|
|
86
88
|
if (_.isEmpty(this.block.body)) {
|
|
87
89
|
this.block.body = this.$t(
|
|
88
|
-
'windward.core.
|
|
90
|
+
'windward.core.shared.content_blocks.title.tab'
|
|
89
91
|
)
|
|
90
92
|
}
|
|
91
93
|
if (_.isEmpty(this.block.metadata)) {
|
|
@@ -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>
|
|
@@ -62,7 +62,7 @@ export default {
|
|
|
62
62
|
this.block = {}
|
|
63
63
|
}
|
|
64
64
|
if (_.isEmpty(this.block.body)) {
|
|
65
|
-
this.block.body = '
|
|
65
|
+
this.block.body = this.$t('windward.core.shared.content_blocks.title.user_upload')
|
|
66
66
|
}
|
|
67
67
|
if (_.isEmpty(this.block.metadata)) {
|
|
68
68
|
this.block.metadata = {}
|
|
@@ -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>
|
|
@@ -33,7 +33,8 @@ export default {
|
|
|
33
33
|
content = _.cloneDeep(this.value)
|
|
34
34
|
if (
|
|
35
35
|
MathHelper.containsMathML(content) ||
|
|
36
|
-
MathHelper.containsLatex(content)
|
|
36
|
+
MathHelper.containsLatex(content) ||
|
|
37
|
+
MathHelper.containSREnhancedLatex(content)
|
|
37
38
|
) {
|
|
38
39
|
content = MathHelper.convertMathContentToHtml(content)
|
|
39
40
|
}
|
|
@@ -1,30 +1,26 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-container>
|
|
3
3
|
<v-row align="center" justify="center">
|
|
4
|
-
<v-col>
|
|
5
|
-
<v-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
v-model="feedback"
|
|
25
|
-
@input="submit"
|
|
26
|
-
></TextEditor>
|
|
27
|
-
</v-row>
|
|
4
|
+
<v-col cols="12">
|
|
5
|
+
<v-text-field
|
|
6
|
+
:label="
|
|
7
|
+
$t(
|
|
8
|
+
'windward.core.components.utils.fill_in_the_blank.fill_in_the_blank_manager.answer'
|
|
9
|
+
)
|
|
10
|
+
"
|
|
11
|
+
v-model="answer"
|
|
12
|
+
outlined
|
|
13
|
+
@input="submit"
|
|
14
|
+
></v-text-field>
|
|
15
|
+
</v-col>
|
|
16
|
+
</v-row>
|
|
17
|
+
<v-row>
|
|
18
|
+
<v-col cols="12">
|
|
19
|
+
<TextEditor
|
|
20
|
+
:key="key"
|
|
21
|
+
v-model="feedback"
|
|
22
|
+
@input="submit"
|
|
23
|
+
></TextEditor>
|
|
28
24
|
</v-col>
|
|
29
25
|
</v-row>
|
|
30
26
|
</v-container>
|