From 6b9f92c56a651178b9f03bdc3c3f6833cdf0c60a Mon Sep 17 00:00:00 2001 From: moisseev Date: Sat, 18 Jul 2020 18:32:34 +0300 Subject: [Minor] Fix maps list layout --- interface/js/app/config.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'interface/js/app/config.js') diff --git a/interface/js/app/config.js b/interface/js/app/config.js index 2c65bfff1..8b391582b 100644 --- a/interface/js/app/config.js +++ b/interface/js/app/config.js @@ -137,12 +137,13 @@ define(["jquery", "codejar", "linenumbers", "prism"], var $tbody = $(""); $.each(data, function (i, item) { - var label = (item.editable === false || rspamd.read_only) - ? "Read" - : "Read Write"; - var $tr = $(""); - $("" + label + "").appendTo($tr); - var $span = $("" + item.uri + "").data("item", item); + var $td = 'Read'; + if (!(item.editable === false || rspamd.read_only)) { + $td = $($td).append(' Write'); + } + var $tr = $("").append($td); + + var $span = $('' + item.uri + "").data("item", item); $span.wrap("").parent().appendTo($tr); $("" + item.description + "").appendTo($tr); $tr.appendTo($tbody); -- cgit v1.2.3