summaryrefslogtreecommitdiffstats
path: root/files/js/fileactions.js
diff options
context:
space:
mode:
Diffstat (limited to 'files/js/fileactions.js')
-rw-r--r--files/js/fileactions.js15
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');