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
429f5f41
Commit
429f5f41
authored
Dec 21, 2012
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
docid management modified on command.js
parent
2784ba5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
14 deletions
+3
-14
src/jio/commands/command.js
src/jio/commands/command.js
+3
-14
No files found.
src/jio/commands/command.js
View file @
429f5f41
...
@@ -21,15 +21,7 @@ var command = function(spec, my) {
...
@@ -21,15 +21,7 @@ var command = function(spec, my) {
priv
.
tried
=
0
;
priv
.
tried
=
0
;
priv
.
doc
=
spec
.
doc
||
{};
priv
.
doc
=
spec
.
doc
||
{};
priv
.
doc
.
_id
=
priv
.
doc
.
_id
;
priv
.
docid
=
spec
.
docid
||
spec
.
doc
.
_id
||
''
;
priv
.
docid
=
spec
.
docid
||
''
;
// xxx fixed spec.content to spec.doc.content for PUTATTACHMENT
// xxx need extra check for GET, otherwise spec.doc is undefined
priv
.
content
=
spec
.
doc
===
undefined
?
undefined
:
typeof
spec
.
doc
.
content
===
'
string
'
?
spec
.
doc
.
content
:
undefined
;
priv
.
option
=
spec
.
options
||
{};
priv
.
option
=
spec
.
options
||
{};
priv
.
callbacks
=
spec
.
callbacks
||
{};
priv
.
callbacks
=
spec
.
callbacks
||
{};
priv
.
success
=
priv
.
callbacks
.
success
||
function
(){};
priv
.
success
=
priv
.
callbacks
.
success
||
function
(){};
...
@@ -67,13 +59,10 @@ var command = function(spec, my) {
...
@@ -67,13 +59,10 @@ var command = function(spec, my) {
};
};
that
.
getDocId
=
function
()
{
that
.
getDocId
=
function
()
{
return
(
priv
.
docid
||
priv
.
doc
.
_id
)
.
split
(
'
/
'
)[
0
];
return
priv
.
docid
.
split
(
'
/
'
)[
0
];
};
};
that
.
getAttachmentId
=
function
()
{
that
.
getAttachmentId
=
function
()
{
return
(
priv
.
docid
||
priv
.
doc
.
_id
).
split
(
'
/
'
)[
1
];
return
priv
.
docid
.
split
(
'
/
'
)[
1
];
};
that
.
getContent
=
function
()
{
return
priv
.
content
;
};
};
/**
/**
* @method getDoc returns the label of the command.
* @method getDoc returns the label of the command.
...
...
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