mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 09:24:51 +00:00
minor changes
This commit is contained in:
parent
845347cb7f
commit
86e3b51496
1 changed files with 23 additions and 9 deletions
|
|
@ -47,19 +47,33 @@ CloudCommander.Menu.getConfig = (function(){
|
|||
}},
|
||||
|
||||
download: {name: 'Download',callback: function(key, opt){
|
||||
lThis.Images.showLoad();
|
||||
|
||||
var lCurrent = lThis.getCurrentFile();
|
||||
var lLink = lThis.getByTag('a', lCurrent)[0].href;
|
||||
|
||||
var lLink = lThis.getByTag('a', lCurrent)[0].href;
|
||||
|
||||
console.log('downloadin file ' + lLink +'...');
|
||||
|
||||
var lDownload = lThis.anyload({
|
||||
name : 'iframe',
|
||||
className : 'hidden',
|
||||
src : lLink + '?download'
|
||||
});
|
||||
|
||||
document.body.removeChild(lDownload);
|
||||
lLink = lLink + '?download';
|
||||
var lId = lThis.getIdBySrc(lLink);
|
||||
if(!lThis.getById(lId)){
|
||||
var lDownload = lThis.anyload({
|
||||
name : 'iframe',
|
||||
async : false,
|
||||
className : 'hidden',
|
||||
src : lLink
|
||||
});
|
||||
|
||||
lThis.Images.hideLoad();
|
||||
setTimeout(function() {
|
||||
document.body.removeChild(lDownload);
|
||||
}, 10000);
|
||||
}
|
||||
else{
|
||||
lThis.Images.showError({
|
||||
responseText: 'Error: You trying to' +
|
||||
'download same file to often'});
|
||||
}
|
||||
}}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue