@windward/core 0.1.4 → 0.2.1
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 +12 -7
- package/components/Content/Blocks/BlockQuote.vue +3 -1
- package/components/Content/Blocks/ClickableIcons.vue +29 -27
- package/components/Content/Blocks/Email.vue +3 -1
- package/components/Content/Blocks/Feedback.vue +3 -12
- package/components/Content/Blocks/Image.vue +4 -4
- package/components/Content/Blocks/Math.vue +3 -1
- package/components/Content/Blocks/ScenarioChoice.vue +3 -1
- package/components/Content/Blocks/Tab.vue +5 -9
- package/components/Content/Blocks/UserUpload/ManageDataTableUserFiles.vue +4 -4
- package/components/Content/Blocks/UserUpload.vue +3 -1
- package/components/Navigation/Items/AskTheExpert.vue +2 -2
- package/components/Navigation/Items/CourseGlossaryToolNav.vue +2 -2
- package/components/Settings/AccordionSettings.vue +1 -3
- package/components/Settings/BlockQuoteSettings.vue +1 -1
- package/components/Settings/ClickableIconsSettings.vue +1 -1
- package/components/Settings/EmailSettings.vue +1 -1
- package/components/Settings/FeedbackSettings.vue +3 -1
- package/components/Settings/ImageSettings.vue +69 -9
- package/components/Settings/MathSettings.vue +1 -1
- package/components/Settings/ScenarioChoiceSettings.vue +7 -5
- package/components/Settings/TabSettings.vue +1 -4
- package/components/Settings/TextEditorSettings.vue +2 -2
- package/components/Settings/UserUploadSettings.vue +1 -1
- package/components/utils/ContentViewer.vue +2 -1
- package/components/utils/FillInBlank/FillInTheBlanksManager.vue +20 -24
- package/components/utils/MathExpressionEditor.vue +83 -86
- package/components/utils/MathLiveWrapper.vue +3 -1
- package/components/utils/TinyMCEWrapper.vue +65 -18
- package/components/utils/glossary/CourseGlossary.vue +16 -3
- package/components/utils/glossary/CourseGlossaryForm.vue +2 -0
- package/components/utils/glossary/GlossaryToolTip.vue +2 -2
- package/config/tinymce.config.ts +313 -0
- package/helpers/MathHelper.ts +1 -1
- package/helpers/tinymce/plugin.ts +32 -25
- package/i18n/en-US/components/settings/image.ts +8 -0
- 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/settings/image.ts +8 -0
- 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/settings/image.ts +8 -0
- 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 +7 -2
- package/pages/plugins/tinymce/_plugin.vue +79 -0
- package/plugin.js +25 -28
- package/test/Pages/Plugins/TinyMce.spec.js +23 -0
- package/test/__mocks__/componentsMock.js +1 -13
- package/test/mocks.js +1 -0
- package/.idea/codeStyles/Project.xml +0 -58
- package/.idea/codeStyles/codeStyleConfig.xml +0 -5
- package/.idea/inspectionProfiles/Project_Default.xml +0 -6
- package/.idea/modules.xml +0 -8
- package/.idea/php-docker-settings.xml +0 -24
- package/.idea/php.xml +0 -19
- package/.idea/vcs.xml +0 -6
- package/.idea/watcherTasks.xml +0 -4
- package/.idea/windward-ui-plugin-core.iml +0 -8
- package/.vscode/settings.json +0 -3
- package/config/tinymce.config.js +0 -136
- package/coverage/clover.xml +0 -223
- package/coverage/coverage-final.json +0 -16
- package/coverage/lcov-report/base.css +0 -224
- package/coverage/lcov-report/block-navigation.js +0 -87
- package/coverage/lcov-report/components/Content/Blocks/Accordion.vue.html +0 -430
- package/coverage/lcov-report/components/Content/Blocks/Image.vue.html +0 -394
- package/coverage/lcov-report/components/Content/Blocks/Math.vue.html +0 -262
- package/coverage/lcov-report/components/Content/Blocks/RichText.vue.html +0 -295
- package/coverage/lcov-report/components/Content/Blocks/Tab.vue.html +0 -415
- package/coverage/lcov-report/components/Content/Blocks/Table.vue.html +0 -667
- package/coverage/lcov-report/components/Content/Blocks/Video.vue.html +0 -2275
- package/coverage/lcov-report/components/Content/Blocks/index.html +0 -206
- package/coverage/lcov-report/components/utils/ContentViewer.vue.html +0 -199
- package/coverage/lcov-report/components/utils/MathExpressionEditor.vue.html +0 -919
- package/coverage/lcov-report/components/utils/MathLiveWrapper.vue.html +0 -343
- package/coverage/lcov-report/components/utils/TinyMCEWrapper.vue.html +0 -271
- package/coverage/lcov-report/components/utils/index.html +0 -161
- package/coverage/lcov-report/config/index.html +0 -116
- package/coverage/lcov-report/config/tinymce.config.js.html +0 -493
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/helpers/MathHelper.ts.html +0 -793
- package/coverage/lcov-report/helpers/index.html +0 -116
- package/coverage/lcov-report/helpers/tinymce/index.html +0 -116
- package/coverage/lcov-report/helpers/tinymce/plugin.ts.html +0 -334
- package/coverage/lcov-report/index.html +0 -191
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -2
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -196
- package/coverage/lcov-report/test/index.html +0 -116
- package/coverage/lcov-report/test/mocks.js.html +0 -457
- package/coverage/lcov.info +0 -403
- package/lib/helpers/GlossaryHelper.d.ts +0 -9
- package/lib/helpers/GlossaryHelper.js +0 -118
- package/lib/helpers/GlossaryTerm.d.ts +0 -10
- package/lib/helpers/GlossaryTerm.js +0 -22
- package/lib/helpers/MathHelper.d.ts +0 -99
- package/lib/helpers/MathHelper.js +0 -194
- package/lib/helpers/tinymce/plugin.d.ts +0 -2
- package/lib/helpers/tinymce/plugin.js +0 -86
- package/lib/i18n/en-US/components/content/blocks/image.d.ts +0 -6
- package/lib/i18n/en-US/components/content/blocks/image.js +0 -7
- package/lib/i18n/en-US/components/content/blocks/index.d.ts +0 -75
- package/lib/i18n/en-US/components/content/blocks/index.js +0 -14
- package/lib/i18n/en-US/components/content/blocks/tab.d.ts +0 -5
- package/lib/i18n/en-US/components/content/blocks/tab.js +0 -6
- package/lib/i18n/en-US/components/content/blocks/table.d.ts +0 -5
- package/lib/i18n/en-US/components/content/blocks/table.js +0 -6
- package/lib/i18n/en-US/components/content/blocks/user_upload.d.ts +0 -13
- package/lib/i18n/en-US/components/content/blocks/user_upload.js +0 -14
- package/lib/i18n/en-US/components/content/blocks/video.d.ts +0 -48
- package/lib/i18n/en-US/components/content/blocks/video.js +0 -49
- package/lib/i18n/en-US/components/content/index.d.ts +0 -77
- package/lib/i18n/en-US/components/content/index.js +0 -6
- package/lib/i18n/en-US/components/index.d.ts +0 -140
- package/lib/i18n/en-US/components/index.js +0 -12
- package/lib/i18n/en-US/components/navigation/image.d.ts +0 -5
- package/lib/i18n/en-US/components/navigation/image.js +0 -6
- package/lib/i18n/en-US/components/navigation/index.d.ts +0 -10
- package/lib/i18n/en-US/components/navigation/index.js +0 -8
- package/lib/i18n/en-US/components/navigation/user_upload.d.ts +0 -4
- package/lib/i18n/en-US/components/navigation/user_upload.js +0 -5
- package/lib/i18n/en-US/components/settings/clickable_icon.d.ts +0 -6
- package/lib/i18n/en-US/components/settings/clickable_icon.js +0 -7
- package/lib/i18n/en-US/components/settings/image.d.ts +0 -2
- package/lib/i18n/en-US/components/settings/image.js +0 -3
- package/lib/i18n/en-US/components/settings/index.d.ts +0 -39
- package/lib/i18n/en-US/components/settings/index.js +0 -14
- package/lib/i18n/en-US/components/settings/text_editor.d.ts +0 -8
- package/lib/i18n/en-US/components/settings/text_editor.js +0 -9
- package/lib/i18n/en-US/components/settings/user_upload.d.ts +0 -12
- package/lib/i18n/en-US/components/settings/user_upload.js +0 -13
- package/lib/i18n/en-US/components/settings/video.d.ts +0 -13
- package/lib/i18n/en-US/components/settings/video.js +0 -14
- package/lib/i18n/en-US/components/utils/index.d.ts +0 -15
- package/lib/i18n/en-US/components/utils/index.js +0 -6
- package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.d.ts +0 -13
- package/lib/i18n/en-US/components/utils/tiny_mce_wrapper.js +0 -14
- package/lib/i18n/en-US/index.d.ts +0 -197
- package/lib/i18n/en-US/index.js +0 -16
- package/lib/i18n/en-US/modules/index.d.ts +0 -2
- package/lib/i18n/en-US/modules/index.js +0 -6
- package/lib/i18n/en-US/pages/glossary.d.ts +0 -8
- package/lib/i18n/en-US/pages/glossary.js +0 -9
- package/lib/i18n/en-US/pages/index.d.ts +0 -13
- package/lib/i18n/en-US/pages/index.js +0 -8
- package/lib/i18n/en-US/pages/user_upload.d.ts +0 -4
- package/lib/i18n/en-US/pages/user_upload.js +0 -5
- package/lib/i18n/en-US/shared/content_blocks.d.ts +0 -20
- package/lib/i18n/en-US/shared/content_blocks.js +0 -21
- package/lib/i18n/en-US/shared/index.d.ts +0 -39
- package/lib/i18n/en-US/shared/index.js +0 -10
- package/lib/i18n/en-US/shared/menu.d.ts +0 -4
- package/lib/i18n/en-US/shared/menu.js +0 -5
- package/lib/i18n/en-US/shared/settings.d.ts +0 -15
- package/lib/i18n/en-US/shared/settings.js +0 -16
- package/lib/i18n/en-US.d.ts +0 -197
- package/lib/i18n/en-US.js +0 -15
- package/lib/models/UserFileAsset.d.ts +0 -5
- package/lib/models/UserFileAsset.js +0 -37
|
@@ -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>
|
|
@@ -8,18 +8,7 @@
|
|
|
8
8
|
)
|
|
9
9
|
}}
|
|
10
10
|
</v-card-title>
|
|
11
|
-
|
|
12
|
-
<math-live-wrapper
|
|
13
|
-
ref="mathfield"
|
|
14
|
-
v-model="formula"
|
|
15
|
-
:id="mathElementId"
|
|
16
|
-
:options="options"
|
|
17
|
-
:value="value"
|
|
18
|
-
@change="submit"
|
|
19
|
-
></math-live-wrapper>
|
|
20
|
-
</v-card-text>
|
|
21
|
-
</v-card>
|
|
22
|
-
<v-card>
|
|
11
|
+
|
|
23
12
|
<v-card-text>
|
|
24
13
|
<v-tabs
|
|
25
14
|
v-model="tab"
|
|
@@ -29,9 +18,7 @@
|
|
|
29
18
|
show-arrows
|
|
30
19
|
>
|
|
31
20
|
<v-tabs-slider color="primary"></v-tabs-slider>
|
|
32
|
-
|
|
33
|
-
{{ $t('shared.accessibility.accessibility') }}</v-tab
|
|
34
|
-
>
|
|
21
|
+
|
|
35
22
|
<v-tab
|
|
36
23
|
v-for="(keyboard, index) in config.buttons.groups"
|
|
37
24
|
:key="index"
|
|
@@ -41,80 +28,85 @@
|
|
|
41
28
|
</v-tabs>
|
|
42
29
|
|
|
43
30
|
<v-tabs-items v-model="tab">
|
|
44
|
-
<v-tab-item>
|
|
45
|
-
<v-card-text>
|
|
46
|
-
<v-container>
|
|
47
|
-
<v-row align="center">
|
|
48
|
-
<v-checkbox
|
|
49
|
-
v-model="spokenTextChanged"
|
|
50
|
-
hide-details
|
|
51
|
-
class="shrink mr-2 mt-0"
|
|
52
|
-
></v-checkbox>
|
|
53
|
-
<v-textarea
|
|
54
|
-
v-model="spokenText"
|
|
55
|
-
:disabled="!spokenTextChanged"
|
|
56
|
-
:label="
|
|
57
|
-
$t(
|
|
58
|
-
'shared.accessibility.set_aria_label_text'
|
|
59
|
-
)
|
|
60
|
-
"
|
|
61
|
-
class="col-md-12"
|
|
62
|
-
@input="submit"
|
|
63
|
-
></v-textarea>
|
|
64
|
-
</v-row>
|
|
65
|
-
</v-container>
|
|
66
|
-
|
|
67
|
-
<br />
|
|
68
|
-
<v-btn
|
|
69
|
-
primary
|
|
70
|
-
color="success"
|
|
71
|
-
@click="setSRText"
|
|
72
|
-
:class="fontSize"
|
|
73
|
-
>{{ $t('shared.accessibility.default_text') }}
|
|
74
|
-
</v-btn>
|
|
75
|
-
<v-btn
|
|
76
|
-
:disabled="spokenTextChanged"
|
|
77
|
-
color="primary"
|
|
78
|
-
:class="fontSize"
|
|
79
|
-
@click="readSRText"
|
|
80
|
-
>{{
|
|
81
|
-
$t(
|
|
82
|
-
'shared.accessibility.read_default_aria_label_text'
|
|
83
|
-
)
|
|
84
|
-
}}</v-btn
|
|
85
|
-
>
|
|
86
|
-
</v-card-text>
|
|
87
|
-
</v-tab-item>
|
|
88
31
|
<v-tab-item
|
|
89
32
|
v-for="(keyboard, index) in config.buttons.groups"
|
|
90
33
|
:key="index"
|
|
91
34
|
>
|
|
92
|
-
<v-
|
|
93
|
-
<
|
|
94
|
-
<v-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
button.text
|
|
108
|
-
)
|
|
109
|
-
"
|
|
110
|
-
></div>
|
|
111
|
-
</button>
|
|
112
|
-
</v-btn-toggle>
|
|
113
|
-
</v-container>
|
|
114
|
-
</v-card-text>
|
|
115
|
-
</v-card>
|
|
35
|
+
<v-container>
|
|
36
|
+
<div class="flex-wrap col-12">
|
|
37
|
+
<v-btn
|
|
38
|
+
:min-height="index < 4 ? 40 : 60"
|
|
39
|
+
v-for="(
|
|
40
|
+
button, buttonIndex
|
|
41
|
+
) in keyboard.buttons"
|
|
42
|
+
:key="buttonIndex"
|
|
43
|
+
class="btn"
|
|
44
|
+
@click="insert(button)"
|
|
45
|
+
v-html="convertLatexToMarkup(button.text)"
|
|
46
|
+
>
|
|
47
|
+
</v-btn>
|
|
48
|
+
</div>
|
|
49
|
+
</v-container>
|
|
116
50
|
</v-tab-item>
|
|
117
51
|
</v-tabs-items>
|
|
52
|
+
|
|
53
|
+
<math-live-wrapper
|
|
54
|
+
ref="mathfield"
|
|
55
|
+
v-model="formula"
|
|
56
|
+
:id="mathElementId"
|
|
57
|
+
:options="options"
|
|
58
|
+
:value="value"
|
|
59
|
+
@change="submit"
|
|
60
|
+
></math-live-wrapper>
|
|
61
|
+
<br />
|
|
62
|
+
<v-container>
|
|
63
|
+
<v-row align="center">
|
|
64
|
+
<v-switch
|
|
65
|
+
v-model="spokenTextChanged"
|
|
66
|
+
:label="
|
|
67
|
+
$t(
|
|
68
|
+
'windward.core.components.utils.math_expression_editor.custom_screen_reader_text'
|
|
69
|
+
)
|
|
70
|
+
"
|
|
71
|
+
hide-details
|
|
72
|
+
class="shrink mr-2 mt-0"
|
|
73
|
+
></v-switch>
|
|
74
|
+
<v-textarea
|
|
75
|
+
v-model="spokenText"
|
|
76
|
+
:disabled="!spokenTextChanged"
|
|
77
|
+
:label="
|
|
78
|
+
$t(
|
|
79
|
+
'windward.core.components.utils.math_expression_editor.screen_reader_text'
|
|
80
|
+
)
|
|
81
|
+
"
|
|
82
|
+
class="col-md-12"
|
|
83
|
+
@input="submit"
|
|
84
|
+
></v-textarea>
|
|
85
|
+
</v-row>
|
|
86
|
+
</v-container>
|
|
87
|
+
|
|
88
|
+
<br />
|
|
89
|
+
<v-row class="float-right">
|
|
90
|
+
<v-btn
|
|
91
|
+
primary
|
|
92
|
+
color="success"
|
|
93
|
+
@click="setSRText"
|
|
94
|
+
:class="fontSize"
|
|
95
|
+
>{{
|
|
96
|
+
$t(
|
|
97
|
+
'windward.core.components.utils.math_expression_editor.default_screen_reader_text'
|
|
98
|
+
)
|
|
99
|
+
}}
|
|
100
|
+
</v-btn>
|
|
101
|
+
|
|
102
|
+
<v-btn color="primary" :class="fontSize" @click="readSRText"
|
|
103
|
+
>{{
|
|
104
|
+
$t(
|
|
105
|
+
'windward.core.components.utils.math_expression_editor.read_text_aloud'
|
|
106
|
+
)
|
|
107
|
+
}}
|
|
108
|
+
</v-btn>
|
|
109
|
+
</v-row>
|
|
118
110
|
</v-card-text>
|
|
119
111
|
</v-card>
|
|
120
112
|
</div>
|
|
@@ -141,8 +133,8 @@ export default {
|
|
|
141
133
|
spokenTextChanged: false,
|
|
142
134
|
options: {
|
|
143
135
|
smartFence: true,
|
|
144
|
-
smartMode:
|
|
145
|
-
virtualKeyboardMode: '
|
|
136
|
+
smartMode: false,
|
|
137
|
+
virtualKeyboardMode: 'auto',
|
|
146
138
|
keypressSound: 'none',
|
|
147
139
|
plonkSound: 'none',
|
|
148
140
|
readOnly: false,
|
|
@@ -268,7 +260,12 @@ export default {
|
|
|
268
260
|
this.spokenText = this.convertLatexToSpeakableText(this.formula)
|
|
269
261
|
},
|
|
270
262
|
readSRText() {
|
|
271
|
-
this
|
|
263
|
+
if (!this.spokenText) {
|
|
264
|
+
this.$refs.mathfield.executeCommand('speak')
|
|
265
|
+
} else {
|
|
266
|
+
const utterance = new SpeechSynthesisUtterance(this.spokenText)
|
|
267
|
+
speechSynthesis.speak(utterance)
|
|
268
|
+
}
|
|
272
269
|
},
|
|
273
270
|
},
|
|
274
271
|
}
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
<div>
|
|
3
|
+
<div class="included">
|
|
4
|
+
<editor
|
|
5
|
+
:key="seed + config.skin"
|
|
6
|
+
v-model="text"
|
|
7
|
+
initial-value=""
|
|
8
|
+
:api-key="api_key"
|
|
9
|
+
:init="config"
|
|
10
|
+
tag-name="div"
|
|
11
|
+
model-events="change keydown blur focus mouseDown paste input submit SetContent"
|
|
12
|
+
@onfocus="onEditorFocus"
|
|
13
|
+
>
|
|
14
|
+
</editor>
|
|
15
|
+
</div>
|
|
16
|
+
<v-btn-toggle dense multiple class="pt-1 d-flex justify-end">
|
|
17
|
+
<v-btn v-if="render" color="primary" @click="onClickCollapse">{{
|
|
18
|
+
$t('windward.core.components.utils.tiny_mce_wrapper.minimize')
|
|
19
|
+
}}</v-btn>
|
|
20
|
+
</v-btn-toggle>
|
|
21
|
+
</div>
|
|
12
22
|
</template>
|
|
13
23
|
|
|
14
24
|
<script>
|
|
@@ -41,13 +51,10 @@ export default {
|
|
|
41
51
|
},
|
|
42
52
|
beforeMount() {
|
|
43
53
|
this.text = this.value
|
|
44
|
-
if (this.height !== null) {
|
|
45
|
-
this.config.height = this.height
|
|
46
|
-
}
|
|
47
54
|
},
|
|
48
55
|
data() {
|
|
49
56
|
return {
|
|
50
|
-
render:
|
|
57
|
+
render: false,
|
|
51
58
|
text: '',
|
|
52
59
|
seed: Crypto.id(),
|
|
53
60
|
}
|
|
@@ -58,12 +65,38 @@ export default {
|
|
|
58
65
|
},
|
|
59
66
|
},
|
|
60
67
|
computed: {
|
|
68
|
+
filteredMenubar() {
|
|
69
|
+
if (this.render) {
|
|
70
|
+
return this.menubar
|
|
71
|
+
} else {
|
|
72
|
+
return ''
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
filteredToolbar() {
|
|
76
|
+
if (this.render) {
|
|
77
|
+
return this.toolbar
|
|
78
|
+
} else {
|
|
79
|
+
return ''
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
filteredHeight() {
|
|
83
|
+
if (!this.render) {
|
|
84
|
+
return 50
|
|
85
|
+
} else if (this.height !== null) {
|
|
86
|
+
return this.height
|
|
87
|
+
} else {
|
|
88
|
+
return 500
|
|
89
|
+
}
|
|
90
|
+
},
|
|
61
91
|
config() {
|
|
62
92
|
return {
|
|
63
|
-
height:
|
|
93
|
+
height: this.filteredHeight,
|
|
64
94
|
visual: false,
|
|
65
95
|
forced_root_block: this.root_block,
|
|
66
|
-
menubar: this.
|
|
96
|
+
menubar: this.filteredMenubar,
|
|
97
|
+
browser_spellcheck: true,
|
|
98
|
+
contextmenu: false,
|
|
99
|
+
statusbar: false,
|
|
67
100
|
menu: {
|
|
68
101
|
insert: {
|
|
69
102
|
title: 'Insert',
|
|
@@ -82,9 +115,9 @@ export default {
|
|
|
82
115
|
'advlist autolink lists link charmap',
|
|
83
116
|
'searchreplace visualblocks code fullscreen',
|
|
84
117
|
'anchor insertdatetime ',
|
|
85
|
-
'paste code wordcount table WindwardToolKit
|
|
118
|
+
'paste code wordcount table WindwardToolKit',
|
|
86
119
|
],
|
|
87
|
-
toolbar: this.
|
|
120
|
+
toolbar: this.filteredToolbar,
|
|
88
121
|
table_advtab: false,
|
|
89
122
|
table_cell_advtab: false,
|
|
90
123
|
table_row_advtab: false,
|
|
@@ -252,5 +285,19 @@ export default {
|
|
|
252
285
|
}
|
|
253
286
|
},
|
|
254
287
|
},
|
|
288
|
+
methods: {
|
|
289
|
+
onEditorFocus() {
|
|
290
|
+
if (!this.render) {
|
|
291
|
+
this.seed = Crypto.id()
|
|
292
|
+
this.render = true
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
onClickCollapse() {
|
|
296
|
+
if (this.render) {
|
|
297
|
+
this.seed = Crypto.id()
|
|
298
|
+
this.render = false
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
},
|
|
255
302
|
}
|
|
256
303
|
</script>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
>
|
|
12
12
|
<template #top>
|
|
13
13
|
<v-toolbar flat>
|
|
14
|
-
<
|
|
14
|
+
<DialogBox
|
|
15
15
|
v-model="dialog"
|
|
16
16
|
color="primary"
|
|
17
17
|
max-width="600px"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
v-on="on"
|
|
61
61
|
/>
|
|
62
62
|
</template>
|
|
63
|
-
</
|
|
63
|
+
</DialogBox>
|
|
64
64
|
<v-spacer></v-spacer>
|
|
65
65
|
<v-text-field
|
|
66
66
|
v-model="search"
|
|
@@ -77,7 +77,20 @@
|
|
|
77
77
|
<tr>
|
|
78
78
|
<td>{{ item.term }}</td>
|
|
79
79
|
<td>{{ item.definition }}</td>
|
|
80
|
-
<td>
|
|
80
|
+
<td>
|
|
81
|
+
<v-row>
|
|
82
|
+
<div
|
|
83
|
+
v-for="(
|
|
84
|
+
item, index
|
|
85
|
+
) in item.alternate_forms"
|
|
86
|
+
:key="index"
|
|
87
|
+
>
|
|
88
|
+
<v-chip>
|
|
89
|
+
{{ item }}
|
|
90
|
+
</v-chip>
|
|
91
|
+
</div>
|
|
92
|
+
</v-row>
|
|
93
|
+
</td>
|
|
81
94
|
<td>{{ item.related_term }}</td>
|
|
82
95
|
|
|
83
96
|
<td>
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-form ref="form" v-model="formValid" class="pa-6">
|
|
3
3
|
<v-text-field
|
|
4
|
+
id="glossary-form-term"
|
|
4
5
|
v-model="selectedTerm.term"
|
|
5
6
|
:counter="50"
|
|
6
7
|
:label="$t('windward.core.pages.glossary.term')"
|
|
7
8
|
required
|
|
8
9
|
:rules="validation.termRules"
|
|
10
|
+
:disabled="editMode"
|
|
9
11
|
></v-text-field>
|
|
10
12
|
<br />
|
|
11
13
|
<v-textarea
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
</template>
|
|
19
19
|
<div>
|
|
20
20
|
<div v-if="this.$slots['definition']">
|
|
21
|
-
<
|
|
21
|
+
<h6 class="text-capitalize">
|
|
22
22
|
{{
|
|
23
23
|
$t(
|
|
24
24
|
'windward.core.components.utils.tiny_mce_wrapper.definition'
|
|
25
25
|
)
|
|
26
26
|
}}
|
|
27
27
|
:
|
|
28
|
-
</
|
|
28
|
+
</h6>
|
|
29
29
|
<p>
|
|
30
30
|
<slot name="definition"></slot>
|
|
31
31
|
</p>
|