mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
55_InfoPanel.pm: code cleanup
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@8092 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
e07e67a8bf
commit
602ad5129f
@ -497,16 +497,13 @@ sub btIP_itemLine {
|
|||||||
|
|
||||||
sub btIP_itemLongpoll {
|
sub btIP_itemLongpoll {
|
||||||
my ($id,$x,$y,$text,%params)= @_;
|
my ($id,$x,$y,$text,%params)= @_;
|
||||||
my ($iconURL,$color);
|
|
||||||
unless (defined($text)) {
|
|
||||||
my ($iconName,undef,undef) = FW_dev2image($id);
|
my ($iconName,undef,undef) = FW_dev2image($id);
|
||||||
$iconURL = FW_IconURL($iconName);
|
my $iconURL = FW_IconURL($iconName);
|
||||||
} else {
|
my $color = substr($params{rgb},0,6);
|
||||||
$color = substr($params{rgb},0,6);
|
|
||||||
}
|
|
||||||
my $output = "<div informId=\"$id\" style=\"position:absolute; top:${y}px; left:${x}px; ";
|
my $output = "<div informId=\"$id\" style=\"position:absolute; top:${y}px; left:${x}px; ";
|
||||||
$output .= "font-family:$params{font}; font-size:$params{pt}; color:#$color; " if defined($text);
|
$output .= "font-family:$params{font}; font-size:$params{pt}; color:#$color; " if defined($text);
|
||||||
$output .= "margin-top:0px; z-index:3; \" >\n";
|
$output .= "margin-top:0px; z-index:3; \" >\n";
|
||||||
|
$output .= "$text\n" if defined($text);
|
||||||
$output .= "<img src=\"$iconURL\">\n" unless defined($text);
|
$output .= "<img src=\"$iconURL\">\n" unless defined($text);
|
||||||
$output .= "</div>\n";
|
$output .= "</div>\n";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user