Add Ctrl+Shift+L to pre-select "add to note"

This commit is contained in:
Martin Carpella
2019-03-25 21:09:15 +01:00
parent 001bd1d004
commit 44c742e839
2 changed files with 12 additions and 2 deletions

View File

@@ -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
};