diff options
author | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2014-01-29 10:55:44 +0100 |
---|---|---|
committer | Jan-Christoph Borchardt <hey@jancborchardt.net> | 2014-01-29 10:55:44 +0100 |
commit | 13ed59c1cf2598f28c415c0c2459b5a4495ff5ef (patch) | |
tree | 890efcfe462f19468e2aa05ca1a22049edc21ab6 /apps/files_sharing/js | |
parent | c767ebcc03c604f3141af4c286ad099fdf64c561 (diff) | |
parent | cf2c061f1f2577b3a995d9e2423c93589d7df2b3 (diff) | |
download | nextcloud-server-13ed59c1cf2598f28c415c0c2459b5a4495ff5ef.tar.gz nextcloud-server-13ed59c1cf2598f28c415c0c2459b5a4495ff5ef.zip |
merge master into mobile-style
Diffstat (limited to 'apps/files_sharing/js')
-rw-r--r-- | apps/files_sharing/js/public.js | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 730649c6378..c1b7eee3fb7 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -25,18 +25,16 @@ $(document).ready(function() { window.location = $(tr).find('a.name').attr('href'); } }); - FileActions.register('file', 'Download', OC.PERMISSION_READ, '', function(filename) { - var tr = FileList.findFileEl(filename); - if (tr.length > 0) { - window.location = $(tr).find('a.name').attr('href'); - } - }); - FileActions.register('dir', 'Download', OC.PERMISSION_READ, '', function(filename) { + + // override since the format is different + FileList.getDownloadUrl = function(filename, dir) { + // we use this because we need the service and token attributes var tr = FileList.findFileEl(filename); if (tr.length > 0) { - window.location = $(tr).find('a.name').attr('href')+'&download'; + return $(tr).find('a.name').attr('href') + '&download'; } - }); + return null; + }; } var file_upload_start = $('#file_upload_start'); |