2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-13 17:26:34 +00:00

Save button

git-svn-id: https://svn.fhem.de/fhem/trunk@1135 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2011-12-16 16:37:09 +00:00
parent 01f48ca6dc
commit 454b579e03
2 changed files with 14 additions and 5 deletions

View File

@ -24,6 +24,7 @@
- feature: notify attribute forwardReturnValue - feature: notify attribute forwardReturnValue
- change: move JsonList from contrib to main-modules - change: move JsonList from contrib to main-modules
- change: JsonList output optimized and more structured - change: JsonList output optimized and more structured
- feature: FHEMWEB save button, smallscreen first screen fix
- 2011-07-08 (5.1) - 2011-07-08 (5.1)

View File

@ -536,6 +536,7 @@ FW_digestCgi($)
$cmd.=" $dev{$c}" if(defined($dev{$c})); $cmd.=" $dev{$c}" if(defined($dev{$c}));
$cmd.=" $arg{$c}" if(defined($arg{$c})); $cmd.=" $arg{$c}" if(defined($arg{$c}));
$cmd.=" $val{$c}" if(defined($val{$c})); $cmd.=" $val{$c}" if(defined($val{$c}));
return $cmd; return $cmd;
} }
@ -707,14 +708,17 @@ FW_roomOverview($)
############## ##############
# HEADER # HEADER
pO "<form method=\"get\" action=\"$FW_ME\">";
pO "<div id=\"hdr\">"; pO "<div id=\"hdr\">";
pO '<table border="0"><tr><td style="padding:0">'; pO '<table border="0"><tr><td style="padding:0">';
pO "<form method=\"get\" action=\"$FW_ME\">";
pO FW_hidden("room", "$FW_room") if($FW_room); pO FW_hidden("room", "$FW_room") if($FW_room);
pO FW_textfield("cmd", $FW_ss ? 25 : 40); pO FW_textfield("cmd", $FW_ss ? 25 : 40);
if(!$FW_ss) {
pO "</form></td><td><form>" . FW_submit("cmd", "save");
}
pO "</form>";
pO "</td></tr></table>"; pO "</td></tr></table>";
pO "</div>"; pO "</div>";
pO "</form>";
############## ##############
# MENU # MENU
@ -738,6 +742,7 @@ FW_roomOverview($)
# Rooms and other links # Rooms and other links
foreach my $r (sort keys %FW_rooms) { foreach my $r (sort keys %FW_rooms) {
next if($r eq "hidden" || $FW_hiddenroom{$r}); next if($r eq "hidden" || $FW_hiddenroom{$r});
$FW_room = $r if(!$FW_room && $FW_ss);
push @list1, $r; push @list1, $r;
push @list2, "$FW_ME?room=$r"; push @list2, "$FW_ME?room=$r";
} }
@ -771,7 +776,9 @@ FW_roomOverview($)
my $sel = ($list1[$idx] eq $FW_room ? " selected=\"selected\"" : ""); my $sel = ($list1[$idx] eq $FW_room ? " selected=\"selected\"" : "");
pO "<option value=$list2[$idx]$sel>$list1[$idx]</option>"; pO "<option value=$list2[$idx]$sel>$list1[$idx]</option>";
} }
pO "</select></td></tr>"; pO "</select></td>";
pO "<td><form method=\"get\" action=\"$FW_ME\">" .
FW_submit("cmd", "save")."</form></td></tr>";
} else { } else {
@ -1819,7 +1826,8 @@ FW_devState($$)
my $txt = $state; my $txt = $state;
if(defined(AttrVal($d, "showtime", undef))) { if(defined(AttrVal($d, "showtime", undef))) {
$txt = $defs{$d}{READINGS}{state}{TIME}; my $v = $defs{$d}{READINGS}{state}{TIME};
$txt = $v if(defined($v));
} elsif($allSets && $allSets =~ m/ desired-temp /) { } elsif($allSets && $allSets =~ m/ desired-temp /) {
$txt = ReadingsVal($d, "measured-temp", ""); $txt = ReadingsVal($d, "measured-temp", "");