From 0d081ac5acbb049659eedca0766c99ed7e91c4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Fri, 5 Oct 2012 14:28:03 +0200 Subject: [PATCH] register download action for directories --- apps/files_sharing/js/public.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index fb87c04ee2..916e35419c 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -38,6 +38,12 @@ $(document).ready(function() { window.location = $(tr).find('a.name').attr('href'); } }); + FileActions.register('dir', 'Download', OC.PERMISSION_READ, '', function(filename) { + var tr = $('tr').filterAttr('data-file', filename) + if (tr.length > 0) { + window.location = $(tr).find('a.name').attr('href')+'&download'; + } + }); } }); \ No newline at end of file