mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 14:55:50 +01:00
"open" note put into note autocomplete input, also fixes #222
This commit is contained in:
@@ -51,20 +51,6 @@ function getNotePathFromLink($link) {
|
||||
return url ? getNotePathFromUrl(url) : null;
|
||||
}
|
||||
|
||||
function openNotePath(notePath) {
|
||||
treeService.activateNote(notePath);
|
||||
|
||||
// this is quite ugly hack, but it seems like we can't close the tooltip otherwise
|
||||
$("[role='tooltip']").remove();
|
||||
|
||||
if (glob.activeDialog) {
|
||||
try {
|
||||
glob.activeDialog.modal('hide');
|
||||
} catch (e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function goToLink(e) {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -73,7 +59,7 @@ function goToLink(e) {
|
||||
const notePath = getNotePathFromLink($link);
|
||||
|
||||
if (notePath) {
|
||||
openNotePath(notePath);
|
||||
treeService.activateNote(notePath);
|
||||
}
|
||||
else {
|
||||
const address = $link.attr('href');
|
||||
@@ -127,7 +113,7 @@ $(document).on('click', 'span.ck-button__label', e => {
|
||||
const notePath = getNotePathFromUrl(url);
|
||||
|
||||
if (notePath) {
|
||||
openNotePath(notePath);
|
||||
treeService.activateNote(notePath);
|
||||
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user