Commit 168cd8d5 authored by Tristan Cavelier's avatar Tristan Cavelier

Rename some unexplicit var names

parent 9e47449b
...@@ -155,14 +155,14 @@ var jobManager = (function(spec, my) { ...@@ -155,14 +155,14 @@ var jobManager = (function(spec, my) {
* @param {number} id The jio id. * @param {number} id The jio id.
*/ */
priv.removeOldJioId = function(id) { priv.removeOldJioId = function(id) {
var i, jio_id_a, new_a = []; var i, jio_id_array, new_array = [];
jio_id_a = LocalOrCookieStorage.getItem('jio/id_array')||[]; jio_id_array = LocalOrCookieStorage.getItem('jio/id_array')||[];
for (i = 0; i < jio_id_a.length; i+= 1) { for (i = 0; i < jio_id_array.length; i+= 1) {
if (jio_id_a[i] !== id) { if (jio_id_array[i] !== id) {
new_a.push(jio_id_a[i]); new_array.push(jio_id_array[i]);
} }
} }
LocalOrCookieStorage.setItem('jio/id_array',new_a); LocalOrCookieStorage.setItem('jio/id_array',new_array);
LocalOrCookieStorage.deleteItem('jio/id/'+id); LocalOrCookieStorage.deleteItem('jio/id/'+id);
}; };
......
...@@ -4,7 +4,7 @@ var waitStatus = function(spec, my) { ...@@ -4,7 +4,7 @@ var waitStatus = function(spec, my) {
my = my || {}; my = my || {};
// Attributes // // Attributes //
var priv = {}; var priv = {};
priv.job_id_a = spec.job_id_array || []; priv.job_id_array = spec.job_id_array || [];
priv.threshold = 0; priv.threshold = 0;
// Methods // // Methods //
...@@ -22,13 +22,13 @@ var waitStatus = function(spec, my) { ...@@ -22,13 +22,13 @@ var waitStatus = function(spec, my) {
* @method refreshJobIdArray * @method refreshJobIdArray
*/ */
priv.refreshJobIdArray = function() { priv.refreshJobIdArray = function() {
var tmp_job_id_a = [], i; var tmp_job_id_array = [], i;
for (i = 0; i < priv.job_id_a.length; i+= 1) { for (i = 0; i < priv.job_id_array.length; i+= 1) {
if (my.jobManager.jobIdExists(priv.job_id_a[i])) { if (my.jobManager.jobIdExists(priv.job_id_array[i])) {
tmp_job_id_a.push(priv.job_id_a[i]); tmp_job_id_array.push(priv.job_id_array[i]);
} }
} }
priv.job_id_a = tmp_job_id_a; priv.job_id_array = tmp_job_id_array;
}; };
/** /**
...@@ -38,12 +38,12 @@ var waitStatus = function(spec, my) { ...@@ -38,12 +38,12 @@ var waitStatus = function(spec, my) {
*/ */
that.waitForJob = function(job) { that.waitForJob = function(job) {
var i; var i;
for (i = 0; i < priv.job_id_a.length; i+= 1) { for (i = 0; i < priv.job_id_array.length; i+= 1) {
if (priv.job_id_a[i] === job.getId()) { if (priv.job_id_array[i] === job.getId()) {
return; return;
} }
} }
priv.job_id_a.push(job.getId()); priv.job_id_array.push(job.getId());
}; };
/** /**
...@@ -52,13 +52,13 @@ var waitStatus = function(spec, my) { ...@@ -52,13 +52,13 @@ var waitStatus = function(spec, my) {
* @param {object} job The job to stop waiting for. * @param {object} job The job to stop waiting for.
*/ */
that.dontWaitForJob = function(job) { that.dontWaitForJob = function(job) {
var i, tmp_job_id_a = []; var i, tmp_job_id_array = [];
for (i = 0; i < priv.job_id_a.length; i+= 1) { for (i = 0; i < priv.job_id_array.length; i+= 1) {
if (priv.job_id_a[i] !== job.getId()){ if (priv.job_id_array[i] !== job.getId()){
tmp_job_id_a.push(priv.job_id_a[i]); tmp_job_id_array.push(priv.job_id_array[i]);
} }
} }
priv.job_id_a = tmp_job_id_a; priv.job_id_array = tmp_job_id_array;
}; };
/** /**
...@@ -80,7 +80,7 @@ var waitStatus = function(spec, my) { ...@@ -80,7 +80,7 @@ var waitStatus = function(spec, my) {
that.canStart = function() { that.canStart = function() {
priv.refreshJobIdArray(); priv.refreshJobIdArray();
return (priv.job_id_a.length === 0 && Date.now() >= priv.threshold); return (priv.job_id_array.length === 0 && Date.now() >= priv.threshold);
}; };
that.canRestart = function() { that.canRestart = function() {
return that.canStart(); return that.canStart();
...@@ -89,7 +89,7 @@ var waitStatus = function(spec, my) { ...@@ -89,7 +89,7 @@ var waitStatus = function(spec, my) {
that.serialized = function() { that.serialized = function() {
return {label:that.getLabel(), return {label:that.getLabel(),
waitfortime:priv.threshold, waitfortime:priv.threshold,
waitforjob:priv.job_id_a}; waitforjob:priv.job_id_array};
}; };
/** /**
......
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