diff --git a/application/src/main/data/json/system/widget_types/image_map.json b/application/src/main/data/json/system/widget_types/image_map.json
index 2a4fe71696..991c0b463f 100644
--- a/application/src/main/data/json/system/widget_types/image_map.json
+++ b/application/src/main/data/json/system/widget_types/image_map.json
@@ -9,9 +9,9 @@
"sizeX": 8.5,
"sizeY": 6,
"resources": [],
- "templateHtml": "\n",
+ "templateHtml": "\n",
"templateCss": "",
- "controllerScript": "self.onInit = function() {\n self.ctx.$scope.mapWidget.onInit();\n};\n\nself.typeParameters = function() {\n return {\n hideDataTab: true,\n hideDataSettings: true,\n previewWidth: '80%',\n embedTitlePanel: true,\n datasourcesOptional: true,\n additionalWidgetActionTypes: ['placeMapItem']\n };\n}\n",
+ "controllerScript": "self.onInit = function() {\n self.ctx.$scope.mapWidget.onInit();\n};\n\nself.typeParameters = function() {\n return {\n hideDataTab: true,\n hideDataSettings: true,\n previewWidth: '80%',\n embedTitlePanel: true,\n embedActionsPanel: true,\n datasourcesOptional: true,\n additionalWidgetActionTypes: ['placeMapItem']\n };\n}\n",
"settingsForm": [],
"dataKeySettingsForm": [],
"settingsDirective": "tb-map-widget-settings",
diff --git a/application/src/main/data/json/system/widget_types/map.json b/application/src/main/data/json/system/widget_types/map.json
index b9069d8af6..e498922d36 100644
--- a/application/src/main/data/json/system/widget_types/map.json
+++ b/application/src/main/data/json/system/widget_types/map.json
@@ -9,9 +9,9 @@
"sizeX": 8.5,
"sizeY": 6,
"resources": [],
- "templateHtml": "\n",
+ "templateHtml": "\n",
"templateCss": "",
- "controllerScript": "self.onInit = function() {\n self.ctx.$scope.mapWidget.onInit();\n};\n\nself.typeParameters = function() {\n return {\n hideDataTab: true,\n hideDataSettings: true,\n previewWidth: '80%',\n embedTitlePanel: true,\n datasourcesOptional: true,\n additionalWidgetActionTypes: ['placeMapItem']\n };\n}\n",
+ "controllerScript": "self.onInit = function() {\n self.ctx.$scope.mapWidget.onInit();\n};\n\nself.typeParameters = function() {\n return {\n hideDataTab: true,\n hideDataSettings: true,\n previewWidth: '80%',\n embedTitlePanel: true,\n embedActionsPanel: true,\n datasourcesOptional: true,\n additionalWidgetActionTypes: ['placeMapItem']\n };\n}\n",
"settingsForm": [],
"dataKeySettingsForm": [],
"settingsDirective": "tb-map-widget-settings",
diff --git a/application/src/main/data/json/system/widget_types/route_map.json b/application/src/main/data/json/system/widget_types/route_map.json
index f1d2cd571c..37346f1157 100644
--- a/application/src/main/data/json/system/widget_types/route_map.json
+++ b/application/src/main/data/json/system/widget_types/route_map.json
@@ -9,9 +9,9 @@
"sizeX": 8.5,
"sizeY": 6,
"resources": [],
- "templateHtml": "\n",
+ "templateHtml": "\n",
"templateCss": "",
- "controllerScript": "self.onInit = function() {\n self.ctx.$scope.mapWidget.onInit();\n};\n\nself.typeParameters = function() {\n return {\n trip: true,\n hideDataTab: true,\n hideDataSettings: true,\n previewWidth: '80%',\n embedTitlePanel: true,\n datasourcesOptional: true,\n additionalWidgetActionTypes: ['placeMapItem']\n };\n}",
+ "controllerScript": "self.onInit = function() {\n self.ctx.$scope.mapWidget.onInit();\n};\n\nself.typeParameters = function() {\n return {\n trip: true,\n hideDataTab: true,\n hideDataSettings: true,\n previewWidth: '80%',\n embedTitlePanel: true,\n embedActionsPanel: true,\n datasourcesOptional: true,\n additionalWidgetActionTypes: ['placeMapItem']\n };\n}",
"settingsForm": [],
"dataKeySettingsForm": [],
"latestDataKeySettingsForm": [],
diff --git a/application/src/main/data/json/system/widget_types/trip_map.json b/application/src/main/data/json/system/widget_types/trip_map.json
index a596e74c1f..8f54f64b6b 100644
--- a/application/src/main/data/json/system/widget_types/trip_map.json
+++ b/application/src/main/data/json/system/widget_types/trip_map.json
@@ -9,9 +9,9 @@
"sizeX": 8.5,
"sizeY": 6,
"resources": [],
- "templateHtml": "\n",
+ "templateHtml": "\n",
"templateCss": "",
- "controllerScript": "self.onInit = function() {\n self.ctx.$scope.mapWidget.onInit();\n};\n\nself.typeParameters = function() {\n return {\n trip: true,\n hideDataTab: true,\n hideDataSettings: true,\n previewWidth: '80%',\n embedTitlePanel: true,\n datasourcesOptional: true,\n additionalWidgetActionTypes: ['placeMapItem']\n };\n}",
+ "controllerScript": "self.onInit = function() {\n self.ctx.$scope.mapWidget.onInit();\n};\n\nself.typeParameters = function() {\n return {\n trip: true,\n hideDataTab: true,\n hideDataSettings: true,\n previewWidth: '80%',\n embedTitlePanel: true,\n embedActionsPanel: true,\n datasourcesOptional: true,\n additionalWidgetActionTypes: ['placeMapItem']\n };\n}",
"settingsForm": [],
"dataKeySettingsForm": [],
"latestDataKeySettingsForm": [],
diff --git a/ui-ngx/src/app/modules/home/components/widget/dynamic-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/dynamic-widget.component.ts
index a0b6f07647..b6919ec670 100644
--- a/ui-ngx/src/app/modules/home/components/widget/dynamic-widget.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/dynamic-widget.component.ts
@@ -19,7 +19,7 @@ import { Directive, inject, Injector, OnDestroy, OnInit } from '@angular/core';
import {
IDynamicWidgetComponent,
widgetContextToken,
- widgetErrorMessagesToken, widgetHeaderButtonActionToken,
+ widgetErrorMessagesToken,
widgetTitlePanelToken
} from '@home/models/widget-component.models';
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
@@ -72,7 +72,6 @@ export class DynamicWidgetComponent extends PageComponent implements IDynamicWid
public readonly ctx = inject(widgetContextToken);
public readonly errorMessages = inject(widgetErrorMessagesToken);
public readonly widgetTitlePanel = inject(widgetTitlePanelToken);
- public readonly widgetHeaderButtonAction = inject(widgetHeaderButtonActionToken);
constructor() {
super();
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget.component.html b/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget.component.html
index 9a200ef88c..e64ee71170 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget.component.html
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget.component.html
@@ -17,10 +17,14 @@
-->
-
-
-
-
+ @if (widgetComponent.dashboardWidget.showWidgetTitlePanel) {
+
+
+
+
+ } @else {
+
+ }
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget.component.scss b/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget.component.scss
index b8167ff06e..eab92a664f 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget.component.scss
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget.component.scss
@@ -34,6 +34,9 @@
div.tb-widget-title {
padding: 0;
}
+ .tb-widget-title-row .tb-widget-actions {
+ margin: 0;
+ }
.tb-widget-actions.tb-widget-actions-absolute {
z-index: 2;
}
diff --git a/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget.component.ts b/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget.component.ts
index 4bb2b11dd3..4ef3c3cd45 100644
--- a/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget.component.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/lib/maps/map-widget.component.ts
@@ -15,14 +15,12 @@
///
import {
- AfterViewInit,
ChangeDetectorRef,
Component,
ElementRef,
Input,
OnDestroy,
OnInit,
- TemplateRef,
ViewChild,
ViewEncapsulation
} from '@angular/core';
@@ -46,7 +44,7 @@ import { DomSanitizer } from '@angular/platform-browser';
styleUrls: ['./map-widget.component.scss'],
encapsulation: ViewEncapsulation.None
})
-export class MapWidgetComponent implements OnInit, OnDestroy, AfterViewInit {
+export class MapWidgetComponent implements OnInit, OnDestroy {
@ViewChild('mapElement', {static: false})
mapElement: ElementRef;
@@ -56,12 +54,6 @@ export class MapWidgetComponent implements OnInit, OnDestroy, AfterViewInit {
@Input()
ctx: WidgetContext;
- @Input()
- widgetTitlePanel: TemplateRef;
-
- @Input()
- widgetHeaderButtonAction: TemplateRef;
-
backgroundStyle$: Observable;
overlayStyle: ComponentStyle = {};
padding: string;
@@ -83,14 +75,6 @@ export class MapWidgetComponent implements OnInit, OnDestroy, AfterViewInit {
this.padding = this.settings.background.overlay.enabled ? undefined : this.settings.padding;
}
- ngAfterViewInit() {
- if (this.widgetComponent.dashboardWidget.showWidgetTitlePanel && !!this.widgetHeaderButtonAction) {
- const tbWidgetTitle = $(".tb-widget-title")[0];
- if (getComputedStyle(tbWidgetTitle).getPropertyValue('min-height') === 'auto')
- tbWidgetTitle.style.minHeight = $(".tb-widget-actions")[0].offsetHeight + 'px';
- }
- }
-
ngOnDestroy() {
if (this.map) {
this.map.destroy();
diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts b/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts
index 1a397d3a1f..f4e69c954c 100644
--- a/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts
+++ b/ui-ngx/src/app/modules/home/components/widget/widget-component.service.ts
@@ -631,6 +631,9 @@ export class WidgetComponentService {
if (isUndefined(result.typeParameters.embedTitlePanel)) {
result.typeParameters.embedTitlePanel = false;
}
+ if (isUndefined(result.typeParameters.embedActionsPanel)) {
+ result.typeParameters.embedActionsPanel = false;
+ }
if (isUndefined(result.typeParameters.overflowVisible)) {
result.typeParameters.overflowVisible = false;
}
diff --git a/ui-ngx/src/app/modules/home/components/widget/widget-container.component.html b/ui-ngx/src/app/modules/home/components/widget/widget-container.component.html
index 55182a8a01..531d0e3529 100644
--- a/ui-ngx/src/app/modules/home/components/widget/widget-container.component.html
+++ b/ui-ngx/src/app/modules/home/components/widget/widget-container.component.html
@@ -33,8 +33,8 @@
-
-
+
+
@@ -45,7 +45,7 @@
[isPreview]="isPreview"
[isMobile]="isMobile"
[widgetTitlePanel]="widgetTitlePanel"
- [widgetHeaderButtonAction]="widgetHeaderButtonAction">
+ [widgetHeaderActionsPanel]="widgetHeaderActionsPanel">
@@ -79,10 +79,10 @@
-
+