diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-03-19 11:56:02 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-03-19 11:56:02 +0100 |
commit | b13ab2b17eb485aec13c7fb1e88e25e1c9901d72 (patch) | |
tree | 58259ba29b5833107b62bf08688eaefefe46cdb9 /files/js/fileactions.js | |
parent | 194211500b601d8582fa1e8396fb4c8e4970224d (diff) | |
download | nextcloud-server-b13ab2b17eb485aec13c7fb1e88e25e1c9901d72.tar.gz nextcloud-server-b13ab2b17eb485aec13c7fb1e88e25e1c9901d72.zip |
enable admin to turn off ZIP downloads
user interface offers multi-file/folder downloads only if available
make function name more clear
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'); |