refactor(edit) show: rm once("change")

This commit is contained in:
coderaiser 2015-02-27 09:21:43 -05:00
parent 70c9f64e88
commit 817d54e591

View file

@ -72,26 +72,22 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO, Format, edward;
ConfigView.beforeShow = callback;
Info.getData(function(error, data) {
var path = Info.path;
var path = Info.path,
isDir = Info.isDir,
name = Info.name;
if (isDir)
name += '.json';
if (error) {
alert(error);
} else {
edward.once('change', function() {
var isDir = Info.isDir,
name = Info.name;
setMsgChanged(name);
if (isDir)
name += '.json';
edward.setModeForPath(name);
CloudCmd.View.show(Element, ConfigView);
});
edward.setValueFirst(path, data);
setMsgChanged(name);
edward.setModeForPath(name);
CloudCmd.View.show(Element, ConfigView);
}
});