Commit 6b2655a2 authored by Marco Mariani's avatar Marco Mariani

runner: jslint compliance

parent a3c09a4b
......@@ -37,7 +37,7 @@ function deleteCookie(name, path, domain) {
function setCookie(name, value, expires, path, domain, secure) {
"use strict";
if (getCookie(name) !== null){
if (getCookie(name) !== null) {
deleteCookie(name);
}
if (!expires) {
......
......@@ -44,7 +44,7 @@ function clearAll(setStop) {
running = setStop;
}
function removeFirstLog(){
function removeFirstLog() {
"use strict";
currentLogSize -= parseInt($("#salpgridLog p:first-child").attr('rel'), 10);
$("#salpgridLog p:first-child").remove();
......@@ -52,16 +52,16 @@ function removeFirstLog(){
function getRunningState() {
"use strict";
var size = 0;
var log_info = "";
var param = {
var size = 0,
log_info = "",
param = {
position: logReadingPosition,
log: (processState !== "Checking" && openedlogpage === processType.toLowerCase()) ? openedlogpage : ""
},
jqxhr = $.post(url, param, function (data) {
setRunningState(data);
size = data.content.position - logReadingPosition;
if (logReadingPosition !== 0 && data.content.truncated){
if (logReadingPosition !== 0 && data.content.truncated) {
log_info = "<p class='info' rel='0'>SLAPRUNNER INFO: SLAPGRID-LOG HAS BEEN TRUNCATED HERE. To see full log reload your log page</p>";
}
logReadingPosition = data.content.position;
......@@ -78,18 +78,16 @@ function getRunningState() {
}
processState = running ? "Running" : "Stopped";
currentLogSize += parseInt(size, 10);
if (currentLogSize > maxLogSize){
if (currentLogSize > maxLogSize) {
//Remove the first element into log div
removeFirstLog();
if (currentLogSize > maxLogSize){
if (currentLogSize > maxLogSize) {
removeFirstLog(); //in cas of previous <p/> size is 0
}
}
})
.error(function () {
}).error(function () {
clearAll(false);
})
.complete(function () {
}).complete(function () {
if (running) {
setTimeout(function () {
getRunningState();
......
......@@ -19,11 +19,10 @@ $(document).ready(function () {
send = false,
edit = false,
selection = "",
edit_status = "";
var base_path = function() {
edit_status = "",
base_path = function () {
return softwareDisplay ? projectDir : currentProject;
}
};
function setEditMode(file) {
var i,
......
......@@ -6,5 +6,5 @@
$(document).ready(function () {
"use strict";
$('#fileNavigator').gsFileManager({script: $SCRIPT_ROOT + "/fileBrowser", root:'workspace/'});
$('#fileNavigator').gsFileManager({script: $SCRIPT_ROOT + "/fileBrowser", root: 'workspace/'});
});
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