From cc7841b82c7ee7eb72809d05b0e0f68a481d5570 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Wed, 25 Sep 2024 15:21:40 +0200 Subject: [PATCH] Add styling for maps info window The background-color of the info window is always white, so we have to use hard-coded values here. --- .../Core/Component/GoogleMaps/MarkerLoader.ts | 1 + .../Core/Component/GoogleMaps/MarkerLoader.js | 1 + wcfsetup/install/files/style/ui/googleMap.scss | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/ts/WoltLabSuite/Core/Component/GoogleMaps/MarkerLoader.ts b/ts/WoltLabSuite/Core/Component/GoogleMaps/MarkerLoader.ts index 43815a2cbf..ad44a2dab1 100644 --- a/ts/WoltLabSuite/Core/Component/GoogleMaps/MarkerLoader.ts +++ b/ts/WoltLabSuite/Core/Component/GoogleMaps/MarkerLoader.ts @@ -100,6 +100,7 @@ class MarkerLoader { if (data.infoWindow) { const content = document.createElement("div"); + content.classList.add("googleMapsInfoWindow"); DomUtil.setInnerHtml(content, data.infoWindow); const infoWindow = new google.maps.InfoWindow({ diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/GoogleMaps/MarkerLoader.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/GoogleMaps/MarkerLoader.js index 2d661f94ee..be27905084 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Component/GoogleMaps/MarkerLoader.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Component/GoogleMaps/MarkerLoader.js @@ -66,6 +66,7 @@ define(["require", "exports", "tslib", "../../Ajax", "../Dialog", "../../Dom/Uti this.#clusterer.addMarker(marker); if (data.infoWindow) { const content = document.createElement("div"); + content.classList.add("googleMapsInfoWindow"); Util_1.default.setInnerHtml(content, data.infoWindow); const infoWindow = new google.maps.InfoWindow({ headerContent: data.title, diff --git a/wcfsetup/install/files/style/ui/googleMap.scss b/wcfsetup/install/files/style/ui/googleMap.scss index 0a4a26a79c..b27f4e794e 100644 --- a/wcfsetup/install/files/style/ui/googleMap.scss +++ b/wcfsetup/install/files/style/ui/googleMap.scss @@ -64,3 +64,12 @@ margin-top: 5px; text-align: right; } + +.googleMapsInfoWindow { + color: #333; + + a, + a:hover { + color: #369; + } +} -- 2.20.1