[basicui] Implement color management for setpoint widgets (#147)

Fix openhab/openhab-core#1234

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
pull/149/head
lolodomo 2019-11-26 08:18:01 +01:00 committed by Kai Kreuzer
parent 6d752a30f9
commit e1c150bfe1
2 changed files with 6 additions and 2 deletions

View File

@ -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"

View File

@ -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 );