mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-26 09:24:07 +00:00
refactor(edit) show: rm once("change")
This commit is contained in:
parent
70c9f64e88
commit
817d54e591
1 changed files with 11 additions and 15 deletions
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue