Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
add help button to attachment detail as well
zadam6c1011341cf1
diff --git a/src/public/app/widgets/type_widgets/attachment_detail.js b/src/public/app/widgets/type_widgets/attachment_detail.jsindex 93086bade3..2140e8821d 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 = `<div class="attachment-detail note-detail-printable">@@ -45,6 +46,9 @@ export default class AttachmentDetailTypeWidget extends TypeWidget {this.$wrapper.empty();this.children = [];+ const $helpButton = $('<button class="attachment-help-button" type="button" data-help-page="attachments" title="Open help page on attachments"><span class="bx bx-help-circle"></span></button>');+ 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.jsindex fca0334f15..0e9b1e5a42 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;- }</style><div class="links-wrapper"></div>diff --git a/src/public/stylesheets/style.css b/src/public/stylesheets/style.cssindex 0e70c4f177..aabc5f2b60 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;+}