Fix default action for deleted shares

Signed-off-by: GretaD <gretadoci@gmail.com>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
pull/19698/head
GretaD 5 years ago committed by npmbuildbot[bot]
parent 0d613cd2f0
commit b201121e62
  1. 9
      apps/files/css/files.scss
  2. 21
      apps/files/js/filelist.js
  3. 1
      apps/files_sharing/js/app.js
  4. 2
      apps/files_sharing/js/dist/files_sharing.js
  5. 2
      apps/files_sharing/js/dist/files_sharing.js.map

@ -320,7 +320,8 @@ table td.fileaction {
width: 32px;
text-align: center;
}
table td.filename a.name {
table td.filename a.name,
table td.filename p.name {
display: flex;
position:relative; /* Firefox needs to explicitly have this default set … */
-moz-box-sizing: border-box;
@ -356,6 +357,9 @@ table td.filename .thumbnail {
position: absolute;
z-index: 4;
}
table td.filename p.name .thumbnail {
cursor: default;
}
// Show slight border around previews for images, txt, etc.
table tr[data-has-preview='true'] .thumbnail {
@ -477,7 +481,8 @@ table td.selection {
-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;
width: 80%;
height: 50px;

@ -130,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
@ -292,6 +300,10 @@
this._detailsView.$el.addClass('disappear');
}
if (options && options.defaultFileActionsDisabled) {
this._defaultFileActionsDisabled = options.defaultFileActionsDisabled
}
this._initFileActions(options.fileActions);
if (this._detailsView) {
@ -876,7 +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 (!renaming) {
if (this._defaultFileActionsDisabled) {
event.preventDefault();
} else if (!renaming) {
this.fileActions.currentFile = $tr.find('td');
var mime = this.fileActions.getCurrentMimeType();
var type = this.fileActions.getCurrentType();
@ -1524,6 +1538,11 @@
"class": "name",
"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>');

@ -111,6 +111,7 @@ OCA.Sharing.App = {
$el,
{
id: 'shares.deleted',
defaultFileActionsDisabled: true,
showDeleted: true,
sharedWithUser: true,
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…
Cancel
Save