mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 18:59:33 +00:00
Updated loglevel -> verbose, added fp_roomIcons
git-svn-id: https://svn.fhem.de/fhem/trunk@4788 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
67125a5a05
commit
a9daa61961
@ -41,6 +41,7 @@
|
||||
# 0030: Style4 (S300TH) now works with longpoll without loosing its formatting (Dec 24, 2013)
|
||||
# 0031: Text "desiredTemperature" will also be eliminated - for MAX devices (Dec 25, 2013)
|
||||
# 0032: Ensure URL always contains floorplan-name (redirect if !htmlarg[0]) as basis for fp-specific icon-folder (Jan 06, 2014)
|
||||
# 0033: Updated loglevel -> verbose, added fp_roomIcons (Feb 2, 2014)
|
||||
#
|
||||
################################################################
|
||||
#
|
||||
@ -150,8 +151,9 @@ FLOORPLAN_Initialize($)
|
||||
$hash->{DefFn} = "FP_define";
|
||||
$hash->{GetFn} = "FP_Get";
|
||||
$hash->{FW_detailFn} = "FP_detailFn"; #floorplan-specific detail-screen
|
||||
$hash->{AttrList} = "loglevel:0,1,2,3,4,5,6 refresh fp_arrange:1,detail,WEB,0 commandfield:1,0 fp_default:1,0 ".
|
||||
"stylesheet fp_noMenu:1,0 fp_backgroundimg fp_setbutton:1,0 fp_viewport";
|
||||
$hash->{AttrList} = "refresh fp_arrange:1,detail,WEB,0 commandfield:1,0 fp_default:1,0 ".
|
||||
"stylesheet fp_noMenu:1,0 fp_backgroundimg fp_setbutton:1,0 fp_viewport ".
|
||||
"fp_roomIcons";
|
||||
# CGI
|
||||
my $name = "floorplan";
|
||||
my $fhem_url = "/" . $name ;
|
||||
@ -180,7 +182,8 @@ FP_define(){
|
||||
my $name = $hash->{NAME};
|
||||
if (AttrVal("global","userattr","") !~ m/fp_$name/) {
|
||||
addToAttrList("fp_$name"); # create userattr fp_<name> if it doesn't exist yet
|
||||
Log 3, "Floorplan - added global userattr fp_$name";
|
||||
# Log 3, "Floorplan - added global userattr fp_$name";
|
||||
Log3 $name, 3, "Floorplan - added global userattr fp_$name";
|
||||
}
|
||||
return undef;
|
||||
}
|
||||
@ -256,8 +259,8 @@ FP_CGI(){
|
||||
## process cgi
|
||||
my $commands = FP_digestCgi($htmlpart[1]) if $htmlpart[1]; # analyze URL-commands
|
||||
my $FP_ret = AnalyzeCommand(undef, $commands) if $commands; # Execute commands
|
||||
Log 1, "FLOORPLAN: regex-error. commands: $commands; FP_ret: $FP_ret" if($FP_ret && ($FP_ret =~ m/regex/ )); #test
|
||||
|
||||
# Log 1, "FLOORPLAN: regex-error. commands: $commands; FP_ret: $FP_ret" if($FP_ret && ($FP_ret =~ m/regex/ )); #test
|
||||
Log3 "FLOORPLAN", 1, "FLOORPLAN: regex-error. commands: $commands; FP_ret: $FP_ret" if($FP_ret && ($FP_ret =~ m/regex/ )); #test
|
||||
#####redirect URL - either back to fhemweb-detailscreen, or for redirectCmds to suppress repeated execution of commands upon browser refresh
|
||||
my $me = $defs{$FW_cname}; # from FHEMWEB: Current connection name
|
||||
my $tgt = undef;
|
||||
@ -620,7 +623,12 @@ FP_menu() {
|
||||
foreach my $f (sort keys %defs) {
|
||||
next if ($defs{$f}{TYPE} ne "FLOORPLAN");
|
||||
FW_pO "<tr><td>";
|
||||
FW_pH "$FW_ME/floorplan/$f", $f, 0;
|
||||
# FW_pH "$FW_ME/floorplan/$f", $f, 0;
|
||||
my $icoName = "ico$f";
|
||||
map { my ($n,$v) = split(":",$_); $icoName=$v if($f =~ m/$n/); }
|
||||
split(" ", AttrVal($FP_name, "fp_roomIcons", ""));
|
||||
my $icon = FW_iconName($icoName) ? FW_makeImage($icoName,$icoName,"icon")." " : "";
|
||||
FW_pO "<a href=\"$FW_ME/floorplan/$f\">$icon$f</a></td>";
|
||||
FW_pO "</td></tr>";
|
||||
}
|
||||
FW_pO "</table><br>";
|
||||
@ -987,6 +995,14 @@ FP_pOfill($@) {
|
||||
Default-viewport-value is "width=768".
|
||||
</li>
|
||||
|
||||
<a name="fp_roomIcons"></a>
|
||||
<li>fp_roomIcons<br>
|
||||
Space separated list of floorplan:icon pairs, to assign icons
|
||||
to the floorplan-menu, just like the functionality for rooms
|
||||
in FHEMWEB. Example:<br>
|
||||
attr Grundriss fp_roomIcons Grundriss:control_building_empty Media:audio_eq
|
||||
</li>
|
||||
|
||||
<li><a name="fp_inherited">Inherited from FHEMWEB</a><br>
|
||||
The following attributes are inherited from the underlying <a href="#FHEMWEB">FHEMWEB</a> instance:<br>
|
||||
<ul>
|
||||
@ -1147,6 +1163,15 @@ FP_pOfill($@) {
|
||||
Die Default-viewport-Angbe ist "width=768".
|
||||
</li>
|
||||
|
||||
<a name="fp_roomIcons"></a>
|
||||
<li>fp_roomIcons<br>
|
||||
Mit Leerstellen getrennte Liste von floorplan:icon -Paaren, um
|
||||
einem Eintrag des floorplan-Menues icons zuzuordnen, genau wie
|
||||
die entsprechende Funktionalitaet in FHEMWEB. Beispiel:<br>
|
||||
attr Grundriss fp_roomIcons Grundriss:control_building_empty Media:audio_eq
|
||||
</li>
|
||||
|
||||
|
||||
<li><a name="fp_inherited">Vererbt von FHEMWEB</a><br>
|
||||
Die folgenden Attribute werden von der zugrundliegenden <a href="#FHEMWEB">FHEMWEB</a>-Instanz vererbt:<br>
|
||||
<ul>
|
||||
|
Loading…
Reference in New Issue
Block a user