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 | |
parent | d4aaaecfea059bd44fe9d565cfe749bcef997c21 (diff) | |
download | rspamd-6b9f92c56a651178b9f03bdc3c3f6833cdf0c60a.tar.gz rspamd-6b9f92c56a651178b9f03bdc3c3f6833cdf0c60a.zip |
[Minor] Fix maps list layout
-rw-r--r-- | interface/css/rspamd.css | 4 | ||||
-rw-r--r-- | interface/index.html | 2 | ||||
-rw-r--r-- | interface/js/app/config.js | 13 |
3 files changed, 8 insertions, 11 deletions
diff --git a/interface/css/rspamd.css b/interface/css/rspamd.css index d468696dc..6755a160e 100644 --- a/interface/css/rspamd.css +++ b/interface/css/rspamd.css @@ -285,10 +285,6 @@ table#symbolsTable input[type="number"] { background-color: #cddbff; } -td.maps-cell { - vertical-align: middle; -} - .map-link { display: block; color: #0088cc; diff --git a/interface/index.html b/interface/index.html index c7b941c7e..163de31aa 100644 --- a/interface/index.html +++ b/interface/index.html @@ -221,7 +221,7 @@ <span class="h6 font-weight-bolder my-2">Lists</span> </div> <div class="card-body nopadding"> - <table class="table table-sm table-hover" id="listMaps"> + <table class="table table-sm table-hover mb-0" id="listMaps"> </table> </div> </div> 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); |