Skip to content

Commit

Permalink
[BasicUI] Input element: Fix visibility and label/icon color (#2022)
Browse files Browse the repository at this point in the history
Fix #2021 

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
  • Loading branch information
lolodomo authored and kaikreuzer committed Sep 2, 2023
1 parent a7b436f commit 3a5f2c1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions bundles/org.openhab.ui.basic/web-src/smarthome.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,15 @@
splittedIconAttr;

_t.parentNode = parentNode;
_t.formRow = parentNode.parentNode;
if (_t.formRow === undefined) {
_t.formRow = parentNode.parentNode;
}
_t.item = _t.parentNode.getAttribute(o.itemAttribute);
_t.id = _t.parentNode.getAttribute(o.idAttribute);
_t.iconContainer = _t.parentNode.parentNode.querySelector(o.formIcon);
_t.icon = _t.parentNode.parentNode.querySelector(o.formIconImg);
_t.iconContainer = _t.formRow.querySelector(o.formIcon);
_t.icon = _t.formRow.querySelector(o.formIconImg);
_t.visible = !_t.formRow.classList.contains(o.formRowHidden);
_t.label = _t.parentNode.parentNode.querySelector(o.formLabel);
_t.label = _t.formRow.querySelector(o.formLabel);

function convertToInlineSVG() {
this.removeEventListener("load", convertToInlineSVG);
Expand Down Expand Up @@ -1591,6 +1593,7 @@

/* class ControlInput extends Control */
function ControlInput(parentNode) {
this.formRow = parentNode.parentNode.parentNode;
Control.call(this, parentNode);

var
Expand Down

0 comments on commit 3a5f2c1

Please sign in to comment.