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
Show 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) {
...
@@ -84,7 +84,7 @@ var newLocalStorage = function (spec, my) {
var
doc
;
var
doc
;
doc
=
localstorage
.
getItem
(
doc
=
localstorage
.
getItem
(
priv
.
localpath
+
"
/
"
+
command
.
getDocId
());
priv
.
localpath
+
"
/
"
+
command
.
getDocId
());
if
(
typeof
doc
===
"
undefined
"
)
{
if
(
doc
===
null
)
{
// the document does not exists
// the document does not exists
localstorage
.
setItem
(
localstorage
.
setItem
(
priv
.
localpath
+
"
/
"
+
command
.
getDocId
(),
priv
.
localpath
+
"
/
"
+
command
.
getDocId
(),
...
@@ -113,12 +113,12 @@ var newLocalStorage = function (spec, my) {
...
@@ -113,12 +113,12 @@ var newLocalStorage = function (spec, my) {
var
doc
;
var
doc
;
doc
=
localstorage
.
getItem
(
doc
=
localstorage
.
getItem
(
priv
.
localpath
+
"
/
"
+
command
.
getDocId
());
priv
.
localpath
+
"
/
"
+
command
.
getDocId
());
if
(
typeof
doc
===
"
undefined
"
)
{
if
(
doc
===
null
)
{
// the document does not exists
// the document does not exists
doc
=
command
.
cloneDoc
();
doc
=
command
.
cloneDoc
();
}
else
{
}
else
{
// the document already exists
// the document already exists
priv
.
documentObjectUpdate
(
doc
,
command
.
getDocId
());
priv
.
documentObjectUpdate
(
doc
,
command
.
cloneDoc
());
}
}
// write
// write
localstorage
.
setItem
(
localstorage
.
setItem
(
...
@@ -138,7 +138,7 @@ var newLocalStorage = function (spec, my) {
...
@@ -138,7 +138,7 @@ var newLocalStorage = function (spec, my) {
var
doc
;
var
doc
;
doc
=
localstorage
.
getItem
(
doc
=
localstorage
.
getItem
(
priv
.
localpath
+
"
/
"
+
command
.
getDocId
());
priv
.
localpath
+
"
/
"
+
command
.
getDocId
());
if
(
typeof
doc
===
"
undefined
"
)
{
if
(
doc
===
null
)
{
// the document does not exists
// the document does not exists
that
.
error
({
that
.
error
({
"
status
"
:
404
,
"
status
"
:
404
,
...
@@ -187,7 +187,7 @@ var newLocalStorage = function (spec, my) {
...
@@ -187,7 +187,7 @@ var newLocalStorage = function (spec, my) {
doc
=
localstorage
.
getItem
(
doc
=
localstorage
.
getItem
(
priv
.
localpath
+
"
/
"
+
command
.
getDocId
()
+
"
/
"
+
priv
.
localpath
+
"
/
"
+
command
.
getDocId
()
+
"
/
"
+
command
.
getAttachmentId
());
command
.
getAttachmentId
());
if
(
typeof
doc
!==
"
undefined
"
)
{
if
(
doc
!==
null
)
{
that
.
success
(
doc
);
that
.
success
(
doc
);
}
else
{
}
else
{
that
.
error
({
that
.
error
({
...
@@ -202,7 +202,7 @@ var newLocalStorage = function (spec, my) {
...
@@ -202,7 +202,7 @@ var newLocalStorage = function (spec, my) {
// seeking for a document
// seeking for a document
doc
=
localstorage
.
getItem
(
doc
=
localstorage
.
getItem
(
priv
.
localpath
+
"
/
"
+
command
.
getDocId
());
priv
.
localpath
+
"
/
"
+
command
.
getDocId
());
if
(
typeof
doc
!==
"
undefined
"
)
{
if
(
doc
!==
null
)
{
that
.
success
(
doc
);
that
.
success
(
doc
);
}
else
{
}
else
{
that
.
error
({
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