mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 03:06:37 +00:00
FHEMWEB: allow space in room selector (from justme1968)
git-svn-id: https://svn.fhem.de/fhem/trunk@5037 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d063a739a1
commit
88f7aa1a8f
@ -914,7 +914,7 @@ FW_doDetail($)
|
||||
FW_makeTable("Readings", $d, $h->{READINGS});
|
||||
|
||||
my $attrList = getAllAttr($d);
|
||||
my $roomList = "multiple,".join(",", sort grep !/ /, keys %FW_rooms);
|
||||
my $roomList = "multiple,".join(",", sort map { $_ =~ s/ /#/g ;$_} keys %FW_rooms);
|
||||
$attrList =~ s/room /room:$roomList /;
|
||||
FW_makeSelect($d, "attr", $attrList,"attr");
|
||||
|
||||
|
@ -8,7 +8,8 @@ FW_multipleSelChange(name, devName, vArr)
|
||||
o.newEl = document.createElement('select');
|
||||
o.newEl.setAttribute('multiple', true);
|
||||
for(var j=1; j < vArr.length; j++) {
|
||||
o.newEl.options[j-1] = new Option(vArr[j], vArr[j]);
|
||||
var s = vArr[j].replace(/#/g," ");
|
||||
o.newEl.options[j-1] = new Option(s, s);
|
||||
}
|
||||
o.qFn = 'FW_multipleSetSelected(qArg, "%")';
|
||||
o.qArg = o.newEl;
|
||||
@ -26,7 +27,7 @@ FW_multipleSetSelected(el, val)
|
||||
for(var i=0;i<l.length;i++)
|
||||
if(el.options[j].value == l[i])
|
||||
el.options[j].selected = true;
|
||||
|
||||
|
||||
if(el.onchange)
|
||||
el.onchange();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user