From 6b0e586cb5b93207b2b8041924cbfa44927b12ca Mon Sep 17 00:00:00 2001 From: betateilchen <> Date: Tue, 24 Feb 2015 19:38:05 +0000 Subject: [PATCH] 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 --- fhem/FHEM/55_InfoPanel.pm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/fhem/FHEM/55_InfoPanel.pm b/fhem/FHEM/55_InfoPanel.pm index e3638d96a..7a5376d51 100644 --- a/fhem/FHEM/55_InfoPanel.pm +++ b/fhem/FHEM/55_InfoPanel.pm @@ -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 = "
\n". + "
\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);