add attributes to the sidebar and remove them from the bottom

This commit is contained in:
zadam
2019-08-06 20:05:05 +02:00
parent 6e260ee563
commit c0c36d10e5
6 changed files with 84 additions and 62 deletions

View File

@@ -1,6 +1,7 @@
import NoteInfoWidget from "../widgets/note_info.js";
import LinkMapWidget from "../widgets/link_map.js";
import NoteRevisionsWidget from "../widgets/note_revisions.js";
import AttributesWidget from "../widgets/attributes.js";
const WIDGET_TPL = `
<div class="card widget">
@@ -47,11 +48,21 @@ class Sidebar {
async noteLoaded() {
this.$widgets.empty();
this.addAttributesWidget();
this.addNoteInfoWidget();
this.addLinkMapWidget();
this.addNoteRevisionsWidget();
}
async addAttributesWidget() {
const $widget = this.createWidgetElement();
const attributesWidget = new AttributesWidget(this.ctx, $widget);
await attributesWidget.renderBody();
this.$widgets.append($widget);
}
async addNoteInfoWidget() {
const $widget = this.createWidgetElement();