mirror of
https://github.com/zadam/trilium.git
synced 2024-12-26 09:12:08 +08:00
double click can be also used to choose from recent notes
This commit is contained in:
parent
afff834c55
commit
9d80f56d81
1 changed files with 13 additions and 5 deletions
|
@ -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) {
|
||||
let key = e.which;
|
||||
|
||||
if (key === 13)// the enter key code
|
||||
{
|
||||
let noteId = $("#recentNotesSelectBox option:selected").val();
|
||||
|
||||
$("#tree").fancytree('getNodeByKey', noteId).setActive();
|
||||
|
||||
$("#recentNotesDialog").dialog('close');
|
||||
setActiveNoteBasedOnRecentNotes();
|
||||
}
|
||||
});
|
||||
|
||||
$('#recentNotesSelectBox').dblclick(function(e) {
|
||||
setActiveNoteBasedOnRecentNotes();
|
||||
});
|
Loading…
Reference in a new issue