2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 09:16:53 +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:
rudolfkoenig 2014-02-24 10:36:47 +00:00
parent d063a739a1
commit 88f7aa1a8f
2 changed files with 4 additions and 3 deletions

View File

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

View File

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