diff options
author | Vincent Petry <vincent@nextcloud.com> | 2021-07-05 12:13:53 +0200 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2021-07-27 12:19:25 +0200 |
commit | c1563215e6916b7e44afa464adbbe60ad3af2755 (patch) | |
tree | c9ee1bd4cdac3b3f56b6f850cc5dc4b8615f52d6 | |
parent | f3f2faa815207b12172cefadcbebe68ab8bffcb3 (diff) | |
download | nextcloud-server-c1563215e6916b7e44afa464adbbe60ad3af2755.tar.gz nextcloud-server-c1563215e6916b7e44afa464adbbe60ad3af2755.zip |
Disable default actions in pending file list
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
-rw-r--r-- | apps/files/js/gotoplugin.js | 5 | ||||
-rw-r--r-- | apps/files_sharing/js/app.js | 2 | ||||
-rw-r--r-- | apps/files_sharing/src/share.js | 4 |
3 files changed, 11 insertions, 0 deletions
diff --git a/apps/files/js/gotoplugin.js b/apps/files/js/gotoplugin.js index 4793420ed2d..d686c7850cf 100644 --- a/apps/files/js/gotoplugin.js +++ b/apps/files/js/gotoplugin.js @@ -29,6 +29,11 @@ if (this.disallowedLists.indexOf(fileList.id) !== -1) { return; } + // lists where the "Open" default action is disabled should + // also have the goto action disabled + if (fileList._defaultFileActionsDisabled) { + return + } var fileActions = fileList.fileActions; fileActions.registerAction({ diff --git a/apps/files_sharing/js/app.js b/apps/files_sharing/js/app.js index 1c01c880a6d..d16bf264cbd 100644 --- a/apps/files_sharing/js/app.js +++ b/apps/files_sharing/js/app.js @@ -141,6 +141,8 @@ OCA.Sharing.App = { { id: 'shares.pending', showPending: true, + detailsViewEnabled: false, + defaultFileActionsDisabled: true, sharedWithUser: true, fileActions: this._acceptShareAction(), config: OCA.Files.App.getFilesConfig(), diff --git a/apps/files_sharing/src/share.js b/apps/files_sharing/src/share.js index bb160f8715d..a7660a29f58 100644 --- a/apps/files_sharing/src/share.js +++ b/apps/files_sharing/src/share.js @@ -232,6 +232,10 @@ import escapeHTML from 'escape-html' }, type: OCA.Files.FileActions.TYPE_INLINE, actionHandler: function(fileName, context) { + // details view disabled in some share lists + if (!fileList._detailsView) { + return + } // do not open sidebar if permission is set and equal to 0 var permissions = parseInt(context.$file.data('share-permissions'), 10) if (isNaN(permissions) || permissions > 0) { |