diff --git a/package-lock.json b/package-lock.json index d8d768703..3b425515d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "trilium", - "version": "0.40.6", + "version": "0.40.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/public/javascripts/widgets/note_actions.js b/src/public/javascripts/widgets/note_actions.js index 6bf0569aa..37216a720 100644 --- a/src/public/javascripts/widgets/note_actions.js +++ b/src/public/javascripts/widgets/note_actions.js @@ -10,6 +10,7 @@ const TPL = ` .note-actions .dropdown-item[disabled], .note-actions .dropdown-item[disabled]:hover { color: var(--muted-text-color) !important; background-color: transparent !important; + pointer-events: none; /* makes it unclickable */ } @@ -64,14 +65,4 @@ export default class NoteActionsWidget extends TabAwareWidget { this.$exportNoteButton.attr('disabled', 'disabled'); } } - - triggerEvent(e, eventName) { - const $item = $(e.target).closest('dropdown-item'); - - if ($item.is('[disabled]')) { - return; - } - - this.triggerEvent(eventName); - } } \ No newline at end of file diff --git a/src/public/javascripts/widgets/type_widgets/book.js b/src/public/javascripts/widgets/type_widgets/book.js index 13ba4a55b..159be7e7b 100644 --- a/src/public/javascripts/widgets/type_widgets/book.js +++ b/src/public/javascripts/widgets/type_widgets/book.js @@ -158,46 +158,62 @@ export default class BookTypeWidget extends TypeWidget { this.$help.show(); } + const imageLinks = note.getRelations('imageLink'); + for (const childNote of childNotes) { - const childNotePath = this.notePath + '/' + childNote.noteId; - - const $content = $('
), then just make it empty // this is important when setting new note to code - return this.isContentEmpty(content) ? '' : content; - } - - isContentEmpty(content) { - content = content.toLowerCase(); - - return jQuery(content).text().trim() === '' - && !content.includes("