mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Disable default actions in pending file list
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
This commit is contained in:
parent
f3f2faa815
commit
c1563215e6
3 changed files with 11 additions and 0 deletions
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue