Compare commits

...

7 commits

Author SHA1 Message Date
GretaD
35f849e428 fixup! fixup! fixup! fixup! fixup! fixup! Fix default action for deleted shares
Signed-off-by: GretaD <gretadoci@gmail.com>
2020-03-05 15:45:13 +01:00
GretaD
170c502f8c fixup! fixup! fixup! fixup! fixup! Fix default action for deleted shares
Signed-off-by: GretaD <gretadoci@gmail.com>
2020-03-05 15:38:43 +01:00
GretaD
b917f32529 fixup! fixup! fixup! fixup! Fix default action for deleted shares
Signed-off-by: GretaD <gretadoci@gmail.com>
2020-03-05 13:34:54 +01:00
GretaD
dff944b774 fixup! fixup! fixup! Fix default action for deleted shares
Signed-off-by: GretaD <gretadoci@gmail.com>
2020-03-05 13:18:36 +01:00
Daniel Calviño Sánchez
4ae94cbe6b fixup! fixup! Fix default action for deleted shares
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
2020-03-03 19:33:12 +01:00
GretaD
c510a60082 fixup! Fix default action for deleted shares
Signed-off-by: GretaD <gretadoci@gmail.com>
2020-02-28 17:04:18 +01:00
GretaD
f8d4254138 Fix default action for deleted shares
Signed-off-by: GretaD <gretadoci@gmail.com>
2020-02-28 15:27:31 +01:00
5 changed files with 29 additions and 5 deletions

View file

@ -312,7 +312,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;
@ -348,6 +349,9 @@ table td.filename .thumbnail {
position: absolute;
z-index: 4;
}
p.name .thumbnail {
cursor: default !important;
}
// Show slight border around previews for images, txt, etc.
table tr[data-has-preview='true'] .thumbnail {
@ -470,7 +474,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;
@ -642,9 +647,8 @@ a.action > img {
}
#fileList tr:hover a.action.disabled:hover * {
cursor: default;
cursor: default !important;
}
.summary {
opacity: .3;
/* add whitespace to bottom of files list to correctly show dropdowns */

View file

@ -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>');

View file

@ -111,6 +111,7 @@ OCA.Sharing.App = {
$el,
{
id: 'shares.deleted',
defaultFileActionsDisabled: true,
showDeleted: true,
sharedWithUser: true,
fileActions: this._restoreShareAction(),

Binary file not shown.

Binary file not shown.