Fix default action for deleted shares
Signed-off-by: GretaD <gretadoci@gmail.com> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
This commit is contained in:
parent
6e2b7d5167
commit
e1049ad220
|
@ -317,7 +317,8 @@ table td.fileaction {
|
||||||
width: 32px;
|
width: 32px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
table td.filename a.name {
|
table td.filename a.name,
|
||||||
|
table td.filename p.name {
|
||||||
display: flex;
|
display: flex;
|
||||||
position:relative; /* Firefox needs to explicitly have this default set … */
|
position:relative; /* Firefox needs to explicitly have this default set … */
|
||||||
-moz-box-sizing: border-box;
|
-moz-box-sizing: border-box;
|
||||||
|
@ -353,6 +354,9 @@ table td.filename .thumbnail {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 4;
|
z-index: 4;
|
||||||
}
|
}
|
||||||
|
table td.filename p.name .thumbnail {
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
// Show slight border around previews for images, txt, etc.
|
// Show slight border around previews for images, txt, etc.
|
||||||
table tr[data-has-preview='true'] .thumbnail {
|
table tr[data-has-preview='true'] .thumbnail {
|
||||||
|
@ -475,7 +479,8 @@ table td.selection {
|
||||||
-webkit-transition:background-image 500ms; -moz-transition:background-image 500ms; -o-transition:background-image 500ms; transition:background-image 500ms;
|
-webkit-transition:background-image 500ms; -moz-transition:background-image 500ms; -o-transition:background-image 500ms; transition:background-image 500ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
#fileList tr td.filename a.name label {
|
#fileList tr td.filename a.name label,
|
||||||
|
#fileList tr td.filename p.name label {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 80%;
|
width: 80%;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
|
|
|
@ -124,6 +124,14 @@
|
||||||
*/
|
*/
|
||||||
dirInfo: null,
|
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
|
* File actions handler, defaults to OCA.Files.FileActions
|
||||||
* @type OCA.Files.FileActions
|
* @type OCA.Files.FileActions
|
||||||
|
@ -284,6 +292,10 @@
|
||||||
this._detailsView.$el.addClass('disappear');
|
this._detailsView.$el.addClass('disappear');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options && options.defaultFileActionsDisabled) {
|
||||||
|
this._defaultFileActionsDisabled = options.defaultFileActionsDisabled
|
||||||
|
}
|
||||||
|
|
||||||
this._initFileActions(options.fileActions);
|
this._initFileActions(options.fileActions);
|
||||||
|
|
||||||
if (this._detailsView) {
|
if (this._detailsView) {
|
||||||
|
@ -832,7 +844,9 @@
|
||||||
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) {
|
if (this._defaultFileActionsDisabled) {
|
||||||
|
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();
|
||||||
|
@ -1477,6 +1491,11 @@
|
||||||
"class": "name",
|
"class": "name",
|
||||||
"href": linkUrl
|
"href": linkUrl
|
||||||
});
|
});
|
||||||
|
if (this._defaultFileActionsDisabled) {
|
||||||
|
linkElem = $('<p></p>').attr({
|
||||||
|
"class": "name"
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
linkElem.append('<div class="thumbnail-wrapper"><div class="thumbnail" style="background-image:url(' + icon + ');"></div></div>');
|
linkElem.append('<div class="thumbnail-wrapper"><div class="thumbnail" style="background-image:url(' + icon + ');"></div></div>');
|
||||||
|
|
||||||
|
|
|
@ -110,6 +110,7 @@ OCA.Sharing.App = {
|
||||||
$el,
|
$el,
|
||||||
{
|
{
|
||||||
id: 'shares.deleted',
|
id: 'shares.deleted',
|
||||||
|
defaultFileActionsDisabled: true,
|
||||||
showDeleted: true,
|
showDeleted: true,
|
||||||
sharedWithUser: true,
|
sharedWithUser: true,
|
||||||
fileActions: this._restoreShareAction(),
|
fileActions: this._restoreShareAction(),
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue