converting sidebar widgets to normal widgets

This commit is contained in:
zadam
2020-01-14 21:23:32 +01:00
parent 23701219e1
commit c9770573b2
14 changed files with 99 additions and 126 deletions

View File

@@ -29,15 +29,17 @@ class CalendarWidget extends StandardWidget {
async isEnabled() {
return await super.isEnabled()
&& await this.ctx.note.hasLabel("dateNote");
&& await this.tabContext.note.hasLabel("dateNote");
}
async doRenderBody() {
await libraryLoader.requireLibrary(libraryLoader.CALENDAR_WIDGET);
this.$body.html(TPL);
}
this.init(this.$body, await this.ctx.note.getLabelValue("dateNote"));
async activeTabChanged() {
this.init(this.$body, await this.tabContext.note.getLabelValue("dateNote"));
}
init($el, activeDate) {