changeset 4194:01b846f4eb1e

client: Removed confirm dialog when deleting sections.
author Raimund Renkert <raimund@renkert.org>
date Wed, 14 Aug 2019 14:08:59 +0200
parents dc435fbb2d7a
children ad13c581de7c
files client/src/components/sections/Sections.vue
diffstat 1 files changed, 10 insertions(+), 32 deletions(-) [+]
line wrap: on
line diff
--- a/client/src/components/sections/Sections.vue	Mon Aug 12 15:02:19 2019 +0200
+++ b/client/src/components/sections/Sections.vue	Wed Aug 14 14:08:59 2019 +0200
@@ -192,40 +192,18 @@
         });
     },
     deleteSection(section) {
-      this.$store.commit("application/popup", {
-        icon: "trash",
-        title: this.$gettext("Delete Section"),
-        content:
-          this.$gettext("Do you really want to delete this section:") +
-          `<br>
-        <b>${section.properties.name}, ${
-            section.properties.source_organization
-          } (${section.properties.countries})</b>`,
-        confirm: {
-          label: this.$gettext("Delete"),
-          icon: "trash",
-          callback: () => {
-            HTTP.post("/imports/dsec",
-              {
-                id: section.id.split(".")[1]*1
-              },
-              {
-                headers: { "X-Gemma-Auth": localStorage.getItem("token") }
-              }
-            )
-              .then(response => {
-
-                displayInfo({
-                  title: this.$gettext("Staging Area"),
-                  message: this.$gettext("Deleting ") + section.properties.objnam
-                });
-              })
-          }
+      HTTP.post("/imports/dsec",
+        {
+          id: section.id.split(".")[1]*1
         },
-        cancel: {
-          label: this.$gettext("Cancel"),
-          icon: "times"
+        {
+          headers: { "X-Gemma-Auth": localStorage.getItem("token") }
         }
+      ).then(() => {
+        displayInfo({
+          title: this.$gettext("Staging Area"),
+          message: this.$gettext("Deleting ") + section.properties.objnam
+        });
       });
     },
     moveMapToSection(section) {