Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
officejs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
officejs
Commits
168cd8d5
Commit
168cd8d5
authored
Jul 30, 2012
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename some unexplicit var names
parent
9e47449b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
22 deletions
+22
-22
OfficeJS/src/jio/jobs/jobManager.js
OfficeJS/src/jio/jobs/jobManager.js
+6
-6
OfficeJS/src/jio/jobs/status/waitStatus.js
OfficeJS/src/jio/jobs/status/waitStatus.js
+16
-16
No files found.
OfficeJS/src/jio/jobs/jobManager.js
View file @
168cd8d5
...
...
@@ -155,14 +155,14 @@ var jobManager = (function(spec, my) {
* @param {number} id The jio id.
*/
priv
.
removeOldJioId
=
function
(
id
)
{
var
i
,
jio_id_a
,
new_a
=
[];
jio_id_a
=
LocalOrCookieStorage
.
getItem
(
'
jio/id_array
'
)
||
[];
for
(
i
=
0
;
i
<
jio_id_a
.
length
;
i
+=
1
)
{
if
(
jio_id_a
[
i
]
!==
id
)
{
new_a
.
push
(
jio_id_a
[
i
]);
var
i
,
jio_id_a
rray
,
new_array
=
[];
jio_id_a
rray
=
LocalOrCookieStorage
.
getItem
(
'
jio/id_array
'
)
||
[];
for
(
i
=
0
;
i
<
jio_id_a
rray
.
length
;
i
+=
1
)
{
if
(
jio_id_a
rray
[
i
]
!==
id
)
{
new_a
rray
.
push
(
jio_id_array
[
i
]);
}
}
LocalOrCookieStorage
.
setItem
(
'
jio/id_array
'
,
new_a
);
LocalOrCookieStorage
.
setItem
(
'
jio/id_array
'
,
new_a
rray
);
LocalOrCookieStorage
.
deleteItem
(
'
jio/id/
'
+
id
);
};
...
...
OfficeJS/src/jio/jobs/status/waitStatus.js
View file @
168cd8d5
...
...
@@ -4,7 +4,7 @@ var waitStatus = function(spec, my) {
my
=
my
||
{};
// Attributes //
var
priv
=
{};
priv
.
job_id_a
=
spec
.
job_id_array
||
[];
priv
.
job_id_a
rray
=
spec
.
job_id_array
||
[];
priv
.
threshold
=
0
;
// Methods //
...
...
@@ -22,13 +22,13 @@ var waitStatus = function(spec, my) {
* @method refreshJobIdArray
*/
priv
.
refreshJobIdArray
=
function
()
{
var
tmp_job_id_a
=
[],
i
;
for
(
i
=
0
;
i
<
priv
.
job_id_a
.
length
;
i
+=
1
)
{
if
(
my
.
jobManager
.
jobIdExists
(
priv
.
job_id_a
[
i
]))
{
tmp_job_id_a
.
push
(
priv
.
job_id_a
[
i
]);
var
tmp_job_id_a
rray
=
[],
i
;
for
(
i
=
0
;
i
<
priv
.
job_id_a
rray
.
length
;
i
+=
1
)
{
if
(
my
.
jobManager
.
jobIdExists
(
priv
.
job_id_a
rray
[
i
]))
{
tmp_job_id_a
rray
.
push
(
priv
.
job_id_array
[
i
]);
}
}
priv
.
job_id_a
=
tmp_job_id_a
;
priv
.
job_id_a
rray
=
tmp_job_id_array
;
};
/**
...
...
@@ -38,12 +38,12 @@ var waitStatus = function(spec, my) {
*/
that
.
waitForJob
=
function
(
job
)
{
var
i
;
for
(
i
=
0
;
i
<
priv
.
job_id_a
.
length
;
i
+=
1
)
{
if
(
priv
.
job_id_a
[
i
]
===
job
.
getId
())
{
for
(
i
=
0
;
i
<
priv
.
job_id_a
rray
.
length
;
i
+=
1
)
{
if
(
priv
.
job_id_a
rray
[
i
]
===
job
.
getId
())
{
return
;
}
}
priv
.
job_id_a
.
push
(
job
.
getId
());
priv
.
job_id_a
rray
.
push
(
job
.
getId
());
};
/**
...
...
@@ -52,13 +52,13 @@ var waitStatus = function(spec, my) {
* @param {object} job The job to stop waiting for.
*/
that
.
dontWaitForJob
=
function
(
job
)
{
var
i
,
tmp_job_id_a
=
[];
for
(
i
=
0
;
i
<
priv
.
job_id_a
.
length
;
i
+=
1
)
{
if
(
priv
.
job_id_a
[
i
]
!==
job
.
getId
()){
tmp_job_id_a
.
push
(
priv
.
job_id_a
[
i
]);
var
i
,
tmp_job_id_a
rray
=
[];
for
(
i
=
0
;
i
<
priv
.
job_id_a
rray
.
length
;
i
+=
1
)
{
if
(
priv
.
job_id_a
rray
[
i
]
!==
job
.
getId
()){
tmp_job_id_a
rray
.
push
(
priv
.
job_id_array
[
i
]);
}
}
priv
.
job_id_a
=
tmp_job_id_a
;
priv
.
job_id_a
rray
=
tmp_job_id_array
;
};
/**
...
...
@@ -80,7 +80,7 @@ var waitStatus = function(spec, my) {
that
.
canStart
=
function
()
{
priv
.
refreshJobIdArray
();
return
(
priv
.
job_id_a
.
length
===
0
&&
Date
.
now
()
>=
priv
.
threshold
);
return
(
priv
.
job_id_a
rray
.
length
===
0
&&
Date
.
now
()
>=
priv
.
threshold
);
};
that
.
canRestart
=
function
()
{
return
that
.
canStart
();
...
...
@@ -89,7 +89,7 @@ var waitStatus = function(spec, my) {
that
.
serialized
=
function
()
{
return
{
label
:
that
.
getLabel
(),
waitfortime
:
priv
.
threshold
,
waitforjob
:
priv
.
job_id_a
};
waitforjob
:
priv
.
job_id_a
rray
};
};
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment