]> source.dussan.org Git - rspamd.git/commitdiff
[WebUI] Do not redeclare variables
authorAlexander Moisseev <moiseev@mezonplus.ru>
Wed, 11 Jul 2018 08:13:40 +0000 (11:13 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Wed, 11 Jul 2018 08:45:37 +0000 (11:45 +0300)
.eslintrc.json
interface/js/app/config.js
interface/js/app/history.js

index ee10918bb43fd82510ee0e73388744748c939f11..7e3d6f05d4c1f0f1b084c494316a0cd995f49632 100644 (file)
@@ -76,7 +76,6 @@
         "no-loop-func": "off",
         "no-negated-condition": "off",
         "no-param-reassign": "off",
-        "no-redeclare": "off",
         "no-shadow": "off",
         "no-underscore-dangle": "off",
         "no-use-before-define": "off",
index a64e8f3ab1aeb065179434ef3fb745770c07b477..1600616946ce30d7a586b15ae633a1b176f22de0 100644 (file)
@@ -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);
index 573a214072befc53af0ede305f2161fde7a59f9b..b264df67adffec9c9aa43968852ea9d584d330aa 100644 (file)
@@ -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) {