mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 14:25:51 +01:00
added "what links here" widget
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user