mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-25 08:54:10 +00:00
feature(dom) uploadFiles: set current uploaded file
This commit is contained in:
parent
4d41d47104
commit
39827a6b57
1 changed files with 9 additions and 2 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue