minor changes

This commit is contained in:
coderaiser 2012-08-17 10:54:42 -04:00
parent 845347cb7f
commit 86e3b51496

View file

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