From 120f74b8406402e4a108e2c938bf9f6a4cb9be3a Mon Sep 17 00:00:00 2001 From: Alexander Moisseev Date: Sun, 12 Aug 2018 19:16:25 +0300 Subject: [PATCH] [WebUI] Fix maps loading from neighbours --- interface/js/app/config.js | 7 ++++++- interface/js/app/rspamd.js | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/interface/js/app/config.js b/interface/js/app/config.js index 1e0aa2829..2f87525fa 100644 --- a/interface/js/app/config.js +++ b/interface/js/app/config.js @@ -166,9 +166,14 @@ define(["jquery"], }; // @upload edited actions - ui.setup = function (rspamd, checked_server) { + ui.setup = function (rspamd) { // Modal form for maps $(document).on("click", "[data-toggle=\"modal\"]", function () { + function getSelector(id) { + var e = document.getElementById(id); + return e.options[e.selectedIndex].value; + } + var checked_server = getSelector("selSrv"); var item = $(this).data("item"); rspamd.query("getmap", { headers: { diff --git a/interface/js/app/rspamd.js b/interface/js/app/rspamd.js index e983e4074..70f6fbfd5 100644 --- a/interface/js/app/rspamd.js +++ b/interface/js/app/rspamd.js @@ -286,7 +286,7 @@ function ($, d3pie, visibility, tab_stat, tab_graph, tab_config, tabClick("#status_nav"); } }); - tab_config.setup(ui, checked_server); + tab_config.setup(ui); tab_symbols.setup(ui); tab_upload.setup(ui); selData = tab_graph.setup(); -- 2.39.5