Commit 7996dfca authored by Tristan Cavelier's avatar Tristan Cavelier

Updating Local Storage

parent 9d672f03
...@@ -136,8 +136,8 @@ var newLocalStorage = function ( spec, my ) { ...@@ -136,8 +136,8 @@ var newLocalStorage = function ( spec, my ) {
doc.content = command.getContent(); doc.content = command.getContent();
} }
LocalOrCookieStorage.setItem(path, doc); LocalOrCookieStorage.setItem(path, doc);
that.done(); that.success ();
}, 100); });
}; // end saveDocument }; // end saveDocument
/** /**
...@@ -159,16 +159,16 @@ var newLocalStorage = function ( spec, my ) { ...@@ -159,16 +159,16 @@ var newLocalStorage = function ( spec, my ) {
'jio/local/'+priv.username+'/'+ 'jio/local/'+priv.username+'/'+
priv.applicationname+'/'+command.getPath()); priv.applicationname+'/'+command.getPath());
if (!doc) { if (!doc) {
that.fail({status:404,statusText:'Not Found.', that.error ({status:404,statusText:'Not Found.',
message:'Document "'+ command.getPath() + message:'Document "'+ command.getPath() +
'" not found in localStorage.'}); '" not found in localStorage.'});
} else { } else {
if (command.getOption('metadata_only')) { if (command.getOption('metadata_only')) {
delete doc.content; delete doc.content;
} }
that.done(doc); that.success (doc);
} }
}, 100); });
}; // end loadDocument }; // end loadDocument
/** /**
...@@ -205,8 +205,8 @@ var newLocalStorage = function ( spec, my ) { ...@@ -205,8 +205,8 @@ var newLocalStorage = function ( spec, my ) {
} }
} }
} }
that.done(new_array); that.success (new_array);
}, 100); });
}; // end getDocumentList }; // end getDocumentList
/** /**
...@@ -223,8 +223,8 @@ var newLocalStorage = function ( spec, my ) { ...@@ -223,8 +223,8 @@ var newLocalStorage = function ( spec, my ) {
// deleting // deleting
LocalOrCookieStorage.deleteItem(path); LocalOrCookieStorage.deleteItem(path);
priv.removeFileName(command.getPath()); priv.removeFileName(command.getPath());
that.done(); that.success ();
}, 100); });
}; };
return that; return that;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment