From 9e36587f7a249d8e5e7ab677ad3b1f8622f94170 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 19 Nov 2013 12:24:14 +0000 Subject: [PATCH] feature(edit) add saveDataToCache --- lib/client/edit.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/client/edit.js b/lib/client/edit.js index 765b0b66..1b5ffec0 100644 --- a/lib/client/edit.js +++ b/lib/client/edit.js @@ -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(); - } } }