diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html index 44785be367..6944f79545 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.html @@ -277,7 +277,7 @@ 'tb-dashboard-toolbar-animated': isToolbarOpenedAnimate, 'tb-dashboard-toolbar-closed': !toolbarOpened }"> - +

{{ translatedDashboardTitle }}

diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts index 84c5c752ca..0daabc7611 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.component.ts @@ -222,6 +222,8 @@ export class DashboardPageComponent extends PageComponent implements IDashboardC @ViewChild('dashboardContainer') dashboardContainer: ElementRef; + @ViewChild('dashboardContent', {read: ElementRef}) dashboardContent: ElementRef; + prevDashboard: Dashboard; iframeMode = this.utils.iframeMode; diff --git a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.models.ts b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.models.ts index 8ce2ab0679..90b838171c 100644 --- a/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.models.ts +++ b/ui-ngx/src/app/modules/home/components/dashboard-page/dashboard-page.models.ts @@ -56,6 +56,7 @@ export interface DashboardContext { export interface IDashboardController { dashboardCtx: DashboardContext; dashboardContainer: ElementRef; + dashboardContent: ElementRef; elRef: ElementRef; openRightLayout(); openDashboardState(stateId: string, openRightLayout: boolean); diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-container.component.scss b/ui-ngx/src/app/modules/home/components/widget/widget-container.component.scss index 02b6d2737b..c452054c90 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget-container.component.scss +++ b/ui-ngx/src/app/modules/home/components/widget/widget-container.component.scss @@ -173,6 +173,7 @@ gridster-item:hover { } .tooltipster-sidetip.tb-widget-edit-actions-tooltip { + position: absolute !important; .tooltipster-box { user-select: none; background: #fff; diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-container.component.ts b/ui-ngx/src/app/modules/home/components/widget/widget-container.component.ts index b45b3432c4..0032ef35b4 100644 --- a/ui-ngx/src/app/modules/home/components/widget/widget-container.component.ts +++ b/ui-ngx/src/app/modules/home/components/widget/widget-container.component.ts @@ -148,9 +148,9 @@ export class WidgetContainerComponent extends PageComponent implements OnInit, O $(this.gridsterItem.el).on('mousedown', (e) => this.onMouseDown(e.originalEvent)); $(this.gridsterItem.el).on('click', (e) => this.onClicked(e.originalEvent)); $(this.gridsterItem.el).on('contextmenu', (e) => this.onContextMenu(e.originalEvent)); - const dashboardElement = this.widget.widgetContext.dashboardPageElement; - if (dashboardElement) { - this.initEditWidgetActionTooltip(dashboardElement); + const dashboardContentElement = this.widget.widgetContext.dashboardContentElement; + if (dashboardContentElement) { + this.initEditWidgetActionTooltip(dashboardContentElement); } } diff --git a/ui-ngx/src/app/modules/home/models/widget-component.models.ts b/ui-ngx/src/app/modules/home/models/widget-component.models.ts index fa4d367959..5a1a28472e 100644 --- a/ui-ngx/src/app/modules/home/models/widget-component.models.ts +++ b/ui-ngx/src/app/modules/home/models/widget-component.models.ts @@ -184,6 +184,10 @@ export class WidgetContext { return this.dashboard?.stateController?.dashboardCtrl?.elRef?.nativeElement; } + get dashboardContentElement(): HTMLElement { + return this.dashboard?.stateController?.dashboardCtrl?.dashboardContent?.nativeElement; + } + authService: AuthService; deviceService: DeviceService; assetService: AssetService;