Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Royer
jio
Commits
ac7b32f6
Commit
ac7b32f6
authored
Jan 31, 2014
by
Marco Mariani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed username checking in localstorage, updated jio.js and complex_queries.js
parent
49a12950
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
37 deletions
+9
-37
complex_queries.js
complex_queries.js
+3
-30
jio.js
jio.js
+4
-4
src/jio.storage/localstorage.js
src/jio.storage/localstorage.js
+2
-3
No files found.
complex_queries.js
View file @
ac7b32f6
...
@@ -1363,6 +1363,9 @@ SimpleQuery.prototype.match = function (item, wildcard_character) {
...
@@ -1363,6 +1363,9 @@ SimpleQuery.prototype.match = function (item, wildcard_character) {
object_value
=
item
[
key
];
object_value
=
item
[
key
];
value
=
this
.
value
;
value
=
this
.
value
;
}
}
if
(
object_value
===
undefined
||
value
===
undefined
)
{
return
RSVP
.
resolve
(
false
);
}
return
matchMethod
(
object_value
,
value
,
wildcard_character
);
return
matchMethod
(
object_value
,
value
,
wildcard_character
);
};
};
...
@@ -1406,15 +1409,6 @@ SimpleQuery.prototype["="] = function (object_value, comparison_value,
...
@@ -1406,15 +1409,6 @@ SimpleQuery.prototype["="] = function (object_value, comparison_value,
if
(
typeof
value
===
'
object
'
&&
value
.
hasOwnProperty
(
'
content
'
))
{
if
(
typeof
value
===
'
object
'
&&
value
.
hasOwnProperty
(
'
content
'
))
{
value
=
value
.
content
;
value
=
value
.
content
;
}
}
if
(
comparison_value
===
undefined
)
{
if
(
value
===
undefined
)
{
return
RSVP
.
resolve
(
true
);
}
return
RSVP
.
resolve
(
false
);
}
if
(
value
===
undefined
)
{
return
RSVP
.
resolve
(
false
);
}
if
(
value
.
cmp
!==
undefined
)
{
if
(
value
.
cmp
!==
undefined
)
{
return
RSVP
.
resolve
(
value
.
cmp
(
comparison_value
,
return
RSVP
.
resolve
(
value
.
cmp
(
comparison_value
,
wildcard_character
)
===
0
);
wildcard_character
)
===
0
);
...
@@ -1451,15 +1445,6 @@ SimpleQuery.prototype["!="] = function (object_value, comparison_value,
...
@@ -1451,15 +1445,6 @@ SimpleQuery.prototype["!="] = function (object_value, comparison_value,
if
(
typeof
value
===
'
object
'
&&
value
.
hasOwnProperty
(
'
content
'
))
{
if
(
typeof
value
===
'
object
'
&&
value
.
hasOwnProperty
(
'
content
'
))
{
value
=
value
.
content
;
value
=
value
.
content
;
}
}
if
(
comparison_value
===
undefined
)
{
if
(
value
===
undefined
)
{
return
RSVP
.
resolve
(
false
);
}
return
RSVP
.
resolve
(
true
);
}
if
(
value
===
undefined
)
{
return
RSVP
.
resolve
(
true
);
}
if
(
value
.
cmp
!==
undefined
)
{
if
(
value
.
cmp
!==
undefined
)
{
return
RSVP
.
resolve
(
value
.
cmp
(
comparison_value
,
return
RSVP
.
resolve
(
value
.
cmp
(
comparison_value
,
wildcard_character
)
!==
0
);
wildcard_character
)
!==
0
);
...
@@ -1493,9 +1478,6 @@ SimpleQuery.prototype["<"] = function (object_value, comparison_value) {
...
@@ -1493,9 +1478,6 @@ SimpleQuery.prototype["<"] = function (object_value, comparison_value) {
if
(
typeof
value
===
'
object
'
&&
value
.
hasOwnProperty
(
'
content
'
))
{
if
(
typeof
value
===
'
object
'
&&
value
.
hasOwnProperty
(
'
content
'
))
{
value
=
value
.
content
;
value
=
value
.
content
;
}
}
if
(
value
===
undefined
||
comparison_value
===
undefined
)
{
return
RSVP
.
resolve
(
false
);
}
if
(
value
.
cmp
!==
undefined
)
{
if
(
value
.
cmp
!==
undefined
)
{
return
RSVP
.
resolve
(
value
.
cmp
(
comparison_value
)
<
0
);
return
RSVP
.
resolve
(
value
.
cmp
(
comparison_value
)
<
0
);
}
}
...
@@ -1520,9 +1502,6 @@ SimpleQuery.prototype["<="] = function (object_value, comparison_value) {
...
@@ -1520,9 +1502,6 @@ SimpleQuery.prototype["<="] = function (object_value, comparison_value) {
if
(
typeof
value
===
'
object
'
&&
value
.
hasOwnProperty
(
'
content
'
))
{
if
(
typeof
value
===
'
object
'
&&
value
.
hasOwnProperty
(
'
content
'
))
{
value
=
value
.
content
;
value
=
value
.
content
;
}
}
if
(
value
===
undefined
||
comparison_value
===
undefined
)
{
return
RSVP
.
resolve
(
false
);
}
if
(
value
.
cmp
!==
undefined
)
{
if
(
value
.
cmp
!==
undefined
)
{
return
RSVP
.
resolve
(
value
.
cmp
(
comparison_value
)
<=
0
);
return
RSVP
.
resolve
(
value
.
cmp
(
comparison_value
)
<=
0
);
}
}
...
@@ -1547,9 +1526,6 @@ SimpleQuery.prototype[">"] = function (object_value, comparison_value) {
...
@@ -1547,9 +1526,6 @@ SimpleQuery.prototype[">"] = function (object_value, comparison_value) {
if
(
typeof
value
===
'
object
'
&&
value
.
hasOwnProperty
(
'
content
'
))
{
if
(
typeof
value
===
'
object
'
&&
value
.
hasOwnProperty
(
'
content
'
))
{
value
=
value
.
content
;
value
=
value
.
content
;
}
}
if
(
value
===
undefined
||
comparison_value
===
undefined
)
{
return
RSVP
.
resolve
(
false
);
}
if
(
value
.
cmp
!==
undefined
)
{
if
(
value
.
cmp
!==
undefined
)
{
return
RSVP
.
resolve
(
value
.
cmp
(
comparison_value
)
>
0
);
return
RSVP
.
resolve
(
value
.
cmp
(
comparison_value
)
>
0
);
}
}
...
@@ -1574,9 +1550,6 @@ SimpleQuery.prototype[">="] = function (object_value, comparison_value) {
...
@@ -1574,9 +1550,6 @@ SimpleQuery.prototype[">="] = function (object_value, comparison_value) {
if
(
typeof
value
===
'
object
'
&&
value
.
hasOwnProperty
(
'
content
'
))
{
if
(
typeof
value
===
'
object
'
&&
value
.
hasOwnProperty
(
'
content
'
))
{
value
=
value
.
content
;
value
=
value
.
content
;
}
}
if
(
value
===
undefined
||
comparison_value
===
undefined
)
{
return
RSVP
.
resolve
(
false
);
}
if
(
value
.
cmp
!==
undefined
)
{
if
(
value
.
cmp
!==
undefined
)
{
return
RSVP
.
resolve
(
value
.
cmp
(
comparison_value
)
>=
0
);
return
RSVP
.
resolve
(
value
.
cmp
(
comparison_value
)
>=
0
);
}
}
...
...
jio.js
View file @
ac7b32f6
...
@@ -2366,8 +2366,6 @@ function enableJobChecker(jio, shared, options) {
...
@@ -2366,8 +2366,6 @@ function enableJobChecker(jio, shared, options) {
// emits 'job:modified', 'job:start', 'job:resolved',
// emits 'job:modified', 'job:start', 'job:resolved',
// 'job:end', 'job:reject' events
// 'job:end', 'job:reject' events
var
i
;
shared
.
job_rule_action_names
=
[
undefined
,
"
ok
"
,
"
wait
"
,
"
update
"
,
"
deny
"
];
shared
.
job_rule_action_names
=
[
undefined
,
"
ok
"
,
"
wait
"
,
"
update
"
,
"
deny
"
];
shared
.
job_rule_actions
=
{
shared
.
job_rule_actions
=
{
...
@@ -2549,6 +2547,8 @@ function enableJobChecker(jio, shared, options) {
...
@@ -2549,6 +2547,8 @@ function enableJobChecker(jio, shared, options) {
}
}
}
}
var
index
;
if
(
options
.
job_management
!==
false
)
{
if
(
options
.
job_management
!==
false
)
{
shared
.
job_rules
=
[{
shared
.
job_rules
=
[{
...
@@ -2588,8 +2588,8 @@ function enableJobChecker(jio, shared, options) {
...
@@ -2588,8 +2588,8 @@ function enableJobChecker(jio, shared, options) {
}
}
if
(
Array
.
isArray
(
options
.
job_rules
))
{
if
(
Array
.
isArray
(
options
.
job_rules
))
{
for
(
i
=
0
;
i
<
options
.
job_rules
.
length
;
i
+=
1
)
{
for
(
i
ndex
=
0
;
index
<
options
.
job_rules
.
length
;
index
+=
1
)
{
addJobRule
(
deepClone
(
options
.
job_rules
[
i
]));
addJobRule
(
deepClone
(
options
.
job_rules
[
i
ndex
]));
}
}
}
}
...
...
src/jio.storage/localstorage.js
View file @
ac7b32f6
...
@@ -124,9 +124,8 @@
...
@@ -124,9 +124,8 @@
* @constructor
* @constructor
*/
*/
function
LocalStorage
(
spec
)
{
function
LocalStorage
(
spec
)
{
if
(
typeof
spec
.
username
!==
'
string
'
&&
!
spec
.
username
)
{
if
(
typeof
spec
.
username
!==
'
string
'
||
spec
.
username
===
''
)
{
throw
new
TypeError
(
"
LocalStorage 'username' must be a string
"
+
throw
new
TypeError
(
"
LocalStorage 'username' must be a non-empty string
"
);
"
which contains more than one character.
"
);
}
}
this
.
_localpath
=
'
jio/localstorage/
'
+
spec
.
username
+
'
/
'
+
(
this
.
_localpath
=
'
jio/localstorage/
'
+
spec
.
username
+
'
/
'
+
(
spec
.
application_name
===
null
||
spec
.
application_name
===
spec
.
application_name
===
null
||
spec
.
application_name
===
...
...
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