mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 06:39:11 +00:00
Opening commandref.html in the browser works now if there are two links
(css and icons). svg.js is working again git-svn-id: https://svn.fhem.de/fhem/trunk@1876 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
02d1576c7e
commit
c52f1f27b6
@ -306,6 +306,7 @@ FW_Read($)
|
|||||||
(int(@enc) == 1 && $enc[0] =~ m/gzip/) &&
|
(int(@enc) == 1 && $enc[0] =~ m/gzip/) &&
|
||||||
$try_zlib &&
|
$try_zlib &&
|
||||||
AttrVal($FW_wname, "fwcompress", 1)) {
|
AttrVal($FW_wname, "fwcompress", 1)) {
|
||||||
|
Log $ll, "OLEN:".length($FW_RET);
|
||||||
$FW_RET = Compress::Zlib::memGzip($FW_RET);
|
$FW_RET = Compress::Zlib::memGzip($FW_RET);
|
||||||
$compressed = "Content-Encoding: gzip\r\n";
|
$compressed = "Content-Encoding: gzip\r\n";
|
||||||
}
|
}
|
||||||
@ -428,12 +429,12 @@ FW_AnswerCall($)
|
|||||||
|
|
||||||
} elsif($arg =~ m,^/(favicon.ico)$,) {
|
} elsif($arg =~ m,^/(favicon.ico)$,) {
|
||||||
return 0; # TODO!
|
return 0; # TODO!
|
||||||
}
|
|
||||||
|
} elsif($arg =~ m,^$FW_ME/icons/(.*)$,) {
|
||||||
elsif($arg =~ m,^$FW_ME/icons/(.*)$,) {
|
|
||||||
my ($icon,$cachable) = ($1, 1);
|
my ($icon,$cachable) = ($1, 1);
|
||||||
#Debug "You want $icon which is " . $FW_icons{$icon};
|
#Debug "You want $icon which is " . $FW_icons{$icon};
|
||||||
# if we do not have the icon, we convert the device state to the icon name
|
# if we do not have the icon, we convert the device state to the icon name
|
||||||
|
$icon =~ s/\.($ICONEXTENSION)$//;
|
||||||
if(!$FW_icons{$icon}) {
|
if(!$FW_icons{$icon}) {
|
||||||
$icon = FW_dev2image($icon);
|
$icon = FW_dev2image($icon);
|
||||||
#Debug "We do not have it and thus use $icon which is ".$FW_icons{$icon};
|
#Debug "We do not have it and thus use $icon which is ".$FW_icons{$icon};
|
||||||
@ -489,11 +490,12 @@ FW_AnswerCall($)
|
|||||||
$FW_cmdret = $docmd ? FW_fC($cmd) : "";
|
$FW_cmdret = $docmd ? FW_fC($cmd) : "";
|
||||||
|
|
||||||
my @origin = grep /Origin/, @FW_httpheader;
|
my @origin = grep /Origin/, @FW_httpheader;
|
||||||
my $headercors = ($FW_cors ? "Access-Control-Allow-".$origin[0]."\r\n".
|
my $headercors = ($FW_cors ?
|
||||||
"Access-Control-Allow-Methods: GET, POST, OPTIONS\r\n".
|
"Access-Control-Allow-".$origin[0]."\r\n".
|
||||||
"Access-Control-Allow-Headers: Origin, Authorization, Accept\r\n".
|
"Access-Control-Allow-Methods: GET, POST, OPTIONS\r\n".
|
||||||
"Access-Control-Allow-Credentials: true\r\n".
|
"Access-Control-Allow-Headers: Origin, Authorization, Accept\r\n".
|
||||||
"Access-Control-Max-Age:86400\r\n" : "");
|
"Access-Control-Allow-Credentials: true\r\n".
|
||||||
|
"Access-Control-Max-Age:86400\r\n" : "");
|
||||||
|
|
||||||
if($FW_inform) { # Longpoll header
|
if($FW_inform) { # Longpoll header
|
||||||
$me->{inform} = ($FW_room ? $FW_room : $FW_inform);
|
$me->{inform} = ($FW_room ? $FW_room : $FW_inform);
|
||||||
@ -577,7 +579,7 @@ FW_AnswerCall($)
|
|||||||
$prf = "smallscreen" if(!$prf && $FW_ss);
|
$prf = "smallscreen" if(!$prf && $FW_ss);
|
||||||
$prf = "touchpad" if(!$prf && $FW_tp);
|
$prf = "touchpad" if(!$prf && $FW_tp);
|
||||||
FW_pO "<link href=\"$FW_ME/css/".$prf."style.css\" rel=\"stylesheet\"/>";
|
FW_pO "<link href=\"$FW_ME/css/".$prf."style.css\" rel=\"stylesheet\"/>";
|
||||||
FW_pO "<script type=\"text/javascript\" src=\"$FW_ME/css/svg.js\"></script>"
|
FW_pO "<script type=\"text/javascript\" src=\"$FW_ME/js/svg.js\"></script>"
|
||||||
if($FW_plotmode eq "SVG");
|
if($FW_plotmode eq "SVG");
|
||||||
FW_pO "<script type=\"text/javascript\" src=\"$FW_ME/js/fhemweb.js\"></script>";
|
FW_pO "<script type=\"text/javascript\" src=\"$FW_ME/js/fhemweb.js\"></script>";
|
||||||
my $onload = $FW_longpoll ? "onload=\"FW_delayedStart()\"" : "";
|
my $onload = $FW_longpoll ? "onload=\"FW_delayedStart()\"" : "";
|
||||||
|
@ -4,7 +4,7 @@ input { font-family:Arial, sans-serif; font-size:16px; }
|
|||||||
select { font-family:Arial, sans-serif; font-size:16px; }
|
select { font-family:Arial, sans-serif; font-size:16px; }
|
||||||
|
|
||||||
#logo { position:fixed; top:10px; left:20px;
|
#logo { position:fixed; top:10px; left:20px;
|
||||||
width:100px; height:105px; background-image:url(../icons/fhemicon); }
|
width:100px; height:105px; background-image:url(../icons/fhemicon.png); }
|
||||||
#menu { position:fixed; top:120px;left:20px; width:140px; }
|
#menu { position:fixed; top:120px;left:20px; width:140px; }
|
||||||
#hdr { position:absolute; top:10px; left:180px; }
|
#hdr { position:absolute; top:10px; left:180px; }
|
||||||
#content { position:absolute; top:50px; left:180px; bottom:20px; right:10px; }
|
#content { position:absolute; top:50px; left:180px; bottom:20px; right:10px; }
|
||||||
|
Loading…
Reference in New Issue
Block a user