diff --git a/src/public/app/services/note_autocomplete.js b/src/public/app/services/note_autocomplete.js index 09548284b..dbee214b7 100644 --- a/src/public/app/services/note_autocomplete.js +++ b/src/public/app/services/note_autocomplete.js @@ -105,28 +105,23 @@ function initNoteAutocomplete($el, options) { $el.addClass("note-autocomplete-input"); - const $clearTextButton = $("") - .addClass("input-group-text input-clearer-button bx bxs-tag-x") - .prop("title", "Clear text field"); + const $clearTextButton = $(" @@ -61,7 +61,8 @@ export default class AttachmentActionsWidget extends BasicWidget { doRender() { this.$widget = $(TPL); - this.$widget.on('click', '.dropdown-item', () => this.$widget.find("[data-toggle='dropdown']").dropdown('toggle')); + this.dropdown = bootstrap.Dropdown.getOrCreateInstance(this.$widget.find("[data-bs-toggle='dropdown']")); + this.$widget.on('click', '.dropdown-item', () => this.dropdown.toggle()); this.$uploadNewRevisionInput = this.$widget.find(".attachment-upload-new-revision-input"); this.$uploadNewRevisionInput.on('change', async () => { @@ -84,7 +85,7 @@ export default class AttachmentActionsWidget extends BasicWidget { .addClass("disabled") .append($(' (?)') .attr("title", t('attachments_actions.open_externally_detail_page')) - ); + ); if (isElectron) { const $openAttachmentCustomButton = this.$widget.find("[data-trigger-command='openAttachmentCustom']"); $openAttachmentCustomButton @@ -94,7 +95,7 @@ export default class AttachmentActionsWidget extends BasicWidget { ); } } - if (!isElectron){ + if (!isElectron) { const $openAttachmentCustomButton = this.$widget.find("[data-trigger-command='openAttachmentCustom']"); $openAttachmentCustomButton .addClass("disabled") @@ -138,7 +139,7 @@ export default class AttachmentActionsWidget extends BasicWidget { return; } - const {note: newNote} = await server.post(`attachments/${this.attachmentId}/convert-to-note`) + const { note: newNote } = await server.post(`attachments/${this.attachmentId}/convert-to-note`) toastService.showMessage(t('attachments_actions.convert_success', { title: this.attachment.title })); await ws.waitForMaxKnownEntityChangeId(); await appContext.tabManager.getActiveContext().setNote(newNote.noteId); @@ -155,6 +156,6 @@ export default class AttachmentActionsWidget extends BasicWidget { return; } - await server.put(`attachments/${this.attachmentId}/rename`, {title: attachmentTitle}); + await server.put(`attachments/${this.attachmentId}/rename`, { title: attachmentTitle }); } } diff --git a/src/public/app/widgets/dialogs/add_link.js b/src/public/app/widgets/dialogs/add_link.js index 6bc768a01..e449cd4b4 100644 --- a/src/public/app/widgets/dialogs/add_link.js +++ b/src/public/app/widgets/dialogs/add_link.js @@ -9,13 +9,11 @@ const TPL = `