Commit cc2fbe03 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_web: Make JSLint happy (fix minor sintaxes)

parent 8fcaaa5c
......@@ -78,15 +78,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
now = new Date(),
context = $(this);
// 5 minute for computer. 1 day for instance.
if (/#access/.test(data.text) & /computer_module/.test(data['@document']) & (now - created_at < 300000)) {
if (/#access/.test(data.text) & (/computer_module/.test(data['@document'])) & (now - created_at < 300000)) {
$(this).attr("class", "monitoring_ok")
.attr("title", data.text + " (" + created_at + ")" )
.attr("href", data['@document']);
} else if (/#access/.test(data.text) & /software_instance_module/.test(data['@document']) & (now - created_at < 86400000)) {
} else if (/#access/.test(data.text) & (/software_instance_module/.test(data['@document'])) & (now - created_at < 86400000)) {
$(this).attr("class", "monitoring_ok")
.attr("title", data.text + " (" + created_at + ")" )
.attr("href", data['@document']);
} else if (/#access/.test(data.text) & /software_installation_module/.test(data['@document']) & (now - created_at < 86400000)) {
} else if (/#access/.test(data.text) & (/software_installation_module/.test(data['@document'])) & (now - created_at < 86400000)) {
$(this).attr("class", "monitoring_ok")
.attr("title", data.text + " (" + created_at + ")" )
.attr("href", data['@document']);
......@@ -133,7 +133,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
var status_url = result_list[i],
status_id,
status_context;
status_id = encodeURIComponent(Base61.encode(status_url)),
status_id = encodeURIComponent(Base61.encode(status_url));
status_context = $(this).find('#' + status_id);
if (!status_context[0]) {
status_context = $(this).append('<li><a class="check_monitoring" id="' + status_id + '" data-url="' + encodeURIComponent(status_url) + '"></a></li>')
......
......@@ -45,7 +45,7 @@
if (e.target.status >= 400) {
return reject(e);
}
resolve(e);
return resolve(e);
});
xhr.addEventListener("error", reject);
xhr.addEventListener("progress", notify);
......@@ -247,4 +247,4 @@
runAll();
}(document, RSVP, XMLHttpRequest));
\ No newline at end of file
}(document, RSVP, XMLHttpRequest));
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