fixup! Fix default action for deleted shares

Signed-off-by: GretaD <gretadoci@gmail.com>
This commit is contained in:
GretaD 2020-02-28 17:00:01 +01:00
parent f8d4254138
commit c510a60082
2 changed files with 7 additions and 3 deletions

View file

@ -101,7 +101,7 @@
/** /**
* @type boolean * @type boolean
*/ */
_setDefaultActionsEnabled: true, _defaultActionsEnabled: true,
/** /**
* Number of files per page * Number of files per page
@ -881,7 +881,10 @@
if (!this._detailsView || $(event.target).is('.nametext, .name, .thumbnail') || $(event.target).closest('.nametext').length) { if (!this._detailsView || $(event.target).is('.nametext, .name, .thumbnail') || $(event.target).closest('.nametext').length) {
var filename = $tr.attr('data-file'); var filename = $tr.attr('data-file');
var renaming = $tr.data('renaming'); var renaming = $tr.data('renaming');
if (!renaming && !this.setDefaultActionsEnabled) { if (!this._defaultActionsEnabled) {
event.preventDefault();
}
else if (!renaming) {
this.fileActions.currentFile = $tr.find('td'); this.fileActions.currentFile = $tr.find('td');
var mime = this.fileActions.getCurrentMimeType(); var mime = this.fileActions.getCurrentMimeType();
var type = this.fileActions.getCurrentType(); var type = this.fileActions.getCurrentType();
@ -928,7 +931,7 @@
* Event handler when default action is enabled * Event handler when default action is enabled
*/ */
setDefaultActionsEnabled: function(enabled) { setDefaultActionsEnabled: function(enabled) {
this._setDefaultActionsEnabled = enabled this._defaultActionsEnabled = enabled
}, },
/** /**

View file

@ -112,6 +112,7 @@ OCA.Sharing.App = {
{ {
id: 'shares.deleted', id: 'shares.deleted',
showDeleted: true, showDeleted: true,
setDefaultActionsEnabled: false,
sharedWithUser: true, sharedWithUser: true,
fileActions: this._restoreShareAction(), fileActions: this._restoreShareAction(),
config: OCA.Files.App.getFilesConfig(), config: OCA.Files.App.getFilesConfig(),