aboutsummaryrefslogtreecommitdiffstats
path: root/interface
diff options
context:
space:
mode:
authorAlexander Moisseev <moiseev@mezonplus.ru>2018-07-11 11:13:40 +0300
committerAlexander Moisseev <moiseev@mezonplus.ru>2018-07-11 11:45:37 +0300
commit99cf8eafc4f6cae6e6187dfa929da756536dbeb8 (patch)
tree17d63823374c46fabdb1b1106002cc30a57648cd /interface
parentf98d6e900feba2726ea548895b645d9455656d57 (diff)
downloadrspamd-99cf8eafc4f6cae6e6187dfa929da756536dbeb8.tar.gz
rspamd-99cf8eafc4f6cae6e6187dfa929da756536dbeb8.zip
[WebUI] Do not redeclare variables
Diffstat (limited to 'interface')
-rw-r--r--interface/js/app/config.js5
-rw-r--r--interface/js/app/history.js5
2 files changed, 6 insertions, 4 deletions
diff --git a/interface/js/app/config.js b/interface/js/app/config.js
index a64e8f3ab..160061694 100644
--- a/interface/js/app/config.js
+++ b/interface/js/app/config.js
@@ -77,10 +77,11 @@ define(["jquery"],
$tbody = $("<tbody>");
$.each(data, function (i, item) {
+ var label;
if ((item.editable === false || rspamd.read_only)) {
- var label = "<span class=\"label label-default\">Read</span>";
+ label = "<span class=\"label label-default\">Read</span>";
} else {
- var label = "<span class=\"label label-default\">Read</span>&nbsp;<span class=\"label label-success\">Write</span>";
+ label = "<span class=\"label label-default\">Read</span>&nbsp;<span class=\"label label-success\">Write</span>";
}
var $tr = $("<tr>");
$("<td class=\"col-md-2 maps-cell\">" + label + "</td>").appendTo($tr);
diff --git a/interface/js/app/history.js b/interface/js/app/history.js
index 573a21407..b264df67a 100644
--- a/interface/js/app/history.js
+++ b/interface/js/app/history.js
@@ -158,15 +158,16 @@ define(["jquery", "footable", "humanize"],
preprocess_item(item);
Object.keys(item.symbols).map(function (key) {
+ var str;
var sym = item.symbols[key];
if (sym.description) {
- var str = "<strong><abbr data-sym-key=\"" + key + "\">" + sym.name + "</abbr></strong>(" + sym.score + ")";
+ str = "<strong><abbr data-sym-key=\"" + key + "\">" + sym.name + "</abbr></strong>(" + sym.score + ")";
// Store description for tooltip
symbolDescriptions[key] = sym.description;
} else {
- var str = "<strong>" + sym.name + "</strong>(" + sym.score + ")";
+ str = "<strong>" + sym.name + "</strong>(" + sym.score + ")";
}
if (sym.options) {