From 898b519c77a6caf55d3b7803e655f4886c2091a7 Mon Sep 17 00:00:00 2001 From: Mark Herwege Date: Tue, 2 Jan 2024 19:26:18 +0100 Subject: [PATCH] [BasicUI] icon.png minimal fix (#2232) See comment https://github.com/openhab/openhab-webui/pull/2231#issuecomment-1867570889 This is the minimal fix to the issue. Signed-off-by: Mark Herwege --- .../org/openhab/ui/basic/internal/render/ChartRenderer.java | 2 +- .../org/openhab/ui/basic/internal/render/ImageRenderer.java | 2 +- .../org/openhab/ui/basic/internal/render/VideoRenderer.java | 2 +- bundles/org.openhab.ui.basic/web-src/smarthome.js | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/ChartRenderer.java b/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/ChartRenderer.java index 33d0d110f2..5b58674f71 100644 --- a/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/ChartRenderer.java +++ b/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/ChartRenderer.java @@ -58,7 +58,7 @@ public ChartRenderer(final BundleContext bundleContext, final @Reference Transla private final Logger logger = LoggerFactory.getLogger(ChartRenderer.class); - private static final String URL_NONE_ICON = "/icon/none.svg"; + private static final String URL_NONE_ICON = "images/none.png"; @Override public boolean canRender(Widget w) { diff --git a/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/ImageRenderer.java b/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/ImageRenderer.java index d8fe6a586c..462efdbfc6 100644 --- a/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/ImageRenderer.java +++ b/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/ImageRenderer.java @@ -43,7 +43,7 @@ @NonNullByDefault public class ImageRenderer extends AbstractWidgetRenderer { - private static final String URL_NONE_ICON = "/icon/none.svg"; + private static final String URL_NONE_ICON = "images/none.png"; @Activate public ImageRenderer(final BundleContext bundleContext, final @Reference TranslationProvider i18nProvider, diff --git a/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/VideoRenderer.java b/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/VideoRenderer.java index db3875bf0b..4a19b2fd40 100644 --- a/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/VideoRenderer.java +++ b/bundles/org.openhab.ui.basic/src/main/java/org/openhab/ui/basic/internal/render/VideoRenderer.java @@ -41,7 +41,7 @@ @NonNullByDefault public class VideoRenderer extends AbstractWidgetRenderer { - private static final String URL_NONE_ICON = "/icon/none.svg"; + private static final String URL_NONE_ICON = "images/none.png"; @Activate public VideoRenderer(final BundleContext bundleContext, final @Reference TranslationProvider i18nProvider, diff --git a/bundles/org.openhab.ui.basic/web-src/smarthome.js b/bundles/org.openhab.ui.basic/web-src/smarthome.js index c0cc552869..26bc52877c 100644 --- a/bundles/org.openhab.ui.basic/web-src/smarthome.js +++ b/bundles/org.openhab.ui.basic/web-src/smarthome.js @@ -349,7 +349,7 @@ var _t = this, suppress = false, - noneImageSrc = "/icon/none.svg"; + noneImageSrc = "images/none.png"; _t.parentNode = parentNode; if (_t.formRow === undefined) { @@ -697,7 +697,7 @@ var _t = this, interval = null, - urlNoneIcon = "/icon/none.svg"; + urlNoneIcon = "images/none.png"; _t.image = parentNode.querySelector("img"); _t.updateInterval = parseInt(parentNode.getAttribute("data-update-interval"), 10); @@ -951,7 +951,7 @@ var _t = this, urlMarkerOffIcon = "images/map-marker-off.png", - urlNoneIcon = "/icon/none.svg"; + urlNoneIcon = "images/none.png"; _t.iframe = parentNode.querySelector("iframe"); _t.url = parentNode.getAttribute("data-map-url");