mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
feature(menu) download: show alert, when ".."
This commit is contained in:
parent
de2c8f6b97
commit
eb4f541400
1 changed files with 31 additions and 28 deletions
|
|
@ -282,35 +282,38 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO;
|
|||
date = Date.now(),
|
||||
files = DOM.getActiveFiles();
|
||||
|
||||
files.forEach(function(file) {
|
||||
var element,
|
||||
selected = DOM.isSelected(file),
|
||||
path = DOM.getCurrentPath(file),
|
||||
id = DOM.load.getIdBySrc(path),
|
||||
isDir = DOM.isCurrentIsDir(file);
|
||||
|
||||
CloudCmd.log('downloading file ' + path + '...');
|
||||
|
||||
if (isDir)
|
||||
path = apiURL + '/pack' + path + '.tar.gz';
|
||||
else
|
||||
path = apiURL + FS + path + '?download';
|
||||
|
||||
element = DOM.load({
|
||||
id : id + '-' + date,
|
||||
name : 'iframe',
|
||||
async : false,
|
||||
className : 'hidden',
|
||||
src : path
|
||||
if (!files.length)
|
||||
DOM.Dialog.alert.noFiles();
|
||||
else
|
||||
files.forEach(function(file) {
|
||||
var element,
|
||||
selected = DOM.isSelected(file),
|
||||
path = DOM.getCurrentPath(file),
|
||||
id = DOM.load.getIdBySrc(path),
|
||||
isDir = DOM.isCurrentIsDir(file);
|
||||
|
||||
CloudCmd.log('downloading file ' + path + '...');
|
||||
|
||||
if (isDir)
|
||||
path = apiURL + '/pack' + path + '.tar.gz';
|
||||
else
|
||||
path = apiURL + FS + path + '?download';
|
||||
|
||||
element = DOM.load({
|
||||
id : id + '-' + date,
|
||||
name : 'iframe',
|
||||
async : false,
|
||||
className : 'hidden',
|
||||
src : path
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
document.body.removeChild(element);
|
||||
}, TIME);
|
||||
|
||||
if (selected)
|
||||
DOM.toggleSelectedFile(file);
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
document.body.removeChild(element);
|
||||
}, TIME);
|
||||
|
||||
if (selected)
|
||||
DOM.toggleSelectedFile(file);
|
||||
});
|
||||
}
|
||||
|
||||
function getCurrentPosition() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue