mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 05:16:45 +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:
parent
0c6e4fbf13
commit
b212f783a3
@ -11,7 +11,7 @@ package main;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
#use Data::Dumper;
|
use Data::Dumper;
|
||||||
|
|
||||||
use feature qw/switch/;
|
use feature qw/switch/;
|
||||||
use vars qw(%data);
|
use vars qw(%data);
|
||||||
@ -160,7 +160,7 @@ sub btIP_readLayout {
|
|||||||
foreach my $ll (@layoutfile) {
|
foreach my $ll (@layoutfile) {
|
||||||
if($ll !~ m/^\@include/) {
|
if($ll !~ m/^\@include/) {
|
||||||
push(@layout2,$ll);
|
push(@layout2,$ll);
|
||||||
} else {
|
} elsif ($ll =~ m/^\@include/) {
|
||||||
my ($cmd, $def) = split("[ \t]+", $ll, 2);
|
my ($cmd, $def) = split("[ \t]+", $ll, 2);
|
||||||
($err,@include) = FileRead($def) if($def);
|
($err,@include) = FileRead($def) if($def);
|
||||||
splice(@layout2,-1,0,@include) unless $err;
|
splice(@layout2,-1,0,@include) unless $err;
|
||||||
@ -170,6 +170,21 @@ sub btIP_readLayout {
|
|||||||
@layout2 = undef;
|
@layout2 = undef;
|
||||||
$hash->{fhem}{layout} = join("\n",@layoutfile);
|
$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;
|
$hash->{fhem}{layout} =~ s/\n\n/\n/g;
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
@ -680,6 +695,7 @@ sub btIP_returnSVG {
|
|||||||
|
|
||||||
my ($width,$height)= split(/x/, AttrVal($name,"size","800x600"));
|
my ($width,$height)= split(/x/, AttrVal($name,"size","800x600"));
|
||||||
my $bgcolor = AnalyzePerlCommand(undef,AttrVal($name,'bgcolor','"000000"'));
|
my $bgcolor = AnalyzePerlCommand(undef,AttrVal($name,'bgcolor','"000000"'));
|
||||||
|
$bgcolor = substr($bgcolor,0,6);
|
||||||
my $output = "";
|
my $output = "";
|
||||||
our $svg = "";
|
our $svg = "";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user