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.
This commit is contained in:
Olivier Paroz 2015-01-14 11:28:36 +01:00
parent c8fa85451c
commit 356bfb36dc
1 changed files with 6 additions and 1 deletions

View File

@ -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 () {