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> <span class=\"label label-success\">Write</span>";
var $tr = $("<tr>");
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\"";
}
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
};
})
);
var symbolDescriptions = {};
var escapeHTML = function (string) {
- return (String(string)).replace(htmlEscaper, function (match) {
+ return String(string).replace(htmlEscaper, function (match) {
return htmlEscapes[match];
});
};
});
break;
default:
- if (typeof (item[prop]) === "string") {
+ if (typeof item[prop] === "string") {
item[prop] = escapeHTML(item[prop]);
}
}
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],
});
}
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 = [];