2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-09 20:57:11 +00:00

55_InfoPanel.pm: updated

added longpoll support
*** experimental, no support in Forum!

git-svn-id: https://svn.fhem.de/fhem/trunk@8085 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2015-02-24 19:38:05 +00:00
parent 45f123edfb
commit 6b0e586cb5

View File

@ -633,6 +633,16 @@ sub btIP_lpItemText {
return "";
}
sub btIP_itemLongpoll {
my ($id,$x,$y,%params)= @_;
my $color = substr($params{rgb},0,6);
my $output = "<div informId=\"$id\" style=\"position:absolute; top:${y}px; left:${x}px; ".
"margin-top:0px; z-index:3; \" >\n".
"</div>\n";
$defs{$params{name}}{fhem}{div} .= $output;
return "";
}
sub btIP_itemTextBox {
my ($id,$x,$y,$boxwidth,$boxheight,$text,$link,%params)= @_;
return unless(defined($text));
@ -1169,6 +1179,14 @@ sub btIP_evalLayout {
$text= AnalyzePerlCommand(undef, $text);
$svg .= btIP_lpItemText($id,$x,$y,$text,%params);
}
when("longpoll") {
($id,$x,$y)= split("[ \t]+", $def, 3);
($x,$y)= btIP_xy($x,$y,%params);
$params{xx} = $x;
$params{yy} = $y;
$svg .= btIP_itemLongpoll($id,$x,$y,%params);
}
when("textbox") {
($id,$x,$y,$boxwidth,$boxheight,$link,$text)= split("[ \t]+", $def, 7);