mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 18:36:30 +01:00 
			
		
		
		
	fix opening note revisions from the sidebar
This commit is contained in:
		| @@ -63,13 +63,3 @@ $list.on('change', () => { | |||||||
|         $content.text("Preview isn't available for this note type."); |         $content.text("Preview isn't available for this note type."); | ||||||
|     } |     } | ||||||
| }); | }); | ||||||
|  |  | ||||||
| $(document).on('click', "a[data-action='note-revision']", event => { |  | ||||||
|     const linkEl = $(event.target); |  | ||||||
|     const noteId = linkEl.attr('data-note-path'); |  | ||||||
|     const noteRevisionId = linkEl.attr('data-note-revision-id'); |  | ||||||
|  |  | ||||||
|     showNoteRevisionsDialog(noteId, noteRevisionId); |  | ||||||
|  |  | ||||||
|     return false; |  | ||||||
| }); |  | ||||||
|   | |||||||
| @@ -172,6 +172,19 @@ function registerEntrypoints() { | |||||||
|         utils.bindGlobalShortcut('ctrl+-', zoomService.decreaseZoomFactor); |         utils.bindGlobalShortcut('ctrl+-', zoomService.decreaseZoomFactor); | ||||||
|         utils.bindGlobalShortcut('ctrl+=', zoomService.increaseZoomFactor); |         utils.bindGlobalShortcut('ctrl+=', zoomService.increaseZoomFactor); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|  |     $(document).on('click', "a[data-action='note-revision']", async event => { | ||||||
|  |         const linkEl = $(event.target); | ||||||
|  |         const noteId = linkEl.attr('data-note-path'); | ||||||
|  |         const noteRevisionId = linkEl.attr('data-note-revision-id'); | ||||||
|  |  | ||||||
|  |         const attributesDialog = await import("../dialogs/note_revisions.js"); | ||||||
|  |  | ||||||
|  |         attributesDialog.showNoteRevisionsDialog(noteId, noteRevisionId); | ||||||
|  |  | ||||||
|  |         return false; | ||||||
|  |     }); | ||||||
|  |  | ||||||
| } | } | ||||||
|  |  | ||||||
| export default { | export default { | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ class NoteRevisionsWidget extends StandardWidget { | |||||||
|         const $showFullButton = $("<a>").append("show dialog").addClass('widget-header-action'); |         const $showFullButton = $("<a>").append("show dialog").addClass('widget-header-action'); | ||||||
|         $showFullButton.click(async () => { |         $showFullButton.click(async () => { | ||||||
|             const attributesDialog = await import("../dialogs/note_revisions.js"); |             const attributesDialog = await import("../dialogs/note_revisions.js"); | ||||||
|             attributesDialog.showDialog(); |             attributesDialog.showCurrentNoteRevisions(this.ctx.note.noteId); | ||||||
|         }); |         }); | ||||||
|  |  | ||||||
|         return [$showFullButton]; |         return [$showFullButton]; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user