case 4227
This commit is contained in:
@@ -111,15 +111,15 @@
|
||||
>
|
||||
<v-edit-dialog
|
||||
large
|
||||
:return-value.sync="props.item.display"
|
||||
:cancel-text="$ay.t('Cancel')"
|
||||
:save-text="$ay.t('OK')"
|
||||
@save="saveItem()"
|
||||
@open="openEditDialog(props.item)"
|
||||
>
|
||||
{{ props.item.display }}
|
||||
<template v-slot:input>
|
||||
<v-text-field
|
||||
v-model="props.item.display"
|
||||
v-model="editText"
|
||||
dense
|
||||
single-line
|
||||
></v-text-field>
|
||||
@@ -167,7 +167,9 @@ export default {
|
||||
serverError: {}
|
||||
},
|
||||
rights: window.$gz.role.defaultRightsObject(),
|
||||
ayaType: window.$gz.type.Translation
|
||||
ayaType: window.$gz.type.Translation,
|
||||
editItem: {},
|
||||
editText: ""
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -283,11 +285,19 @@ export default {
|
||||
this.replaceDialog = false;
|
||||
},
|
||||
saveItem() {
|
||||
if (this.editText == null || this.editText == "") {
|
||||
return;
|
||||
}
|
||||
this.editItem.display = this.editText;
|
||||
window.$gz.form.setFormState({
|
||||
vm: this,
|
||||
dirty: true
|
||||
});
|
||||
},
|
||||
openEditDialog(item) {
|
||||
this.editItem = item;
|
||||
this.editText = item.display;
|
||||
},
|
||||
canDuplicate: function() {
|
||||
return (
|
||||
this.formState.valid && !this.formState.dirty && this.rights.change
|
||||
|
||||
Reference in New Issue
Block a user