2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 16:56:54 +00:00

55_InfoPanel.pm: updated

git-svn-id: https://svn.fhem.de/fhem/trunk@7958 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
betateilchen 2015-02-13 19:13:29 +00:00
parent 0c6e4fbf13
commit b212f783a3

View File

@ -11,7 +11,7 @@ package main;
use strict;
use warnings;
#use Data::Dumper;
use Data::Dumper;
use feature qw/switch/;
use vars qw(%data);
@ -160,8 +160,8 @@ sub btIP_readLayout {
foreach my $ll (@layoutfile) {
if($ll !~ m/^\@include/) {
push(@layout2,$ll);
} else {
my ($cmd, $def)= split("[ \t]+", $ll, 2);
} elsif ($ll =~ m/^\@include/) {
my ($cmd, $def) = split("[ \t]+", $ll, 2);
($err,@include) = FileRead($def) if($def);
splice(@layout2,-1,0,@include) unless $err;
}
@ -170,6 +170,21 @@ sub btIP_readLayout {
@layout2 = undef;
$hash->{fhem}{layout} = join("\n",@layoutfile);
}
while($hash->{fhem}{layout} =~ m/\@finclude/ ) {
my (@layout2,@include);
foreach my $ll (@layoutfile) {
if($ll !~ m/^\@finclude/) {
push(@layout2,$ll);
} else {
my ($cmd, $def) = split("[ \t]+", $ll, 2);
@include = split("\n",AnalyzePerlCommand(undef,$def));
splice(@layout2,-1,0,@include);
}
}
@layoutfile = @layout2;
@layout2 = undef;
$hash->{fhem}{layout} = join("\n",@layoutfile);
}
$hash->{fhem}{layout} =~ s/\n\n/\n/g;
}
return;
@ -680,6 +695,7 @@ sub btIP_returnSVG {
my ($width,$height)= split(/x/, AttrVal($name,"size","800x600"));
my $bgcolor = AnalyzePerlCommand(undef,AttrVal($name,'bgcolor','"000000"'));
$bgcolor = substr($bgcolor,0,6);
my $output = "";
our $svg = "";