mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	Add Ctrl+Shift+L to pre-select "add to note"
This commit is contained in:
		| @@ -24,7 +24,11 @@ function setLinkType(linkType) { | ||||
|     linkTypeChanged(); | ||||
| } | ||||
|  | ||||
| async function showDialog() { | ||||
| async function showDialogForClone() { | ||||
|     showDialog('selected-to-current'); | ||||
| } | ||||
|  | ||||
| async function showDialog(linkType) { | ||||
|     glob.activeDialog = $dialog; | ||||
|  | ||||
|     if (noteDetailService.getActiveNoteType() === 'text') { | ||||
| @@ -38,6 +42,10 @@ async function showDialog() { | ||||
|         setLinkType('selected-to-current'); | ||||
|     } | ||||
|  | ||||
|     if (linkType==='selected-to-current') { | ||||
|         setLinkType(linkType); | ||||
|     } | ||||
|  | ||||
|     $dialog.modal(); | ||||
|  | ||||
|     $autoComplete.val('').focus(); | ||||
| @@ -142,5 +150,6 @@ $linkTypes.change(linkTypeChanged); | ||||
| $dialog.on("hidden.bs.modal", () => noteDetailText.focus()); | ||||
|  | ||||
| export default { | ||||
|     showDialog | ||||
|     showDialog, | ||||
|     showDialogForClone | ||||
| }; | ||||
| @@ -23,6 +23,7 @@ function registerEntrypoints() { | ||||
|     jQuery.hotkeys.options.filterTextInputs = false; | ||||
|  | ||||
|     utils.bindShortcut('ctrl+l', addLinkDialog.showDialog); | ||||
|     utils.bindShortcut('ctrl+shift+l', addLinkDialog.showDialogForClone); | ||||
|  | ||||
|     $("#jump-to-note-dialog-button").click(jumpToNoteDialog.showDialog); | ||||
|     utils.bindShortcut('ctrl+j', jumpToNoteDialog.showDialog); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user