added "what links here" widget

This commit is contained in:
zadam
2019-08-19 20:59:40 +02:00
parent c9d0b8cc40
commit 02c9dabcff
7 changed files with 45 additions and 59 deletions

View File

@@ -37,6 +37,13 @@ class StandardWidget {
this.$body = this.$bodyWrapper.find('.card-body');
const maxHeight = this.getMaxHeight();
if (maxHeight) {
this.$body.css("max-height", maxHeight);
this.$body.css("overflow", "auto");
}
this.$widget.on('shown.bs.collapse', () => this.renderBody());
this.$widget.on('shown.bs.collapse', () => this.ctx.stateChanged());
this.$widget.on('hidden.bs.collapse', () => this.ctx.stateChanged());
@@ -50,6 +57,8 @@ class StandardWidget {
getHeaderActions() { return []; }
getMaxHeight() { return null; }
async renderBody() {
if (!this.isVisible() || this.rendered) {
return;