Commit 956750c4 authored by Rafael Monnerat's avatar Rafael Monnerat Committed by Tomáš Peterka

slapos_web: Make JSLint happy (fix minor sintaxes)

parent c9576208
...@@ -78,15 +78,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -78,15 +78,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
now = new Date(), now = new Date(),
context = $(this); context = $(this);
// 5 minute for computer. 1 day for instance. // 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") $(this).attr("class", "monitoring_ok")
.attr("title", data.text + " (" + created_at + ")" ) .attr("title", data.text + " (" + created_at + ")" )
.attr("href", data['@document']); .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") $(this).attr("class", "monitoring_ok")
.attr("title", data.text + " (" + created_at + ")" ) .attr("title", data.text + " (" + created_at + ")" )
.attr("href", data['@document']); .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") $(this).attr("class", "monitoring_ok")
.attr("title", data.text + " (" + created_at + ")" ) .attr("title", data.text + " (" + created_at + ")" )
.attr("href", data['@document']); .attr("href", data['@document']);
...@@ -133,7 +133,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ...@@ -133,7 +133,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
var status_url = result_list[i], var status_url = result_list[i],
status_id, status_id,
status_context; status_context;
status_id = encodeURIComponent(Base61.encode(status_url)), status_id = encodeURIComponent(Base61.encode(status_url));
status_context = $(this).find('#' + status_id); status_context = $(this).find('#' + status_id);
if (!status_context[0]) { if (!status_context[0]) {
status_context = $(this).append('<li><a class="check_monitoring" id="' + status_id + '" data-url="' + encodeURIComponent(status_url) + '"></a></li>') status_context = $(this).append('<li><a class="check_monitoring" id="' + status_id + '" data-url="' + encodeURIComponent(status_url) + '"></a></li>')
......
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
if (e.target.status >= 400) { if (e.target.status >= 400) {
return reject(e); return reject(e);
} }
resolve(e); return resolve(e);
}); });
xhr.addEventListener("error", reject); xhr.addEventListener("error", reject);
xhr.addEventListener("progress", notify); xhr.addEventListener("progress", notify);
......
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