aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/js/public.js
diff options
context:
space:
mode:
authorJan-Christoph Borchardt <hey@jancborchardt.net>2014-01-29 10:55:44 +0100
committerJan-Christoph Borchardt <hey@jancborchardt.net>2014-01-29 10:55:44 +0100
commit13ed59c1cf2598f28c415c0c2459b5a4495ff5ef (patch)
tree890efcfe462f19468e2aa05ca1a22049edc21ab6 /apps/files_sharing/js/public.js
parentc767ebcc03c604f3141af4c286ad099fdf64c561 (diff)
parentcf2c061f1f2577b3a995d9e2423c93589d7df2b3 (diff)
downloadnextcloud-server-13ed59c1cf2598f28c415c0c2459b5a4495ff5ef.tar.gz
nextcloud-server-13ed59c1cf2598f28c415c0c2459b5a4495ff5ef.zip
merge master into mobile-style
Diffstat (limited to 'apps/files_sharing/js/public.js')
-rw-r--r--apps/files_sharing/js/public.js16
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');