Commit 06393a64 authored by Łukasz Nowak's avatar Łukasz Nowak

erp5_web_monitoring: Apply JSLint

parent 013cb4c1
......@@ -479,7 +479,7 @@
updateGraph(gadget, true);
}
if (evt.target.getAttribute("name") === "graph_auto_update_key") {
if (evt.target.value == "on") {
if (evt.target.value === "on") {
gadget.property_dict.disable_update = false;
} else {
gadget.property_dict.disable_update = true;
......
......@@ -194,8 +194,7 @@
.value.aggregate_reference === undefined) {
// Instance is not Synchronized!
promise_list.push(false);
continue;
}
} else {
gadget_element = document.createElement("div");
element.appendChild(gadget_element);
promise_list.push(
......@@ -206,6 +205,7 @@
)
);
}
}
return RSVP.all(promise_list);
})
.push(function (parameter_gadget_list) {
......
/*global window, rJS, RSVP, Handlebars */
/*global window, rJS, RSVP, Rusha, Handlebars */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, RSVP, Rusha) {
"use strict";
......
......@@ -228,7 +228,7 @@
start;
function addUTCTimezone(date_string) {
if (new RegExp(/[+-][\d]{2}\:?[\d]{2}$/).test(date_string)) {
if (new RegExp(/[+\-][\d]{2}\:?[\d]{2}$/).test(date_string)) {
return date_string;
}
return date_string + "+0000";
......
......@@ -71,7 +71,7 @@
}
return context.getUrlParameter('editable')
.push(function () {
return context.registerSync();
return context.registerSynchronisation();
})
.push(function (editable) {
return context.changeState({
......@@ -273,7 +273,7 @@
window.dispatchEvent(event);
return result;
})
.declareJob('registerSync', function () {
.declareJob('registerSynchronisation', function () {
return this.getDeclaredGadget("sync_gadget")
.push(function (sync_gadget) {
return sync_gadget.register();
......
......@@ -4,7 +4,7 @@
* http://www.gnu.org/licenses/lgpl.html
*/
/*jslint nomen: true */
/*jslint nomen: true, indent: 2, maxerr: 3*/
/*global jIO, RSVP, Rusha, console, Blob */
(function (jIO, RSVP, Rusha, Blob, console) {
......@@ -402,6 +402,15 @@
});
}
function fixDateTimezone(date_string) {
// set default timezone offset to UTC
// XXX should be removed later
if (ZONE_LIST.indexOf(date_string.slice(-5)) === -1) {
return date_string + "+0000";
}
return date_string;
}
function updateHostingSubscriptionState(hosting, element) {
var status = element.status.toUpperCase();
......@@ -410,22 +419,15 @@
}
if (hosting.status === "ERROR") {
return;
} else if (status === "ERROR") {
}
if (status === "ERROR") {
hosting.status = status;
} else if (status === "WARNING") {
hosting.status = status;
} if (status === "OK" && hosting.status !== status) {
hosting.status = status;
}
if (status === "OK" && hosting.status !== status) {
hosting.status = status;
}
function fixDateTimezone(date_string) {
// set default timezone offset to UTC
// XXX should be removed later
if (ZONE_LIST.indexOf(date_string.slice(-5)) === -1) {
return date_string + "+0000";
}
return date_string;
}
function getOpmlTree(context, opml_url, opml_spec, basic_login, opml_title) {
......@@ -702,8 +704,7 @@
name: result_list[i].url,
doc: result_list[i].current_signature
});
}
else if (context._remote_storage_unreachable_status !== undefined) {
} else if (context._remote_storage_unreachable_status !== undefined) {
if (result_list[i].type === "webhttp") {
// In case it was impossible to get software Instance
// Add an empty Software Instance with unreachable status
......
......@@ -4,7 +4,7 @@
* http://www.gnu.org/licenses/lgpl.html
*/
/*jslint nomen: true*/
/*jslint nomen: true, indent: 2, maxerr: 3*/
/*global jIO, RSVP */
(function (jIO, RSVP) {
......
/*global window, rJS, Handlebars */
/*jslint indent: 2, maxerr: 3 */
/*jslint nomen: true, indent: 2, maxerr: 3 */
(function (window, rJS, Handlebars) {
"use strict";
......@@ -22,7 +22,7 @@
return this.changeState(state_dict);
})
.onStateChange(function (modification_dict) {
.onStateChange(function () {
if (this.state.hidded) {
this.element.innerHTML = "";
} else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment