diff --git a/bundles/org.openhab.ui.basic/src/main/resources/snippets/icon_oh.html b/bundles/org.openhab.ui.basic/src/main/resources/snippets/icon_oh.html index 8ce6bae8d4..53b690ab8d 100644 --- a/bundles/org.openhab.ui.basic/src/main/resources/snippets/icon_oh.html +++ b/bundles/org.openhab.ui.basic/src/main/resources/snippets/icon_oh.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/bundles/org.openhab.ui.basic/src/main/resources/snippets/icon_oh_no_state.html b/bundles/org.openhab.ui.basic/src/main/resources/snippets/icon_oh_no_state.html index f169482962..2effa429a4 100644 --- a/bundles/org.openhab.ui.basic/src/main/resources/snippets/icon_oh_no_state.html +++ b/bundles/org.openhab.ui.basic/src/main/resources/snippets/icon_oh_no_state.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/bundles/org.openhab.ui.basic/web-src/smarthome.js b/bundles/org.openhab.ui.basic/web-src/smarthome.js index 33b09d35bc..bfd9512030 100644 --- a/bundles/org.openhab.ui.basic/web-src/smarthome.js +++ b/bundles/org.openhab.ui.basic/web-src/smarthome.js @@ -327,7 +327,8 @@ var _t = this, suppress = false, - noneImageSrc = "/icon/none.png"; + noneImageSrc = "/icon/none.png", + splittedIconAttr; _t.parentNode = parentNode; _t.formRow = parentNode.parentNode; @@ -344,7 +345,9 @@ } if (_t.icon !== null) { - _t.iconName = _t.icon.getAttribute(o.iconAttribute); + splittedIconAttr = _t.icon.getAttribute(o.iconAttribute).split(":"); + _t.iconSet = splittedIconAttr[0]; + _t.iconName = splittedIconAttr[1]; if (_t.icon.src !== noneImageSrc) { _t.icon.addEventListener("error", replaceImageWithNone); } @@ -360,6 +363,8 @@ encodeURIComponent(_t.iconName) + "?state=" + encodeURIComponent(state) + + "&iconset=" + + encodeURIComponent(_t.iconSet) + "&format=" + smarthome.UI.iconType + "&anyFormat=true" @@ -368,7 +373,9 @@ _t.icon.setAttribute("src", "/icon/" + encodeURIComponent(_t.iconName) + - "?format=" + + "?iconset=" + + encodeURIComponent(_t.iconSet) + + "&format=" + smarthome.UI.iconType + "&anyFormat=true" );