diff options
author | moisseev <moiseev@mezonplus.ru> | 2020-07-18 18:32:34 +0300 |
---|---|---|
committer | moisseev <moiseev@mezonplus.ru> | 2020-07-18 18:32:34 +0300 |
commit | 6b9f92c56a651178b9f03bdc3c3f6833cdf0c60a (patch) | |
tree | 8a03dce96656a484f67fc37ffd26e7f0113fcf15 /interface/js/app/config.js | |
parent | d4aaaecfea059bd44fe9d565cfe749bcef997c21 (diff) | |
download | rspamd-6b9f92c56a651178b9f03bdc3c3f6833cdf0c60a.tar.gz rspamd-6b9f92c56a651178b9f03bdc3c3f6833cdf0c60a.zip |
[Minor] Fix maps list layout
Diffstat (limited to 'interface/js/app/config.js')
-rw-r--r-- | interface/js/app/config.js | 13 |
1 files changed, 7 insertions, 6 deletions
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 = $("<tbody>"); $.each(data, function (i, item) { - var label = (item.editable === false || rspamd.read_only) - ? "<span class=\"badge badge-secondary\">Read</span>" - : "<span class=\"badge badge-secondary\">Read</span> <span class=\"badge badge-success\">Write</span>"; - var $tr = $("<tr>"); - $("<td class=\"col-lg-2 maps-cell\">" + label + "</td>").appendTo($tr); - var $span = $("<span class=\"map-link\" data-toggle=\"modal\" data-target=\"#modalDialog\">" + item.uri + "</span>").data("item", item); + var $td = '<td><span class="badge badge-secondary">Read</span></td>'; + if (!(item.editable === false || rspamd.read_only)) { + $td = $($td).append(' <span class="badge badge-success">Write</span>'); + } + var $tr = $("<tr>").append($td); + + var $span = $('<span class="map-link" data-toggle="modal" data-target="#modalDialog">' + item.uri + "</span>").data("item", item); $span.wrap("<td>").parent().appendTo($tr); $("<td>" + item.description + "</td>").appendTo($tr); $tr.appendTo($tbody); |