fix(edit) show: set mode before data set

This commit is contained in:
coderaiser 2015-02-24 04:00:31 -05:00
parent ae1d393dd8
commit 3483196b3b

View file

@ -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);
}
});