mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
fixed "show in full search" click and keyboard shortcuts for collapse tree and scroll to active note actions, #1647
This commit is contained in:
parent
3b4fa0c5fc
commit
2388da7cfb
@ -759,7 +759,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
|||||||
await this.setExpandedStatusForSubtree(node, false);
|
await this.setExpandedStatusForSubtree(node, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
collapseTreeCommand() { this.collapseTree(); }
|
collapseTreeEvent() { this.collapseTree(); }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return {FancytreeNode|null}
|
* @return {FancytreeNode|null}
|
||||||
@ -783,7 +783,7 @@ export default class NoteTreeWidget extends TabAwareWidget {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async scrollToActiveNoteCommand() {
|
async scrollToActiveNoteEvent() {
|
||||||
const activeContext = appContext.tabManager.getActiveTabContext();
|
const activeContext = appContext.tabManager.getActiveTabContext();
|
||||||
|
|
||||||
if (activeContext && activeContext.notePath) {
|
if (activeContext && activeContext.notePath) {
|
||||||
|
@ -110,17 +110,21 @@ export default class QuickSearchWidget extends BasicWidget {
|
|||||||
|
|
||||||
this.$dropdownMenu.append($showInFullButton);
|
this.$dropdownMenu.append($showInFullButton);
|
||||||
|
|
||||||
utils.bindElShortcut($showInFullButton, 'return', async () => {
|
$showInFullButton.on('click', () => this.showInFullSearch());
|
||||||
const searchNote = await dateNotesService.createSearchNote({searchString: this.$searchString.val()});
|
|
||||||
|
|
||||||
await appContext.tabManager.getActiveTabContext().setNote(searchNote.noteId);
|
utils.bindElShortcut($showInFullButton, 'return', () => this.showInFullSearch());
|
||||||
});
|
|
||||||
|
|
||||||
utils.bindElShortcut(this.$dropdownMenu.find('.dropdown-item:first'), 'up', () => this.$searchString.focus());
|
utils.bindElShortcut(this.$dropdownMenu.find('.dropdown-item:first'), 'up', () => this.$searchString.focus());
|
||||||
|
|
||||||
this.$dropdownToggle.dropdown('update');
|
this.$dropdownToggle.dropdown('update');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async showInFullSearch() {
|
||||||
|
const searchNote = await dateNotesService.createSearchNote({searchString: this.$searchString.val()});
|
||||||
|
|
||||||
|
await appContext.tabManager.getActiveTabContext().setNote(searchNote.noteId);
|
||||||
|
}
|
||||||
|
|
||||||
quickSearchEvent() {
|
quickSearchEvent() {
|
||||||
this.$searchString.focus();
|
this.$searchString.focus();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user