refactor widget constructor

This commit is contained in:
zadam
2019-08-17 10:45:20 +02:00
parent 723fc42d88
commit 53c4bb8a94
6 changed files with 15 additions and 32 deletions

View File

@@ -5,17 +5,15 @@ import messagingService from "../services/messaging.js";
import StandardWidget from "./standard_widget.js";
class AttributesWidget extends StandardWidget {
constructor(ctx, state) {
super(ctx, state);
this.$title.text("Attributes");
getWidgetTitle() { return "Attributes"; }
getHeaderActions() {
const $showFullButton = $("<a>").append("show dialog").addClass('widget-header-action');
$showFullButton.click(() => {
attributesDialog.showDialog();
});
this.$headerActions.append($showFullButton);
return [$showFullButton];
}
async doRenderBody() {