Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
jio_mebibou
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
Alexandra Rogova
jio_mebibou
Commits
49d0dc69
Commit
49d0dc69
authored
Dec 24, 2012
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
complex example updated
parent
e64bd370
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
13 deletions
+6
-13
examples/complex_example.html
examples/complex_example.html
+6
-13
No files found.
examples/complex_example.html
View file @
49d0dc69
...
...
@@ -217,7 +217,7 @@ var callback = function (err,val,begin_date) {
log
(
'
return :
'
+
JSON
.
stringify
(
val
));
};
var
command
=
function
(
method
)
{
var
begin_date
=
Date
.
now
(),
doc
=
{},
opts
=
{}
,
other
=
{}
;
var
begin_date
=
Date
.
now
(),
doc
=
{},
opts
=
{};
log
(
method
);
if
(
!
my_jio
)
{
return
error
(
'
no jio set
'
);
...
...
@@ -230,10 +230,10 @@ var command = function (method) {
switch
(
method
)
{
case
'
putAttachment
'
:
other
.
doc
id
=
$
(
'
#document_id
'
).
attr
(
'
value
'
);
other
.
revision
=
$
(
'
#prev_rev
'
).
attr
(
'
value
'
);
other
.
content
=
$
(
'
#content
'
).
attr
(
'
value
'
);
other
.
mimetype
=
$
(
'
#mimetype
'
).
attr
(
'
value
'
);
doc
.
_
id
=
$
(
'
#document_id
'
).
attr
(
'
value
'
);
doc
.
_rev
=
$
(
'
#prev_rev
'
).
attr
(
'
value
'
);
doc
.
_data
=
$
(
'
#content
'
).
attr
(
'
value
'
);
doc
.
_
mimetype
=
$
(
'
#mimetype
'
).
attr
(
'
value
'
);
log
(
'
docid:
'
+
other
.
docid
);
log
(
'
revision:
'
+
other
.
revision
);
log
(
'
content:
'
+
other
.
content
);
...
...
@@ -260,6 +260,7 @@ var command = function (method) {
log
(
'
opts:
'
+
JSON
.
stringify
(
opts
));
switch
(
method
)
{
case
"
putAttachment
"
:
case
'
remove
'
:
case
'
post
'
:
case
'
put
'
:
...
...
@@ -273,14 +274,6 @@ var command = function (method) {
callback
(
err
,
val
,
begin_date
);
});
break
;
case
'
putAttachment
'
:
my_jio
[
method
](
other
.
docid
,
other
.
revision
,
other
.
content
,
other
.
mimetype
,
opts
,
function
(
err
,
val
)
{
callback
(
err
,
val
,
begin_date
);
}
);
break
;
}
};
var
post
=
function
()
{
...
...
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