fixup! fixup! Fix default action for deleted shares
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
c510a60082
commit
4ae94cbe6b
6 changed files with 15 additions and 16 deletions
|
@ -98,11 +98,6 @@
|
|||
*/
|
||||
shown: false,
|
||||
|
||||
/**
|
||||
* @type boolean
|
||||
*/
|
||||
_defaultActionsEnabled: true,
|
||||
|
||||
/**
|
||||
* Number of files per page
|
||||
* Always show a minimum of 1
|
||||
|
@ -135,6 +130,14 @@
|
|||
*/
|
||||
dirInfo: null,
|
||||
|
||||
/**
|
||||
* Whether to prevent or to execute the default file actions when the
|
||||
* file name is clicked.
|
||||
*
|
||||
* @type boolean
|
||||
*/
|
||||
_defaultFileActionsDisabled: false,
|
||||
|
||||
/**
|
||||
* File actions handler, defaults to OCA.Files.FileActions
|
||||
* @type OCA.Files.FileActions
|
||||
|
@ -297,6 +300,10 @@
|
|||
this._detailsView.$el.addClass('disappear');
|
||||
}
|
||||
|
||||
if (options && options.defaultFileActionsDisabled) {
|
||||
this._defaultFileActionsDisabled = options.defaultFileActionsDisabled
|
||||
}
|
||||
|
||||
this._initFileActions(options.fileActions);
|
||||
|
||||
if (this._detailsView) {
|
||||
|
@ -881,10 +888,9 @@
|
|||
if (!this._detailsView || $(event.target).is('.nametext, .name, .thumbnail') || $(event.target).closest('.nametext').length) {
|
||||
var filename = $tr.attr('data-file');
|
||||
var renaming = $tr.data('renaming');
|
||||
if (!this._defaultActionsEnabled) {
|
||||
if (this._defaultFileActionsDisabled) {
|
||||
event.preventDefault();
|
||||
}
|
||||
else if (!renaming) {
|
||||
} else if (!renaming) {
|
||||
this.fileActions.currentFile = $tr.find('td');
|
||||
var mime = this.fileActions.getCurrentMimeType();
|
||||
var type = this.fileActions.getCurrentType();
|
||||
|
@ -927,13 +933,6 @@
|
|||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Event handler when default action is enabled
|
||||
*/
|
||||
setDefaultActionsEnabled: function(enabled) {
|
||||
this._defaultActionsEnabled = enabled
|
||||
},
|
||||
|
||||
/**
|
||||
* Event handler for when clicking on a file's checkbox
|
||||
*/
|
||||
|
|
|
@ -111,8 +111,8 @@ OCA.Sharing.App = {
|
|||
$el,
|
||||
{
|
||||
id: 'shares.deleted',
|
||||
defaultFileActionsDisabled: true,
|
||||
showDeleted: true,
|
||||
setDefaultActionsEnabled: false,
|
||||
sharedWithUser: true,
|
||||
fileActions: this._restoreShareAction(),
|
||||
config: OCA.Files.App.getFilesConfig(),
|
||||
|
|
BIN
apps/files_sharing/js/dist/files_sharing.js
vendored
BIN
apps/files_sharing/js/dist/files_sharing.js
vendored
Binary file not shown.
BIN
apps/files_sharing/js/dist/files_sharing.js.map
vendored
BIN
apps/files_sharing/js/dist/files_sharing.js.map
vendored
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue