feature(edit) add saveDataToCache

This commit is contained in:
coderaiser 2013-11-19 12:24:14 +00:00
parent f528c351fa
commit 9e36587f7a

View file

@ -132,7 +132,7 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch;
query = '?patch';
}
DOM.saveCurrentData(lPath, lValue, onSave, query);
DOM.RESTful.save(lPath, lValue, onSave, query);
}, function(callback) {
diff(lValue, callback);
});
@ -192,15 +192,15 @@ var CloudCmd, Util, DOM, CloudFunc, ace, DiffProto, diff_match_patch;
path = DOM.getCurrentPath(),
msg = '\nShould I save file anyway?';
if (!isError)
if (!isError) {
Value = Ace.getValue();
Edit.showMessage(text);
else {
ret = Dialog.confirm(text + msg);
DOM.saveDataToCache(path, Value);
} else {
ret = Dialog.confirm(text + msg);
if (ret) {
if (ret)
DOM.RESTful.save(path, Value, onSave);
Value = Ace.getValue();
}
}
}