diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-08-15 09:39:12 +0200 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2018-08-15 09:39:12 +0200 |
commit | b082278f0404efc65b72d7cf0516d2de52f1393b (patch) | |
tree | aa59517f9bc91dd03f65ce9a5079fabf9b5ab1b3 /apps/files_sharing | |
parent | 62a9ec12bc1b2114f8566b1f2fc89d01d40b5e66 (diff) | |
download | nextcloud-server-b082278f0404efc65b72d7cf0516d2de52f1393b.tar.gz nextcloud-server-b082278f0404efc65b72d7cf0516d2de52f1393b.zip |
Do not show action menu if no actions are available
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/files_sharing')
-rw-r--r-- | apps/files_sharing/js/share.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 0f8dc58a85e..68529fd882f 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -42,14 +42,16 @@ var fileActions = fileList.fileActions; var oldCreateRow = fileList._createRow; fileList._createRow = function(fileData) { + + var tr = oldCreateRow.apply(this, arguments); + var sharePermissions = OCA.Sharing.Util.getSharePermissions(fileData); if (fileData.permissions === 0) { // no permission, disabling sidebar + delete fileActions.actions.all.Comment; delete fileActions.actions.all.Details; + delete fileActions.actions.all.Goto; } - - var tr = oldCreateRow.apply(this, arguments); - var sharePermissions = OCA.Sharing.Util.getSharePermissions(fileData); tr.attr('data-share-permissions', sharePermissions); if (fileData.shareOwner) { tr.attr('data-share-owner', fileData.shareOwner); |