mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 18:55:26 +00:00
refactor(dom) storage -> Storage
This commit is contained in:
parent
fe7e85ffa9
commit
059b2f054b
1 changed files with 10 additions and 9 deletions
|
|
@ -733,7 +733,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
|
||||
if (ret)
|
||||
RESTful.delete(path, names, function() {
|
||||
var storagee = DOM.Storage,
|
||||
var Storage = DOM.Storage,
|
||||
dirPath = CurrentInfo.dirPath,
|
||||
dir = CloudFunc.rmLastSlash(dirPath);
|
||||
|
||||
|
|
@ -742,7 +742,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
else
|
||||
DOM.deleteCurrent(current);
|
||||
|
||||
DOM.Storage.remove(dir);
|
||||
Storage.remove(dir);
|
||||
}, query);
|
||||
|
||||
return ret;
|
||||
|
|
@ -1342,7 +1342,8 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
DOM.loadCurrentHash(function(loadHash) {
|
||||
var equal, error,
|
||||
nameHash = name + '-hash',
|
||||
storeHash = DOM.Storage.get(name + '-hash'),
|
||||
Storage = DOM.Storage,
|
||||
storeHash = Storage.get(name + '-hash'),
|
||||
isContain = Util.isContainStr(loadHash, 'error');
|
||||
|
||||
if (isContain)
|
||||
|
|
@ -1372,10 +1373,10 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
Util.exec(callback);
|
||||
else
|
||||
Util.ifExec(hash, function() {
|
||||
var storage = DOM.Storage;
|
||||
var Storage = DOM.Storage;
|
||||
|
||||
storage.set(nameHash, hash);
|
||||
storage.set(nameData, data);
|
||||
Storage.set(nameHash, hash);
|
||||
Storage.set(nameData, data);
|
||||
|
||||
Util.exec(callback, hash);
|
||||
}, function(callback) {
|
||||
|
|
@ -1397,7 +1398,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
this.getDataFromStorage = function(name, callback) {
|
||||
CloudCmd.getConfig(function(config) {
|
||||
var data, hash,
|
||||
storage = DOM.Storage,
|
||||
Storage = DOM.Storage,
|
||||
nameHash = name + '-hash',
|
||||
nameData = name + '-data',
|
||||
allowed = config.localStorage,
|
||||
|
|
@ -1406,8 +1407,8 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
|
|||
if (!allowed || isDir)
|
||||
Util.exec(callback);
|
||||
else {
|
||||
data = storage.get(nameData);
|
||||
hash = storage.get(nameHash);
|
||||
data = Storage.get(nameData);
|
||||
hash = Storage.get(nameHash);
|
||||
|
||||
Util.exec(callback, data, hash);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue