fhem.pl/FHEMWEB: enable eventmap to change the FHEMWEB display (dropdown,dim,etc)

git-svn-id: https://svn.fhem.de/fhem/trunk@3658 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2013-08-10 07:49:51 +00:00
parent 98019e68ab
commit c83de8dcf3
2 changed files with 5 additions and 8 deletions

View File

@@ -2722,13 +2722,9 @@ FW_dropdownFn()
my $fpname = $FW_wname;
$fpname =~ s/.*floorplan\/(\w+)$/$1/; #allow usage of attr fp_setbutton
my $fwsel;
if(AttrVal($fpname,'fp_setbutton',1)) {
$fwsel = FW_select("$d-$cmd","val.$d", \@tv, $txt, "dropdown").
FW_submit("cmd.$d", "set");
} else {
$fwsel = FW_select("$d-$cmd","val.$d", \@tv, $txt,"dropdown","submit()").
FW_hidden("cmd.$d", "set");
}
$fwsel = ($cmd eq "state" ? "" : "$cmd ") .
FW_select("$d-$cmd","val.$d", \@tv, $txt,"dropdown","submit()").
FW_hidden("cmd.$d", "set");
return "<td colspan='2'><form method=\"$FW_formmethod\">".
FW_hidden("arg.$d", $cmd) .

View File

@@ -2878,7 +2878,8 @@ ReplaceEventMap($$$)
my $changed;
my @emList = EventMapAsList($em);
foreach my $rv (@emList) {
my ($re, $val) = split(":", $rv, 2); # Real-Event-Regexp:GivenName
# Real-Event-Regexp:GivenName[:modifier]
my ($re, $val, $modifier) = split(":", $rv, 3);
next if(!defined($val));
if($dir) { # event -> GivenName
if($str =~ m/$re/) {