File tree Expand file tree Collapse file tree
webapp/src/main/webapp/vue-apps/component-translation-field/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 <template #title >
3131 {{ $t(title) }}
3232 </template >
33- <template v-if =" translations " #content >
33+ <template v-if =" drawer && translations " #content >
3434 <v-form ref =" form" >
3535 <v-row
3636 v-for =" (language, index) in existingLanguages"
3737 :key =" language"
3838 class =" mx-0 mb-0 mt-4 max-width-fit"
3939 no-gutters >
40- <v-col cols =" 8" class =" px-2" >
40+ <v-col : cols =" componentName ? 12 : 8" class =" px-2" >
4141 <v-card
4242 v-if =" richEditor"
4343 class =" text-truncate border-color rounder full-height pe-2 d-flex align-center"
5555 class =" d-flex text-truncate full-width mt-2"
5656 flat />
5757 </v-card >
58+ <component
59+ v-else-if =" componentName"
60+ :is =" componentName"
61+ :name =" `${language}-translation-value`"
62+ :value =" translations[language]"
63+ :autofocus =" language === defaultLanguage && 'autofocus'"
64+ :disabled =" loading"
65+ :rules =" rules || []"
66+ class =" border-box-sizing pt-0"
67+ type =" text"
68+ outlined
69+ dense
70+ @input =" updateValue(language, $event)" />
5871 <v-text-field
5972 v-else
6073 :name =" `${language}-translation-value`"
6881 dense
6982 @input =" updateValue(language, $event)" />
7083 </v-col >
71- <v-col cols =" 4 " >
84+ <v-col : cols =" componentName ? 12 : 4 " :class = " componentName && 'order-first pb-1 px-2' " >
7285 <div class =" d-flex max-width-fit" >
7386 <div class =" flex-grow-1 text-truncate" >
7487 <select
@@ -203,6 +216,10 @@ export default {
203216 type: Boolean ,
204217 default: false
205218 },
219+ componentName: {
220+ type: String ,
221+ default: null
222+ },
206223 },
207224 data : () => ({
208225 drawer: false ,
Original file line number Diff line number Diff line change 116116 :rich-editor-oembed =" richEditorOembed"
117117 :content-link-enabled =" contentLinkEnabled"
118118 :no-expand-icon =" noExpandIcon"
119+ :component-name =" componentName"
119120 :rules =" rules || []"
120121 @input =" emitUpdateValues" />
121122 </div >
@@ -207,6 +208,10 @@ export default {
207208 type: Boolean ,
208209 default: false
209210 },
211+ componentName: {
212+ type: String ,
213+ default: null
214+ },
210215 },
211216 data : () => ({
212217 initialized: false ,
@@ -249,6 +254,7 @@ export default {
249254 watch: {
250255 value: {
251256 immediate: true ,
257+ deep: true ,
252258 handler : function () {
253259 this .setValuesPerLanguage (this .value && JSON .parse (JSON .stringify (this .value )) || {});
254260 const defaultLanguageValue = this .defaultLocale && this .valuesPerLanguage [this .defaultLocale .replace (' _' , ' -' )] || ' ' ;
You can’t perform that action at this time.
0 commit comments