mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Add Ctrl+Shift+L to pre-select "add to note"
This commit is contained in:
parent
001bd1d004
commit
44c742e839
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user