diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-05-19 15:20:44 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-05-30 10:06:29 +0200 |
commit | 60bcdc550e95fbf0104bbc9c8028777016d73663 (patch) | |
tree | d6ca8475d7ea4cb8aa7e034add8902926171e612 /apps/files_sharing/js/sharedfilelist.js | |
parent | 279ede33af09c43e03f97458c7fa673ff2b7982a (diff) | |
download | nextcloud-server-60bcdc550e95fbf0104bbc9c8028777016d73663.tar.gz nextcloud-server-60bcdc550e95fbf0104bbc9c8028777016d73663.zip |
Fixed file actions for sharing views
FileActions can now be clone to be use for separate file list views
without having the side-effect of affecting the main file list view.
Added "Open" action in sharing overview file lists to redirect to the
regular file list when clicking on a folder.
Diffstat (limited to 'apps/files_sharing/js/sharedfilelist.js')
-rw-r--r-- | apps/files_sharing/js/sharedfilelist.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/apps/files_sharing/js/sharedfilelist.js b/apps/files_sharing/js/sharedfilelist.js index b2a05f585bb..9d8c9e38358 100644 --- a/apps/files_sharing/js/sharedfilelist.js +++ b/apps/files_sharing/js/sharedfilelist.js @@ -47,6 +47,7 @@ $tr.find('td.date').before($sharedWith); $tr.find('td.filename input:checkbox').remove(); $tr.attr('data-path', fileData.path); + $tr.attr('data-share-id', _.pluck(fileData.shares, 'id').join(',')); return $tr; }, @@ -60,6 +61,22 @@ this._sharedWithUser = !!state; }, + updateEmptyContent: function() { + var dir = this.getCurrentDirectory(); + if (dir === '/') { + // root has special permissions + this.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty); + this.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty); + } + else { + OCA.Files.FileList.prototype.updateEmptyContent.apply(this, arguments); + } + }, + + getDirectoryPermissions: function() { + return OC.PERMISSION_READ; + }, + reload: function() { var self = this; this.showMask(); |