mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-26 16:19:32 +00:00
55_InfoPanel.pm: fix perl warnings
git-svn-id: https://svn.fhem.de/fhem/trunk@8142 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
0428d4184e
commit
2c47bd920a
@ -467,6 +467,8 @@ sub _btIP_imgData {
|
|||||||
my $info = image_info(\$arg);
|
my $info = image_info(\$arg);
|
||||||
my $width = $info->{width};
|
my $width = $info->{width};
|
||||||
my $height = $info->{height};
|
my $height = $info->{height};
|
||||||
|
$width =~ s/px//;
|
||||||
|
$height =~ s/px//;
|
||||||
($width,$height)= _btIP_imgRescale($width,$height,$scale);
|
($width,$height)= _btIP_imgRescale($width,$height,$scale);
|
||||||
my $mimetype = $info->{file_media_type};
|
my $mimetype = $info->{file_media_type};
|
||||||
|
|
||||||
@ -500,7 +502,7 @@ sub btIP_itemLine {
|
|||||||
sub btIP_itemLongpoll {
|
sub btIP_itemLongpoll {
|
||||||
my ($id,$x,$y,$text,%params)= @_;
|
my ($id,$x,$y,$text,%params)= @_;
|
||||||
my ($iconName,undef,undef) = FW_dev2image($id);
|
my ($iconName,undef,undef) = FW_dev2image($id);
|
||||||
my $iconURL = FW_IconURL($iconName);
|
my $iconURL = FW_IconURL($iconName) if defined($iconName);
|
||||||
my $color = substr($params{rgb},0,6);
|
my $color = substr($params{rgb},0,6);
|
||||||
my $opacity = hex(substr($params{rgb},6,2))/255;
|
my $opacity = hex(substr($params{rgb},6,2))/255;
|
||||||
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; ";
|
||||||
@ -761,6 +763,7 @@ sub btIP_FileRead {
|
|||||||
|
|
||||||
sub btIP_findTarget {
|
sub btIP_findTarget {
|
||||||
my ($link) = shift;
|
my ($link) = shift;
|
||||||
|
return unless length($link);
|
||||||
my $target = 'secret';
|
my $target = 'secret';
|
||||||
$target = '_top' if $link =~ s/^-//;
|
$target = '_top' if $link =~ s/^-//;
|
||||||
$target = '_blank' if $link =~ s/^\+//;
|
$target = '_blank' if $link =~ s/^\+//;
|
||||||
@ -815,7 +818,7 @@ sub btIP_returnSVG {
|
|||||||
# set the background
|
# set the background
|
||||||
# check if background directory is set
|
# check if background directory is set
|
||||||
my $reason= "?"; # remember reason for undefined image
|
my $reason= "?"; # remember reason for undefined image
|
||||||
my $bgdir= AnalyzePerlCommand(undef,AttrVal($name,"bgdir",undef));
|
my $bgdir= AnalyzePerlCommand(undef,AttrVal($name,"bgdir",""));
|
||||||
if(defined($bgdir)){
|
if(defined($bgdir)){
|
||||||
my $bgnr; # item number
|
my $bgnr; # item number
|
||||||
if(defined($defs{$name}{fhem}) && defined($defs{$name}{fhem}{bgnr})) {
|
if(defined($defs{$name}{fhem}) && defined($defs{$name}{fhem}{bgnr})) {
|
||||||
@ -1086,7 +1089,7 @@ sub btIP_evalLayout {
|
|||||||
when("longpoll") {
|
when("longpoll") {
|
||||||
($id,$x,$y,$text)= split("[ \t]+", $def, 4);
|
($id,$x,$y,$text)= split("[ \t]+", $def, 4);
|
||||||
$text //= undef;
|
$text //= undef;
|
||||||
$text = AnalyzePerlCommand(undef,$text);
|
$text = AnalyzePerlCommand(undef,$text) if defined($text);
|
||||||
($x,$y)= btIP_xy($x,$y,%params);
|
($x,$y)= btIP_xy($x,$y,%params);
|
||||||
$x += $params{groupx};
|
$x += $params{groupx};
|
||||||
$y += $params{groupy};
|
$y += $params{groupy};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user