mirror of
https://github.com/zadam/trilium.git
synced 2025-01-14 19:19:28 +08:00
add help button to attachment detail as well
This commit is contained in:
parent
906082a6b2
commit
6c1011341c
3 changed files with 17 additions and 12 deletions
|
@ -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);
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue