2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

FHEMWEB: do not reload the page on dropdown change (Forum #26313)

git-svn-id: https://svn.fhem.de/fhem/trunk@6520 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2014-09-08 14:45:10 +00:00
parent a87edbb150
commit cb87fd10f8
2 changed files with 5 additions and 9 deletions

View File

@ -674,7 +674,6 @@ CUL_SendFromQueue($$)
my ($hash, $bstring) = @_;
my $name = $hash->{NAME};
my $hm = ($bstring =~ m/^A/);
my $mz = ($bstring =~ m/^Z/);
my $to = ($hm ? 0.15 : 0.3);
my $now = gettimeofday();
if($bstring ne "") {

View File

@ -2489,15 +2489,12 @@ FW_dropdownFn()
$fpname =~ s/.*floorplan\/(\w+)$/$1/; #allow usage of attr fp_setbutton
my $fwsel;
$fwsel = ($cmd eq "state" ? "" : "$cmd ") .
FW_select("$d-$cmd","val.$d", \@tv, $txt,"dropdown","submit()").
FW_hidden("cmd.$d", "set");
$fwsel .= FW_hidden("fwcsrf", $defs{$FW_wname}{CSRFTOKEN}) if($FW_CSRF);
FW_select("$d-$cmd","val.$d", \@tv, $txt,"dropdown",
"FW_cmd('$FW_ME?XHR=1&cmd.$d=set $d '+ ".
"this.options[this.selectedIndex].value+ ' &room=$FW_room')");
return "<td colspan='2'>".
"$fwsel</td>";
return "<td colspan='2'><form method=\"$FW_formmethod\">".
FW_hidden("arg.$d", $cmd) .
FW_hidden("dev.$d", $d) .
($FW_room ? FW_hidden("room", $FW_room) : "") .
"$fwsel</form></td>";
}
return undef;
}