Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Disable default actions in pending file list
Signed-off-by: Vincent Petry <[email protected]>
  • Loading branch information
PVince81 committed Aug 10, 2021
commit dde4c9d9dfd5e4f241b0464667c0f2410d9851ed
5 changes: 5 additions & 0 deletions apps/files/js/gotoplugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 2 additions & 0 deletions apps/files_sharing/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
4 changes: 4 additions & 0 deletions apps/files_sharing/src/share.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down