This commit is contained in:
@@ -5,13 +5,14 @@ PRIORITY - ALWAYS Lowest level stuff first, i.e. TODO at server, api route chang
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
todo: Administration - translation
|
todo: Administration - translation
|
||||||
|
|
||||||
- Replace function
|
- Replace function
|
||||||
|
Search and replace
|
||||||
- Export function (download as file I guess)
|
- Export function (download as file I guess)
|
||||||
- Import function
|
On Translation editor form
|
||||||
|
- Import function
|
||||||
|
On Translations list form
|
||||||
|
|
||||||
todo: Translation - check can't delete in use translation
|
|
||||||
|
|
||||||
todo: help links for User, Users, Translations, Translation
|
todo: help links for User, Users, Translations, Translation
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,41 @@
|
|||||||
<v-container fluid>
|
<v-container fluid>
|
||||||
<gz-report-selector ref="reportSelector"></gz-report-selector>
|
<gz-report-selector ref="reportSelector"></gz-report-selector>
|
||||||
<!-- {{ formState }} -->
|
<!-- {{ formState }} -->
|
||||||
|
<v-row justify="center">
|
||||||
|
<v-dialog v-model="replaceDialog" persistent max-width="600px">
|
||||||
|
<v-card>
|
||||||
|
<v-card-title>
|
||||||
|
<span class="headline">{{ $ay.t("FindAndReplace") }}</span>
|
||||||
|
</v-card-title>
|
||||||
|
<v-card-text>
|
||||||
|
<v-container>
|
||||||
|
<v-row>
|
||||||
|
<v-col cols="12">
|
||||||
|
<v-text-field :label="$ay.t('Find')" required></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
bind find and replace to fields so is sticky
|
||||||
|
add OK button bound method to do the replace
|
||||||
|
<v-col cols="12">
|
||||||
|
<v-text-field
|
||||||
|
:label="$ay.t('Replace')"
|
||||||
|
required
|
||||||
|
></v-text-field>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</v-container>
|
||||||
|
</v-card-text>
|
||||||
|
<v-card-actions>
|
||||||
|
<v-spacer></v-spacer>
|
||||||
|
<v-btn color="blue darken-1" text @click="replaceDialog = false">{{
|
||||||
|
$ay.t("Cancel")
|
||||||
|
}}</v-btn>
|
||||||
|
<v-btn color="blue darken-1" text @click="replaceDialog = false">{{
|
||||||
|
$ay.t("OK")
|
||||||
|
}}</v-btn>
|
||||||
|
</v-card-actions>
|
||||||
|
</v-card>
|
||||||
|
</v-dialog>
|
||||||
|
</v-row>
|
||||||
<v-row v-if="formState.ready">
|
<v-row v-if="formState.ready">
|
||||||
<v-col>
|
<v-col>
|
||||||
<v-form ref="form">
|
<v-form ref="form">
|
||||||
@@ -170,6 +205,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
|
formCustomTemplateKey: FORM_CUSTOM_TEMPLATE_KEY,
|
||||||
search: "",
|
search: "",
|
||||||
|
replaceDialog: false,
|
||||||
editingActiveTranslation: false,
|
editingActiveTranslation: false,
|
||||||
obj: {},
|
obj: {},
|
||||||
formState: {
|
formState: {
|
||||||
@@ -449,6 +485,9 @@ async function clickHandler(menuItem) {
|
|||||||
case "save":
|
case "save":
|
||||||
m.vm.submit();
|
m.vm.submit();
|
||||||
break;
|
break;
|
||||||
|
case "replace":
|
||||||
|
m.vm.replaceDialog = true;
|
||||||
|
break;
|
||||||
case "delete":
|
case "delete":
|
||||||
m.vm.remove();
|
m.vm.remove();
|
||||||
break;
|
break;
|
||||||
@@ -566,6 +605,15 @@ function generateMenu(vm) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vm.rights.change && vm.obj.stock != true) {
|
||||||
|
menuOptions.menuItems.push({
|
||||||
|
title: "FindAndReplace",
|
||||||
|
icon: null,
|
||||||
|
key: FORM_KEY + ":replace",
|
||||||
|
vm: vm
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
window.$gz.eventBus.$emit("menu-change", menuOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -589,7 +637,10 @@ async function fetchTranslatedText(vm) {
|
|||||||
"Translation",
|
"Translation",
|
||||||
"Name",
|
"Name",
|
||||||
"TranslationKey",
|
"TranslationKey",
|
||||||
"TranslationDisplayText"
|
"TranslationDisplayText",
|
||||||
|
"FindAndReplace",
|
||||||
|
"Find",
|
||||||
|
"Replace"
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user