From ef8a4a16292ad370661ccf1c77f157ab3d867eac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Schie=C3=9Fle?= Date: Fri, 5 Oct 2012 14:20:38 +0200 Subject: [PATCH] register download action for files --- 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 def02374804..fb87c04ee26 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -32,6 +32,12 @@ $(document).ready(function() { window.location = $(tr).find('a.name').attr('href'); } }); + FileActions.register('file', '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'); + } + }); } }); \ No newline at end of file