Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
jio
Commits
2ad51a9b
Commit
2ad51a9b
authored
12 years ago
by
Sven Franck
Browse files
Options
Download
Email Patches
Plain Diff
jslint pass getCommand.js (2indent)
parent
aa6c318c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
31 deletions
+35
-31
src/jio/commands/getCommand.js
src/jio/commands/getCommand.js
+35
-31
No files found.
src/jio/commands/getCommand.js
View file @
2ad51a9b
var
getCommand
=
function
(
spec
,
my
)
{
/*jslint indent: 2, maxlen: 80, sloppy: true */
/*global command: true */
var
getCommand
=
function
(
spec
,
my
)
{
var
that
=
command
(
spec
,
my
);
spec
=
spec
||
{};
my
=
my
||
{};
// Attributes //
// Methods //
that
.
getLabel
=
function
()
{
return
'
get
'
;
that
.
getLabel
=
function
()
{
return
'
get
'
;
};
that
.
validateState
=
function
()
{
if
(
!
(
typeof
that
.
getDocId
()
===
"
string
"
&&
that
.
getDocId
()
!==
""
))
{
that
.
error
(
{
"
status
"
:
20
,
"
status
Text
"
:
"
Document Id Required
"
,
"
error
"
:
"
d
ocument
_id_r
equired
"
,
"
message
"
:
"
The
document
id
is not provid
ed
"
,
"
reason
"
:
"
D
ocument id is
undefin
ed
"
});
return
false
;
}
if
(
typeof
that
.
getAttachmentId
()
===
"
string
"
)
{
if
(
that
.
getAttachmentId
()
===
""
)
{
that
.
error
(
{
"
status
"
:
23
,
"
statusText
"
:
"
Invalid Attachment Id
"
,
"
error
"
:
"
i
nvalid
_a
ttachment
_i
d
"
,
"
message
"
:
"
The
attachment
id
must not be an empty string
"
,
"
reason
"
:
"
Attachment id is empty
"
});
return
false
;
}
that
.
validateState
=
function
()
{
if
(
!
(
typeof
that
.
getDocId
()
===
"
string
"
&&
that
.
getDocId
()
!==
""
))
{
that
.
error
({
"
status
"
:
20
,
"
statusText
"
:
"
D
ocument
Id R
equired
"
,
"
error
"
:
"
document
_
id
_requir
ed
"
,
"
message
"
:
"
The d
ocument id is
not provid
ed
"
,
"
reason
"
:
"
Document id is undefined
"
})
;
return
false
;
}
if
(
typeof
that
.
getAttachmentId
()
===
"
string
"
)
{
if
(
that
.
getAttachmentId
()
===
""
)
{
that
.
error
({
"
status
"
:
23
,
"
statusText
"
:
"
I
nvalid
A
ttachment
I
d
"
,
"
error
"
:
"
invalid_
attachment
_
id
"
,
"
message
"
:
"
The attachment id must not be an empty string
"
,
"
reason
"
:
"
Attachment id is empty
"
})
;
return
false
;
}
return
true
;
}
return
true
;
};
that
.
executeOn
=
function
(
storage
)
{
storage
.
get
(
that
);
that
.
executeOn
=
function
(
storage
)
{
storage
.
get
(
that
);
};
that
.
canBeRestored
=
function
()
{
return
false
;
that
.
canBeRestored
=
function
()
{
return
false
;
};
return
that
;
};
};
\ No newline at end of file
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