summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorBjörn Schießle <schiessle@owncloud.com>2012-10-05 14:28:03 +0200
committerBjörn Schießle <schiessle@owncloud.com>2012-10-05 14:28:23 +0200
commit0d081ac5acbb049659eedca0766c99ed7e91c4d7 (patch)
tree4b81014f88d6e48942db20b3222f811fd8f80323 /apps/files_sharing
parentef8a4a16292ad370661ccf1c77f157ab3d867eac (diff)
downloadnextcloud-server-0d081ac5acbb049659eedca0766c99ed7e91c4d7.tar.gz
nextcloud-server-0d081ac5acbb049659eedca0766c99ed7e91c4d7.zip
register download action for directories
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/js/public.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index fb87c04ee26..916e35419c1 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -38,6 +38,12 @@ $(document).ready(function() {
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