From: Alexander Moisseev Date: Sun, 12 Aug 2018 16:16:25 +0000 (+0300) Subject: [WebUI] Fix maps loading from neighbours X-Git-Tag: 1.8.0~271^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=120f74b8406402e4a108e2c938bf9f6a4cb9be3a;p=rspamd.git [WebUI] Fix maps loading from neighbours --- 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();