feature(dom) uploadFiles: set current uploaded file

This commit is contained in:
coderaiser 2014-10-06 09:08:02 -04:00
parent 4d41d47104
commit 39827a6b57

View file

@ -405,7 +405,14 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
};
this.uploadFiles = function(files) {
var func = CloudCmd.refresh,
var func = function(name) {
return function() {
CloudCmd.refresh(null, function() {
var current = DOM.getCurrentFileByName(name);
DOM.setCurrentFile(current);
});
};
},
dir = CurrentInfo.dirPath,
load = function(file, callback) {
var Images = DOM.Images,
@ -422,7 +429,7 @@ var CloudCmd, Util, DOM, CloudFunc, Dialog;
if (files.length) {
Util.forEach(files, function(file) {
func = Util.exec.with(load, file, func);
func = Util.exec.with(load, file, func(file.name));
});
func();