]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Remove prev form when clicking outside the modal 3132/head
authorAndré Peters <andre.peters@debinux.de>
Sat, 2 Nov 2019 07:40:37 +0000 (08:40 +0100)
committerGitHub <noreply@github.com>
Sat, 2 Nov 2019 07:40:37 +0000 (08:40 +0100)
1. Function is triggered by click on close button **and** by clicking anywhere outside the modal to close it.
2. Form is being removed instead of hidden.

interface/js/app/config.js

index 701640f9155369c98f4797150c7d0cbe0d09af18..2e0b955cbc78f43b24d0b02ce440d2e050843ba5 100644 (file)
@@ -203,8 +203,8 @@ define(["jquery"],
                 return false;
             });
             // close modal without saving
-            $("[data-dismiss=\"modal\"]").on("click", function () {
-                $("#modalBody form").hide();
+            $("#modalDialog").on('hidden.bs.modal', function () {
+              $("#modalBody form").remove();
             });
             // @save forms from modal
             function saveMap(server) {