]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Remove extra parentheses 2489/head
authorAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 17 Sep 2018 10:45:18 +0000 (13:45 +0300)
committerAlexander Moisseev <moiseev@mezonplus.ru>
Mon, 17 Sep 2018 10:45:18 +0000 (13:45 +0300)
interface/js/app/config.js
interface/js/app/graph.js
interface/js/app/history.js
interface/js/app/rspamd.js
interface/js/app/symbols.js

index 58132dc41de9906de3b7fb5f04d749129b41e36c..5ab24f9ef3b46f47641ad49ddd72416915dc2523 100644 (file)
@@ -145,7 +145,7 @@ define(["jquery"],
                     var $tbody = $("<tbody>");
 
                     $.each(data, function (i, item) {
-                        var label = ((item.editable === false || rspamd.read_only))
+                        var label = (item.editable === false || rspamd.read_only)
                             ? "<span class=\"label label-default\">Read</span>"
                             : "<span class=\"label label-default\">Read</span>&nbsp;<span class=\"label label-success\">Write</span>";
                         var $tr = $("<tr>");
@@ -179,7 +179,7 @@ define(["jquery"],
                     success: function (data) {
                         var disabled = "";
                         var text = data[0].data;
-                        if ((item.editable === false || rspamd.read_only)) {
+                        if (item.editable === false || rspamd.read_only) {
                             disabled = "disabled=\"disabled\"";
                         }
 
index 319ccda9e8f425b259ccab34a35f876e009c1d1d..bdd4da3fb3bcc943ed9e79e4a32880716fa7f599 100644 (file)
@@ -244,7 +244,7 @@ define(["jquery", "d3evolution", "footable"],
                                     action.map(function (d, i) {
                                         return {
                                             x: d.x,
-                                            y: ((res[j][i].y === null) ? d.y : res[j][i].y + d.y)
+                                            y: (res[j][i].y === null) ? d.y : res[j][i].y + d.y
                                         };
                                     })
                                 );
index 21a6edfc0ef2cec972c2495a03da1494a862e76e..1aab72456cf799a5d1078cfd1820fb4d4818d685 100644 (file)
@@ -45,7 +45,7 @@ define(["jquery", "footable", "humanize"],
         var symbolDescriptions = {};
 
         var escapeHTML = function (string) {
-            return (String(string)).replace(htmlEscaper, function (match) {
+            return String(string).replace(htmlEscaper, function (match) {
                 return htmlEscapes[match];
             });
         };
@@ -83,7 +83,7 @@ define(["jquery", "footable", "humanize"],
                         });
                         break;
                     default:
-                        if (typeof (item[prop]) === "string") {
+                        if (typeof item[prop] === "string") {
                             item[prop] = escapeHTML(item[prop]);
                         }
                 }
index ecd82aad5b9977ffc7081b2dbb4dd295db14a61d..1d41bd85b978d5c93ceeb4a29cf04d458e9bb6ae 100644 (file)
@@ -210,7 +210,7 @@ function ($, D3pie, visibility, NProgress, tab_stat, tab_graph, tab_config,
                 function errorMessage() {
                     alertMessage("alert-error", neighbours_status[ind].name + " > " +
                         (o.errorMessage ? o.errorMessage : "Request failed") +
-                        (errorThrown ? (": " + errorThrown) : ""));
+                        (errorThrown ? ": " + errorThrown : ""));
                 }
                 if (o.error) {
                     o.error(neighbours_status[ind],
index 4902efd172056d4051a2284128e84a4264ffbd53..327fb3bf2f46d039833def1dcc2ed6db73a4aa3a 100644 (file)
@@ -59,8 +59,8 @@ define(["jquery", "footable"],
             });
         }
         function decimalStep(number) {
-            var digits = ((Number(number)).toFixed(20)).replace(/^-?\d*\.?|0+$/g, "").length;
-            return (digits === 0 || digits > 4) ? 0.1 : 1.0 / (Math.pow(10, digits));
+            var digits = Number(number).toFixed(20).replace(/^-?\d*\.?|0+$/g, "").length;
+            return (digits === 0 || digits > 4) ? 0.1 : 1.0 / Math.pow(10, digits);
         }
         function process_symbols_data(data) {
             var items = [];