diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-10-05 22:13:41 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-10-05 22:13:41 +0200 |
commit | a53999e94ebefc7c87830df5bc52c6b975ad45b4 (patch) | |
tree | cfc71e7d08702d57be6d056251c11c16a7498665 /apps/files_sharing/js/public.js | |
parent | 30c2c2c5cd4fb35f99f189d5721cda71a86e8b2b (diff) | |
parent | 4f7c7c615e6eb0e3818b28a24d8cf77cd7546e19 (diff) | |
download | nextcloud-server-a53999e94ebefc7c87830df5bc52c6b975ad45b4.tar.gz nextcloud-server-a53999e94ebefc7c87830df5bc52c6b975ad45b4.zip |
Merge branch 'master' into phpunit
Diffstat (limited to 'apps/files_sharing/js/public.js')
-rw-r--r-- | apps/files_sharing/js/public.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index def02374804..916e35419c1 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -32,6 +32,18 @@ $(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'); + } + }); + 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 |