diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-03-21 09:42:53 +0100 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-03-21 09:42:53 +0100 |
commit | 8f8d486f35c8f1d290e3db2ba7ae42dcb380d1dd (patch) | |
tree | fd4dd90a7f00dc7ffa3549889819bc1e1dbd53d2 /files/js/fileactions.js | |
parent | 9848bc33e5b78aaf2fa07554fdd3c78d34ec0b67 (diff) | |
parent | 19bbb61b20e1e9a7c7d4f9ef645ab65fcc453416 (diff) | |
download | nextcloud-server-8f8d486f35c8f1d290e3db2ba7ae42dcb380d1dd.tar.gz nextcloud-server-8f8d486f35c8f1d290e3db2ba7ae42dcb380d1dd.zip |
Merge branch 'master' into sabredav_1.6
Diffstat (limited to 'files/js/fileactions.js')
-rw-r--r-- | files/js/fileactions.js | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/files/js/fileactions.js b/files/js/fileactions.js index b5dd3982803..b33be280ad5 100644 --- a/files/js/fileactions.js +++ b/files/js/fileactions.js @@ -106,7 +106,7 @@ FileActions={ element.hide(); parent.parent().children().last().append(element); } - $('#fileList .action').css('-o-transition-property','none');//temporarly disable + $('#fileList .action').css('-o-transition-property','none');//temporarly disable $('#fileList .action').fadeIn(200,function(){ $('#fileList .action').css('-o-transition-property','opacity'); }); @@ -128,8 +128,15 @@ FileActions={ } } -FileActions.register('all','Download',function(){return OC.imagePath('core','actions/download')},function(filename){ - window.location='ajax/download.php?files='+encodeURIComponent(filename)+'&dir='+encodeURIComponent($('#dir').val()); +$(document).ready(function(){ + if($('#allowZipDownload').val() == 1){ + var downloadScope = 'all'; + } else { + var downloadScope = 'file'; + } + FileActions.register(downloadScope,'Download',function(){return OC.imagePath('core','actions/download')},function(filename){ + window.location='ajax/download.php?files='+encodeURIComponent(filename)+'&dir='+encodeURIComponent($('#dir').val()); + }); }); FileActions.register('all','Delete',function(){return OC.imagePath('core','actions/delete')},function(filename){ @@ -144,4 +151,4 @@ FileActions.register('dir','Open','',function(filename){ window.location='index.php?dir='+encodeURIComponent($('#dir').val()).replace(/%2F/g, '/')+'/'+encodeURIComponent(filename); }); -FileActions.setDefault('dir','Open'); +FileActions.setDefault('dir','Open'); |