From 2981961f59c549446aa5fe3efcabe4d5c1658361 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 22 Oct 2020 15:03:42 +0200 Subject: [PATCH] Bring back the restore share button Fix disabled default file action to still use an anchor element, as this is used in many other places (and potentially apps). Adjusted anchor style to not look like it's clickable and added extras to make sure everything inside still looks clickable as before. Signed-off-by: Vincent Petry --- apps/files/css/files.scss | 17 +++++++++++++++++ apps/files/js/filelist.js | 4 +--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/apps/files/css/files.scss b/apps/files/css/files.scss index e875e0da29..aa790e1e68 100644 --- a/apps/files/css/files.scss +++ b/apps/files/css/files.scss @@ -538,6 +538,23 @@ table td.selection { cursor: default !important; } +/* + * Make the disabled link look not like a link in file list rows + */ +#fileList a.name.disabled { + * { + cursor: default; + } + + a, a * { + cursor: pointer; + } + + &:focus { + background: none; + } +} + a.action > img { height: 16px; width: 16px; diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index e7d48d4bcd..f7bc0ecd71 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1561,9 +1561,7 @@ "href": linkUrl }); if (this._defaultFileActionsDisabled) { - linkElem = $('

').attr({ - "class": "name" - }) + linkElem.addClass('disabled'); } linkElem.append('
');