Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
officejs
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
officejs
Commits
d1a8148c
Commit
d1a8148c
authored
May 24, 2012
by
Tristan Cavelier
Committed by
Sebastien Robin
Jun 07, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix bug: check saveDocument dependencies.
parent
3c4f9683
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
+21
-8
OfficeJS/lib/jio/jio.js
OfficeJS/lib/jio/jio.js
+18
-6
OfficeJS/lib/jio/jio.min.js
OfficeJS/lib/jio/jio.min.js
+1
-1
OfficeJS/src/jio.js
OfficeJS/src/jio.js
+2
-1
No files found.
OfficeJS/lib/jio/jio.js
View file @
d1a8148c
...
...
@@ -928,6 +928,17 @@ var JIO =
var
that
=
{},
priv
=
{};
priv
.
wrongParametersError
=
function
(
settings
)
{
var
m
=
'
Method:
'
+
settings
.
method
+
'
, One or some parameters are undefined.
'
;
console
.
error
(
m
);
settings
.
callback
({
status
:
'
fail
'
,
error
:
{
status
:
0
,
statusText
:
'
Undefined Parameter
'
,
message
:
m
}});
return
null
;
};
//// Getters Setters
that
.
getID
=
function
()
{
return
priv
.
id
;
...
...
@@ -1039,7 +1050,7 @@ var JIO =
settings
.
storage
&&
settings
.
applicant
)
{
return
priv
.
queue
.
createJob
(
settings
);
}
return
null
;
return
priv
.
wrongParametersError
(
settings
)
;
};
that
.
saveDocument
=
function
(
options
)
{
...
...
@@ -1063,15 +1074,16 @@ var JIO =
var
settings
=
extend
({
'
storage
'
:
priv
.
storage
,
'
applicant
'
:
priv
.
applicant
,
'
fileContent
'
:
''
,
'
method
'
:
'
saveDocument
'
,
'
callback
'
:
function
()
{}
},
options
);
// check dependencies
if
(
that
.
isReady
()
&&
settings
.
fileName
&&
settings
.
fileContent
&&
if
(
that
.
isReady
()
&&
settings
.
fileName
&&
settings
.
storage
&&
settings
.
applicant
)
{
return
priv
.
queue
.
createJob
(
settings
);
}
return
null
;
return
priv
.
wrongParametersError
(
settings
)
;
};
that
.
loadDocument
=
function
(
options
)
{
...
...
@@ -1108,7 +1120,7 @@ var JIO =
settings
.
storage
&&
settings
.
applicant
)
{
return
priv
.
queue
.
createJob
(
settings
);
}
return
null
;
return
priv
.
wrongParametersError
(
settings
)
;
};
that
.
getDocumentList
=
function
(
options
)
{
...
...
@@ -1141,7 +1153,7 @@ var JIO =
if
(
that
.
isReady
()
&&
settings
.
storage
&&
settings
.
applicant
)
{
return
priv
.
queue
.
createJob
(
settings
);
}
return
null
;
return
priv
.
wrongParametersError
(
settings
)
;
};
that
.
removeDocument
=
function
(
options
)
{
...
...
@@ -1171,7 +1183,7 @@ var JIO =
settings
.
storage
&&
settings
.
applicant
)
{
return
priv
.
queue
.
createJob
(
settings
);
}
return
null
;
return
priv
.
wrongParametersError
(
settings
)
;
};
//// end Methods
...
...
OfficeJS/lib/jio/jio.min.js
View file @
d1a8148c
This diff is collapsed.
Click to expand it.
OfficeJS/src/jio.js
View file @
d1a8148c
...
...
@@ -1071,11 +1071,12 @@ var JIO =
var
settings
=
extend
({
'
storage
'
:
priv
.
storage
,
'
applicant
'
:
priv
.
applicant
,
'
fileContent
'
:
''
,
'
method
'
:
'
saveDocument
'
,
'
callback
'
:
function
()
{}
},
options
);
// check dependencies
if
(
that
.
isReady
()
&&
settings
.
fileName
&&
settings
.
fileContent
&&
if
(
that
.
isReady
()
&&
settings
.
fileName
&&
settings
.
storage
&&
settings
.
applicant
)
{
return
priv
.
queue
.
createJob
(
settings
);
}
...
...
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