Skip to content

Commit

Permalink
[basicui] Implement color management for setpoint widgets (#147)
Browse files Browse the repository at this point in the history
Fix openhab/openhab-core#1234

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
  • Loading branch information
lolodomo authored and kaikreuzer committed Nov 26, 2019
1 parent 6d752a3 commit e1c150b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
<span class="mdl-form__icon">
<img data-icon="%category%" src="../icon/%category%?state=%state%&format=%icon_type%&anyFormat=true" />
</span>
<span class="mdl-form__label">
<span %labelstyle% class="mdl-form__label">
%label%
</span>
<span class="mdl-form__value mdl-form__value--setpoint">%value%</span>
<span %valuestyle% class="mdl-form__value mdl-form__value--setpoint">%value%</span>
<div
class="mdl-form__control mdl-form__setpoint"
data-control-type="setpoint"
Expand Down
4 changes: 4 additions & 0 deletions bundles/org.openhab.ui.basic/web-src/smarthome.js
Original file line number Diff line number Diff line change
Expand Up @@ -936,6 +936,10 @@
_t.valueNode.innerHTML = value;
};

_t.setValueColor = function(color) {
_t.valueNode.style.color = color;
};

function onMouseDown(up, event) {
var
value = _t.value + ((up === true) ? _t.step : -_t.step );
Expand Down

0 comments on commit e1c150b

Please sign in to comment.