mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
simplification of triggering events from links
This commit is contained in:
@@ -7,6 +7,12 @@ class BasicWidget extends Component {
|
||||
|
||||
keyboardActionsService.updateDisplayedShortcuts($widget);
|
||||
|
||||
$widget.find("[data-trigger-event]").on('click', e => {
|
||||
const eventName = $(e.target).attr('data-trigger-event');
|
||||
|
||||
this.appContext.trigger(eventName);
|
||||
});
|
||||
|
||||
return $widget;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user