mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
double click can be also used to choose from recent notes
This commit is contained in:
parent
afff834c55
commit
9d80f56d81
@ -42,15 +42,23 @@ $(document).bind('keypress', 'alt+q', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function setActiveNoteBasedOnRecentNotes() {
|
||||||
|
let noteId = $("#recentNotesSelectBox option:selected").val();
|
||||||
|
|
||||||
|
$("#tree").fancytree('getNodeByKey', noteId).setActive();
|
||||||
|
|
||||||
|
$("#recentNotesDialog").dialog('close');
|
||||||
|
}
|
||||||
|
|
||||||
$('#recentNotesSelectBox').keydown(function(e) {
|
$('#recentNotesSelectBox').keydown(function(e) {
|
||||||
let key = e.which;
|
let key = e.which;
|
||||||
|
|
||||||
if (key === 13)// the enter key code
|
if (key === 13)// the enter key code
|
||||||
{
|
{
|
||||||
let noteId = $("#recentNotesSelectBox option:selected").val();
|
setActiveNoteBasedOnRecentNotes();
|
||||||
|
|
||||||
$("#tree").fancytree('getNodeByKey', noteId).setActive();
|
|
||||||
|
|
||||||
$("#recentNotesDialog").dialog('close');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('#recentNotesSelectBox').dblclick(function(e) {
|
||||||
|
setActiveNoteBasedOnRecentNotes();
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user