Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jio-main
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
Hardik Juneja
jio-main
Commits
ea446b38
Commit
ea446b38
authored
Dec 21, 2012
by
Sven Franck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
localstorage dumb post
parent
b008e2eb
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
304 additions
and
617 deletions
+304
-617
src/jio.dummystorages.js
src/jio.dummystorages.js
+10
-0
src/jio.storage/localstorage.js
src/jio.storage/localstorage.js
+99
-479
src/jio/commands/command.js
src/jio/commands/command.js
+4
-2
src/jio/commands/putAttachmentCommand.js
src/jio/commands/putAttachmentCommand.js
+2
-1
src/jio/jio.outro.js
src/jio/jio.outro.js
+5
-0
test/jiotests.js
test/jiotests.js
+184
-135
No files found.
src/jio.dummystorages.js
View file @
ea446b38
...
@@ -73,6 +73,16 @@
...
@@ -73,6 +73,16 @@
},
100
);
// 100 ms, for jiotests simple job waiting
},
100
);
// 100 ms, for jiotests simple job waiting
};
// end put
};
// end put
that
.
putAttachment
=
function
(
command
)
{
setTimeout
(
function
()
{
that
.
success
({
ok
:
true
,
id
:
command
.
getDocId
(),
rev
:
generateRevision
(
command
,
"
putAttachment
"
,
true
)
});
},
100
);
// 100 ms, for jiotests simple job waiting
};
// end put
that
.
get
=
function
(
command
)
{
that
.
get
=
function
(
command
)
{
setTimeout
(
function
()
{
setTimeout
(
function
()
{
that
.
success
({
that
.
success
({
...
...
src/jio.storage/localstorage.js
View file @
ea446b38
This diff is collapsed.
Click to expand it.
src/jio/commands/command.js
View file @
ea446b38
...
@@ -26,6 +26,10 @@ var command = function(spec, my) {
...
@@ -26,6 +26,10 @@ var command = function(spec, my) {
// xxx fixed spec.content to spec.doc.content for PUTATTACHMENT
// xxx fixed spec.content to spec.doc.content for PUTATTACHMENT
// xxx need extra check for GET, otherwise spec.doc is undefined
// xxx need extra check for GET, otherwise spec.doc is undefined
console
.
log
(
"
COMMAND
"
);
console
.
log
(
spec
);
console
.
log
(
spec
.
doc
);
console
.
log
(
spec
.
doc
.
content
);
priv
.
content
=
spec
.
doc
===
undefined
?
undefined
:
priv
.
content
=
spec
.
doc
===
undefined
?
undefined
:
typeof
spec
.
doc
.
content
===
'
string
'
?
typeof
spec
.
doc
.
content
===
'
string
'
?
spec
.
doc
.
content
:
spec
.
doc
.
content
:
...
@@ -80,8 +84,6 @@ var command = function(spec, my) {
...
@@ -80,8 +84,6 @@ var command = function(spec, my) {
* @return {object} the document.
* @return {object} the document.
*/
*/
that
.
getDoc
=
function
()
{
that
.
getDoc
=
function
()
{
console
.
log
(
"
where is my doc
"
);
console
.
log
(
priv
.
doc
);
return
priv
.
doc
;
return
priv
.
doc
;
};
};
...
...
src/jio/commands/putAttachmentCommand.js
View file @
ea446b38
...
@@ -11,7 +11,8 @@ var putAttachmentCommand = function(spec, my) {
...
@@ -11,7 +11,8 @@ var putAttachmentCommand = function(spec, my) {
that
.
executeOn
=
function
(
storage
)
{
that
.
executeOn
=
function
(
storage
)
{
storage
.
putAttachment
(
that
);
storage
.
putAttachment
(
that
);
};
};
console
.
log
(
"
putAttachmentCommand
"
);
console
.
log
(
typeof
that
.
getContent
()
);
that
.
validateState
=
function
()
{
that
.
validateState
=
function
()
{
if
(
typeof
that
.
getContent
()
!==
'
string
'
)
{
if
(
typeof
that
.
getContent
()
!==
'
string
'
)
{
that
.
error
({
that
.
error
({
...
...
src/jio/jio.outro.js
View file @
ea446b38
...
@@ -147,6 +147,11 @@
...
@@ -147,6 +147,11 @@
};
};
priv
.
parametersToObject
=
function
(
list
,
default_options
)
{
priv
.
parametersToObject
=
function
(
list
,
default_options
)
{
console
.
log
(
"
aloha
"
);
console
.
log
(
"
what do we have
"
);
console
.
log
(
list
);
console
.
log
(
default_options
);
var
k
,
i
=
0
,
callbacks
=
[],
param
=
{
options
:{}};
var
k
,
i
=
0
,
callbacks
=
[],
param
=
{
options
:{}};
for
(
i
=
0
;
i
<
list
.
length
;
i
+=
1
)
{
for
(
i
=
0
;
i
<
list
.
length
;
i
+=
1
)
{
if
(
typeof
list
[
i
]
===
'
object
'
)
{
if
(
typeof
list
[
i
]
===
'
object
'
)
{
...
...
test/jiotests.js
View file @
ea446b38
This diff is collapsed.
Click to expand it.
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