Add styling for maps info window
authorMarcel Werk <burntime@woltlab.com>
Wed, 25 Sep 2024 13:21:40 +0000 (15:21 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 25 Sep 2024 13:21:40 +0000 (15:21 +0200)
The background-color of the info window is always white, so we have to use hard-coded values here.

ts/WoltLabSuite/Core/Component/GoogleMaps/MarkerLoader.ts
wcfsetup/install/files/js/WoltLabSuite/Core/Component/GoogleMaps/MarkerLoader.js
wcfsetup/install/files/style/ui/googleMap.scss

index 43815a2cbf4eaff316c072378587a0fb06d65d2a..ad44a2dab1487fd65db81823578d9b5b3e4f7a67 100644 (file)
@@ -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({
index 2d661f94ee307536ac1ad676c86d03ed7a25cbf8..be279050845a1acb63539dfe1155f71d9e5f85e1 100644 (file)
@@ -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,
index 0a4a26a79c05ae336bdc2636b4ed2f1ed90b0860..b27f4e794e927e70294f55cf46c2e2c2042159bd 100644 (file)
        margin-top: 5px;
        text-align: right;
 }
+
+.googleMapsInfoWindow {
+       color: #333;
+
+       a,
+       a:hover {
+               color: #369;
+       }
+}