aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-01-14 11:28:36 +0100
committerOlivier Paroz <github@oparoz.com>2015-01-14 11:28:36 +0100
commit356bfb36dc9aa1da7ed4e03ac53f6d3e684cb53b (patch)
tree7db014a0c7609e5d65b6083de6dfa62e51c2720f /apps
parentc8fa85451c2481b6afb438f41f12144b2929d320 (diff)
downloadnextcloud-server-356bfb36dc9aa1da7ed4e03ac53f6d3e684cb53b.tar.gz
nextcloud-server-356bfb36dc9aa1da7ed4e03ac53f6d3e684cb53b.zip
Download the current public folder only
From within a shared/public directory, when drilling down folders, some users want to be able to download what they're currently looking at, not the whole shared folder. The whole archive is always a click away anyway since a user can click on the home button.
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/js/public.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_sharing/js/public.js b/apps/files_sharing/js/public.js
index 02ecf56fa09..cbd135028f1 100644
--- a/apps/files_sharing/js/public.js
+++ b/apps/files_sharing/js/public.js
@@ -8,7 +8,7 @@
*
*/
-/* global FileActions, Files */
+/* global FileActions, Files, FileList */
/* global dragOptions, folderDropOptions */
if (!OCA.Sharing) {
OCA.Sharing = {};
@@ -164,6 +164,11 @@ OCA.Sharing.PublicApp = {
// URL history handling
this.fileList.$el.on('changeDirectory', _.bind(this._onDirectoryChanged, this));
OC.Util.History.addOnPopStateHandler(_.bind(this._onUrlChanged, this));
+
+ $('#download').click(function (e) {
+ e.preventDefault();
+ OC.redirect(FileList.getDownloadUrl());
+ });
}
$(document).on('click', '#directLink', function () {