From 6c1011341cf1248e97302d0548b1b44a51e4c3ee Mon Sep 17 00:00:00 2001 From: zadam Date: Fri, 14 Jul 2023 22:02:30 +0200 Subject: [PATCH] add help button to attachment detail as well --- .../app/widgets/type_widgets/attachment_detail.js | 7 ++++++- .../app/widgets/type_widgets/attachment_list.js | 11 ----------- src/public/stylesheets/style.css | 11 +++++++++++ 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/public/app/widgets/type_widgets/attachment_detail.js b/src/public/app/widgets/type_widgets/attachment_detail.js index 93086bade..2140e8821 100644 --- a/src/public/app/widgets/type_widgets/attachment_detail.js +++ b/src/public/app/widgets/type_widgets/attachment_detail.js @@ -2,6 +2,7 @@ import TypeWidget from "./type_widget.js"; import AttachmentDetailWidget from "../attachment_detail.js"; import linkService from "../../services/link.js"; import froca from "../../services/froca.js"; +import utils from "../../services/utils.js"; const TPL = `
@@ -45,6 +46,9 @@ export default class AttachmentDetailTypeWidget extends TypeWidget { this.$wrapper.empty(); this.children = []; + const $helpButton = $(''); + utils.initHelpButtons($helpButton); + this.$linksWrapper.empty().append( "Owning note: ", await linkService.createLink(this.noteId), @@ -54,7 +58,8 @@ export default class AttachmentDetailTypeWidget extends TypeWidget { viewScope: { viewMode: 'attachments' } - }) + }), + $helpButton ); const attachment = await froca.getAttachment(this.attachmentId, true); diff --git a/src/public/app/widgets/type_widgets/attachment_list.js b/src/public/app/widgets/type_widgets/attachment_list.js index fca0334f1..0e9b1e5a4 100644 --- a/src/public/app/widgets/type_widgets/attachment_list.js +++ b/src/public/app/widgets/type_widgets/attachment_list.js @@ -17,17 +17,6 @@ const TPL = ` justify-content: space-between; align-items: baseline; } - - .attachment-help-button { - font-size: xx-large; - border: 0; - background: none; - cursor: pointer; - color: var(--main-text-color); - margin-left: 20px; - position: relative; - top: 8px; - } diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.css index 0e70c4f17..aabc5f2b6 100644 --- a/src/public/stylesheets/style.css +++ b/src/public/stylesheets/style.css @@ -1056,3 +1056,14 @@ textarea { .ck-powered-by-balloon { display: none !important; } + +.attachment-help-button { + font-size: xx-large; + border: 0; + background: none; + cursor: pointer; + color: var(--main-text-color); + margin-left: 20px; + position: relative; + top: 8px; +}