From 5bb5da8dda84638122b83b908927931cf9428965 Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Sat, 21 Jul 2018 18:54:23 +0300 Subject: [PATCH] [WebUI] Remove previously-attached event handlers from save buttons on the "Symbols" tab --- interface/js/app/symbols.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/interface/js/app/symbols.js b/interface/js/app/symbols.js index 75234b09e..548411a6a 100644 --- a/interface/js/app/symbols.js +++ b/interface/js/app/symbols.js @@ -250,11 +250,13 @@ define(["jquery", "footable"], rspamd.alertMessage("alert-modal alert-error", data.statusText); } }); - $(document).on("click", "#symbolsTable :button", function () { - var value = $(this).data("save"); - if (!value) return; - saveSymbols(rspamd, "./savesymbols", "symbolsTable", value === "cluster"); - }); + $("#symbolsTable") + .off("click", ":button") + .on("click", ":button", function () { + var value = $(this).data("save"); + if (!value) return; + saveSymbols(rspamd, "./savesymbols", "symbolsTable", value === "cluster"); + }); }; ui.setup = function (rspamd) { -- 2.39.5