diff --git a/public/js/components/Notiz/Notiz.js b/public/js/components/Notiz/Notiz.js index b017b830b..5e4632c84 100644 --- a/public/js/components/Notiz/Notiz.js +++ b/public/js/components/Notiz/Notiz.js @@ -217,6 +217,9 @@ export default { visible: this.showVariables.showId, title: this.$p.t('ui', 'extension_id') }); + cm.getColumnByField('actions').component.updateDefinition({ + title: this.$p.t('global', 'aktionen') + }); } } ], @@ -260,9 +263,15 @@ export default { }, methods: { actionDeleteNotiz(notiz_id) { - this.loadNotiz(notiz_id).then(() => { - this.$refs.deleteNotizModal.show(); - }); + this.loadNotiz(notiz_id); + + this.$fhcAlert + .confirmDelete() + .then(result => result + ? notiz_id + : Promise.reject({handled: true})) + .then(this.deleteNotiz) + .catch(this.$fhcAlert.handleSystemError); }, actionEditNotiz(notiz_id) { this.loadNotiz(notiz_id).then(() => { @@ -305,7 +314,8 @@ export default { formData.append('data', JSON.stringify(this.notizData)); Object.entries(this.notizData.anhang).forEach(([k, v]) => formData.append(k, v)); - //TODO(Manu) formvalidation: inform not working with tinymce textarea + this.$refs.formNotiz.clearValidation(); + return this.endpoint.addNewNotiz(this.$refs.formNotiz, this.id, formData) .then(response => { this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave')); @@ -322,10 +332,8 @@ export default { }, deleteNotiz(notiz_id) { return this.endpoint.deleteNotiz(notiz_id, this.typeId, this.id) - //return this.eost(this.endpoint + 'deleteNotiz/', this.param) .then(result => { this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successDelete')); - this.$refs.deleteNotizModal.hide(); this.reload(); this.resetFormData(); }) @@ -358,7 +366,7 @@ export default { formData.append('data', JSON.stringify(this.notizData)); Object.entries(this.notizData.anhang).forEach(([k, v]) => formData.append(k, v)); - //TODO(Manu) formvalidation: inform not working with tinymce textarea + this.$refs.formNotiz.clearValidation(); return this.endpoint.updateNotiz(this.$refs.formNotiz, notiz_id, formData) .then(response => { this.$fhcAlert.alertSuccess(this.$p.t('ui', 'successSave')); @@ -412,7 +420,7 @@ export default { const vm = this; tinymce.init({ - target: this.$refs.editor, //Important: not selector: to enable multiple import of component + target: this.$refs.editor.$refs.input, //Important: not selector: to enable multiple import of component //height: 800, //plugins: ['lists'], //toolbar: " blocks | bold italic underline | alignleft aligncenter alignright alignjustify", @@ -500,19 +508,9 @@ export default { }, template: `
Notiz wirklich löschen?
- - - - - -Notiz wirklich löschen?
- - - - - -{{$p.t('notiz','notiz_new')}} [{{notizData.typeId}}]
@@ -717,20 +711,29 @@ export default {Notiz wirklich löschen?
- - - - - -Notiz wirklich löschen?
- - - - - -