diff options
Diffstat (limited to 'apps/files_sharing/js/public.js')
-rw-r--r-- | apps/files_sharing/js/public.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js index 92b626bba18..b1b6b079db6 100644 --- a/apps/files_sharing/js/public.js +++ b/apps/files_sharing/js/public.js @@ -1,6 +1,10 @@ // Override download path to files_sharing/public.php function fileDownloadPath(dir, file) { - return $('#downloadURL').val(); + var url = $('#downloadURL').val(); + if (url.indexOf('&path=') != -1) { + url += '/'+file; + } + return url; } $(document).ready(function() { @@ -17,6 +21,12 @@ $(document).ready(function() { action($('#filename').val()); } } + FileActions.register('dir', 'Open', 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 |