mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
add help button to attachment detail as well
This commit is contained in:
parent
906082a6b2
commit
6c1011341c
@ -2,6 +2,7 @@ import TypeWidget from "./type_widget.js";
|
|||||||
import AttachmentDetailWidget from "../attachment_detail.js";
|
import AttachmentDetailWidget from "../attachment_detail.js";
|
||||||
import linkService from "../../services/link.js";
|
import linkService from "../../services/link.js";
|
||||||
import froca from "../../services/froca.js";
|
import froca from "../../services/froca.js";
|
||||||
|
import utils from "../../services/utils.js";
|
||||||
|
|
||||||
const TPL = `
|
const TPL = `
|
||||||
<div class="attachment-detail note-detail-printable">
|
<div class="attachment-detail note-detail-printable">
|
||||||
@ -45,6 +46,9 @@ export default class AttachmentDetailTypeWidget extends TypeWidget {
|
|||||||
this.$wrapper.empty();
|
this.$wrapper.empty();
|
||||||
this.children = [];
|
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(
|
this.$linksWrapper.empty().append(
|
||||||
"Owning note: ",
|
"Owning note: ",
|
||||||
await linkService.createLink(this.noteId),
|
await linkService.createLink(this.noteId),
|
||||||
@ -54,7 +58,8 @@ export default class AttachmentDetailTypeWidget extends TypeWidget {
|
|||||||
viewScope: {
|
viewScope: {
|
||||||
viewMode: 'attachments'
|
viewMode: 'attachments'
|
||||||
}
|
}
|
||||||
})
|
}),
|
||||||
|
$helpButton
|
||||||
);
|
);
|
||||||
|
|
||||||
const attachment = await froca.getAttachment(this.attachmentId, true);
|
const attachment = await froca.getAttachment(this.attachmentId, true);
|
||||||
|
@ -17,17 +17,6 @@ const TPL = `
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: baseline;
|
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>
|
</style>
|
||||||
|
|
||||||
<div class="links-wrapper"></div>
|
<div class="links-wrapper"></div>
|
||||||
|
@ -1056,3 +1056,14 @@ textarea {
|
|||||||
.ck-powered-by-balloon {
|
.ck-powered-by-balloon {
|
||||||
display: none !important;
|
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…
x
Reference in New Issue
Block a user