mirror of
https://github.com/zadam/trilium.git
synced 2025-11-01 02:45:54 +01:00
feat(popup_editor): integrate with calendar for day notes
This commit is contained in:
@@ -225,6 +225,7 @@ export default class CalendarView extends ViewMode<{}> {
|
|||||||
$(mainContainer ?? e.el).append($(promotedAttributesHtml));
|
$(mainContainer ?? e.el).append($(promotedAttributesHtml));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// Called upon when clicking the day number in the calendar, opens or creates the day note but only if in a calendar root.
|
||||||
dateClick: async (e) => {
|
dateClick: async (e) => {
|
||||||
if (!this.isCalendarRoot) {
|
if (!this.isCalendarRoot) {
|
||||||
return;
|
return;
|
||||||
@@ -232,7 +233,8 @@ export default class CalendarView extends ViewMode<{}> {
|
|||||||
|
|
||||||
const note = await date_notes.getDayNote(e.dateStr);
|
const note = await date_notes.getDayNote(e.dateStr);
|
||||||
if (note) {
|
if (note) {
|
||||||
appContext.tabManager.getActiveContext()?.setNote(note.noteId);
|
appContext.triggerCommand("openInPopup", { noteIdOrPath: note.noteId });
|
||||||
|
appContext.triggerCommand("refreshNoteList", { noteId: this.parentNote.noteId });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
datesSet: (e) => this.#onDatesSet(e),
|
datesSet: (e) => this.#onDatesSet(e),
|
||||||
|
|||||||
Reference in New Issue
Block a user