aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js/public.js
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/js/public.js')
-rw-r--r--apps/files_sharing/js/public.js12
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