Skip to content

Commit 8ca00c2

Browse files
committed
client: use the icon action style for the help buttons of the attachment pages
1 parent ef0431f commit 8ca00c2

File tree

3 files changed

+22
-19
lines changed

3 files changed

+22
-19
lines changed

src/public/app/widgets/type_widgets/attachment_detail.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,12 @@ export default class AttachmentDetailTypeWidget extends TypeWidget {
4848
this.$wrapper.empty();
4949
this.children = [];
5050

51-
const $helpButton = $(
52-
'<button class="attachment-help-button" type="button" data-help-page="attachments.html" title="' +
53-
t("attachment_detail.open_help_page") +
54-
'"><span class="bx bx-help-circle"></span></button>'
55-
);
51+
const $helpButton = $(`
52+
<button class="attachment-help-button icon-action bx bx-help-circle"
53+
type="button" data-help-page="attachments.html"
54+
title="${t("attachment_detail.open_help_page")}"
55+
</button>
56+
`);
5657
utils.initHelpButtons($helpButton);
5758

5859
this.$linksWrapper.empty().append(

src/public/app/widgets/type_widgets/attachment_list.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,20 @@ export default class AttachmentListTypeWidget extends TypeWidget {
4040
}
4141

4242
async doRefresh(note) {
43-
const $helpButton = $(
44-
'<button class="attachment-help-button" type="button" data-help-page="attachments.html" title="' +
45-
t("attachment_list.open_help_page") +
46-
'"><span class="bx bx-help-circle"></span></button>'
47-
);
43+
const $helpButton = $(`
44+
<button class="attachment-help-button icon-action bx bx-help-circle"
45+
type="button" data-help-page="attachments.html"
46+
title="${t("attachment_list.open_help_page")}">
47+
</button>
48+
`);
4849
utils.initHelpButtons($helpButton);
4950

5051
const noteLink = await linkService.createLink(this.noteId); // do separately to avoid race condition between empty() and .append()
5152
noteLink.addClass("use-tn-links");
5253

5354
this.$linksWrapper.empty().append(
5455
$("<div>").append(t("attachment_list.owning_note"), noteLink),
55-
$("<div>").append(
56+
$(`<div class="attachment-actions-toolbar">`).append(
5657
$('<button class="btn btn-sm">')
5758
.text(t("attachment_list.upload_attachments"))
5859
.on("click", () => this.triggerCommand("showUploadAttachmentsDialog", { noteId: this.noteId })),

src/public/stylesheets/style.css

+9-8
Original file line numberDiff line numberDiff line change
@@ -1536,15 +1536,16 @@ textarea {
15361536
display: none !important;
15371537
}
15381538

1539+
.attachment-actions-toolbar {
1540+
display: flex;
1541+
align-items: center;
1542+
}
1543+
15391544
.attachment-help-button {
1540-
font-size: xx-large;
1541-
border: 0;
1542-
background: none;
1543-
cursor: pointer;
1544-
color: var(--main-text-color);
1545-
margin-left: 20px;
1546-
position: relative;
1547-
top: 8px;
1545+
display: inline-block;
1546+
margin-left: 10px;
1547+
vertical-align: middle;
1548+
font-size: 1em;
15481549
}
15491550

15501551
.jump-to-note-dialog .modal-header {

0 commit comments

Comments
 (0)