mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
fix(edit) show: set mode before data set
This commit is contained in:
parent
ae1d393dd8
commit
3483196b3b
1 changed files with 10 additions and 9 deletions
|
|
@ -63,26 +63,27 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO, Format, edward;
|
|||
}
|
||||
|
||||
this.show = function(callback) {
|
||||
var isDir = Info.isDir,
|
||||
name = Info.name,
|
||||
path = Info.path;
|
||||
|
||||
Images.show.load();
|
||||
setMsgChanged(name);
|
||||
|
||||
if (callback)
|
||||
ConfigView.beforeShow = callback;
|
||||
|
||||
if (isDir)
|
||||
edward.setMode('json');
|
||||
else
|
||||
edward.setModeForPath(name);
|
||||
|
||||
Info.getData(function(error, data) {
|
||||
var isDir = Info.isDir,
|
||||
name = Info.name,
|
||||
path = Info.path;
|
||||
|
||||
if (error) {
|
||||
alert(error);
|
||||
} else {
|
||||
edward.setValueFirst(path, data);
|
||||
|
||||
if (isDir)
|
||||
edward.setMode('json');
|
||||
else
|
||||
edward.setModeForPath(name);
|
||||
|
||||
CloudCmd.View.show(Element, ConfigView);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue