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
1de052d6
Commit
1de052d6
authored
Dec 24, 2012
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix localstorage.js little bugs
parent
f84ef0ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
src/jio.storage/localstorage.js
src/jio.storage/localstorage.js
+6
-6
No files found.
src/jio.storage/localstorage.js
View file @
1de052d6
...
...
@@ -84,7 +84,7 @@ var newLocalStorage = function (spec, my) {
var
doc
;
doc
=
localstorage
.
getItem
(
priv
.
localpath
+
"
/
"
+
command
.
getDocId
());
if
(
typeof
doc
===
"
undefined
"
)
{
if
(
doc
===
null
)
{
// the document does not exists
localstorage
.
setItem
(
priv
.
localpath
+
"
/
"
+
command
.
getDocId
(),
...
...
@@ -113,12 +113,12 @@ var newLocalStorage = function (spec, my) {
var
doc
;
doc
=
localstorage
.
getItem
(
priv
.
localpath
+
"
/
"
+
command
.
getDocId
());
if
(
typeof
doc
===
"
undefined
"
)
{
if
(
doc
===
null
)
{
// the document does not exists
doc
=
command
.
cloneDoc
();
}
else
{
// the document already exists
priv
.
documentObjectUpdate
(
doc
,
command
.
getDocId
());
priv
.
documentObjectUpdate
(
doc
,
command
.
cloneDoc
());
}
// write
localstorage
.
setItem
(
...
...
@@ -138,7 +138,7 @@ var newLocalStorage = function (spec, my) {
var
doc
;
doc
=
localstorage
.
getItem
(
priv
.
localpath
+
"
/
"
+
command
.
getDocId
());
if
(
typeof
doc
===
"
undefined
"
)
{
if
(
doc
===
null
)
{
// the document does not exists
that
.
error
({
"
status
"
:
404
,
...
...
@@ -187,7 +187,7 @@ var newLocalStorage = function (spec, my) {
doc
=
localstorage
.
getItem
(
priv
.
localpath
+
"
/
"
+
command
.
getDocId
()
+
"
/
"
+
command
.
getAttachmentId
());
if
(
typeof
doc
!==
"
undefined
"
)
{
if
(
doc
!==
null
)
{
that
.
success
(
doc
);
}
else
{
that
.
error
({
...
...
@@ -202,7 +202,7 @@ var newLocalStorage = function (spec, my) {
// seeking for a document
doc
=
localstorage
.
getItem
(
priv
.
localpath
+
"
/
"
+
command
.
getDocId
());
if
(
typeof
doc
!==
"
undefined
"
)
{
if
(
doc
!==
null
)
{
that
.
success
(
doc
);
}
else
{
that
.
error
({
...
...
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