redirectCmds
git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@1249 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
1
CHANGED
1
CHANGED
@@ -11,6 +11,7 @@
|
|||||||
- feature: NetIO230B module by Andy
|
- feature: NetIO230B module by Andy
|
||||||
- feature: Retaining configfile comments (not within a define statement)
|
- feature: Retaining configfile comments (not within a define statement)
|
||||||
- feature: EnOcean PM101 by Ignaz
|
- feature: EnOcean PM101 by Ignaz
|
||||||
|
- feature: FHEMWEB redirectCmds attribute added
|
||||||
|
|
||||||
- 2011-12-31 (5.2)
|
- 2011-12-31 (5.2)
|
||||||
- bugfix: applying smallscreen attributes to firefox/opera
|
- bugfix: applying smallscreen attributes to firefox/opera
|
||||||
|
|||||||
@@ -7348,6 +7348,16 @@ href="http://www.elv.de/output/controller.aspx?cid=74&detail=10&detail2=29870">U
|
|||||||
</li>
|
</li>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<a name="redirectCmds"></a>
|
||||||
|
<li>redirectCmds<br>
|
||||||
|
Clear the browser URL window after issuing the command by redirecting
|
||||||
|
the browser, as a reload for the same site might have unintended
|
||||||
|
side-effects. Default is 1 (enabled). Disable it by setting this
|
||||||
|
attribute to 0 if you want to study the command syntax, in order to
|
||||||
|
communicate with FHEMWEB.
|
||||||
|
</li>
|
||||||
|
<br>
|
||||||
|
|
||||||
<a name="webCmd"></a>
|
<a name="webCmd"></a>
|
||||||
<li>webCmd<br>
|
<li>webCmd<br>
|
||||||
Colon separated list of commands to be shown in the room overview for a
|
Colon separated list of commands to be shown in the room overview for a
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ FHEMWEB_Initialize($)
|
|||||||
$hash->{AttrList}= "loglevel:0,1,2,3,4,5,6 webname fwmodpath fwcompress " .
|
$hash->{AttrList}= "loglevel:0,1,2,3,4,5,6 webname fwmodpath fwcompress " .
|
||||||
"plotmode:gnuplot,gnuplot-scroll,SVG plotsize refresh " .
|
"plotmode:gnuplot,gnuplot-scroll,SVG plotsize refresh " .
|
||||||
"touchpad smallscreen plotfork basicAuth basicAuthMsg ".
|
"touchpad smallscreen plotfork basicAuth basicAuthMsg ".
|
||||||
"stylesheetPrefix hiddenroom HTTPS longpoll";
|
"stylesheetPrefix hiddenroom HTTPS longpoll redirectCmds";
|
||||||
|
|
||||||
###############
|
###############
|
||||||
# Initialize internal structures
|
# Initialize internal structures
|
||||||
@@ -436,6 +436,19 @@ FW_AnswerCall($)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Redirect after a command, to clean the browser URL window
|
||||||
|
if($docmd && !$FW_cmdret && AttrVal($FW_wname, "redirectCmds", 1)) {
|
||||||
|
my $tgt = $FW_ME;
|
||||||
|
if($FW_detail) { $tgt .= "?detail=$FW_detail" }
|
||||||
|
elsif($FW_room) { $tgt .= "?room=$FW_room" }
|
||||||
|
my $c = $defs{$FW_cname}{CD};
|
||||||
|
print $c "HTTP/1.1 302 Found\r\n",
|
||||||
|
"Content-Length: 0\r\n",
|
||||||
|
"Location: $tgt\r\n",
|
||||||
|
"\r\n";
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
FW_updateHashes();
|
FW_updateHashes();
|
||||||
if($cmd =~ m/^showlog /) {
|
if($cmd =~ m/^showlog /) {
|
||||||
FW_showLog($cmd);
|
FW_showLog($cmd);
|
||||||
@@ -501,6 +514,7 @@ FW_AnswerCall($)
|
|||||||
FW_pO $FW_cmdret;
|
FW_pO $FW_cmdret;
|
||||||
}
|
}
|
||||||
FW_pO "</div>";
|
FW_pO "</div>";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FW_roomOverview($cmd);
|
FW_roomOverview($cmd);
|
||||||
@@ -1528,6 +1542,7 @@ FW_style($$)
|
|||||||
my $ret = FW_fC("rereadcfg") if($fName eq $attr{global}{configfile});
|
my $ret = FW_fC("rereadcfg") if($fName eq $attr{global}{configfile});
|
||||||
$ret = ($ret ? "<h3>ERROR:</h3><b>$ret</b>" : "Saved the file $fName");
|
$ret = ($ret ? "<h3>ERROR:</h3><b>$ret</b>" : "Saved the file $fName");
|
||||||
FW_style("style list", $ret);
|
FW_style("style list", $ret);
|
||||||
|
$ret = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user