Mercurial > gemma
changeset 1771:88b8da513944
deactivate delete and edit action during editing
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Fri, 11 Jan 2019 11:33:34 +0100 |
parents | ad9622a3f751 |
children | 70c4dc694d61 |
files | client/src/components/importschedule/Importschedule.vue |
diffstat | 1 files changed, 11 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/client/src/components/importschedule/Importschedule.vue Fri Jan 11 11:23:05 2019 +0100 +++ b/client/src/components/importschedule/Importschedule.vue Fri Jan 11 11:33:34 2019 +0100 @@ -57,6 +57,7 @@ </td> <td> <font-awesome-icon + :style="activeStyle" @click="editSchedule(schedule.id)" icon="pencil-alt" fixed-width @@ -64,6 +65,7 @@ </td> <td> <font-awesome-icon + :style="activeStyle" @click="deleteSchedule(schedule.id)" icon="trash" fixed-width @@ -178,10 +180,15 @@ this.$store.commit("imports/setImportScheduleDetailVisible"); }, deleteSchedule(index) { + if (this.importScheduleDetailVisible) return; this.$store .dispatch("imports/deleteSchedule", index) .then(() => { this.getSchedules(); + displayInfo({ + title: this.$gettext("Imports"), + message: this.$gettext("Deleted import: #") + index + }); }) .catch(error => { const { status, data } = error.response; @@ -195,6 +202,10 @@ computed: { ...mapState("application", ["showSidebar"]), ...mapState("imports", ["schedules", "importScheduleDetailVisible"]), + activeStyle() { + const color = this.importScheduleDetailVisible ? "#aeaeae" : "#000000"; + return { color: color }; + }, spacerStyle() { return [ "spacer ml-3",