mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-13 17:26:34 +00:00
FHEMWEB: adding floorplan specific iconPath
git-svn-id: https://svn.fhem.de/fhem/trunk@4585 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
895d831d21
commit
b943702c34
@ -410,6 +410,10 @@ FW_answerCall($)
|
||||
$FW_tp = ($FW_sp =~ m/smallscreen|touchpad/);
|
||||
@FW_iconDirs = grep { $_ } split(":", AttrVal($FW_wname, "iconPath",
|
||||
"$FW_sp:default:fhemSVG:openautomation"));
|
||||
if($arg =~ m,$FW_ME/floorplan/([a-z0-9.:_]+),i) { # FLOORPLAN: special icondir
|
||||
unshift @FW_iconDirs, $1;
|
||||
FW_readIcons($1);
|
||||
}
|
||||
|
||||
# /icons/... => current state of ...
|
||||
# also used for static images: unintended, but too late to change
|
||||
@ -1814,7 +1818,7 @@ FW_readIconsFrom($$)
|
||||
my $ldir = ($subdir ? "$dir/$subdir" : $dir);
|
||||
my @entries;
|
||||
if(opendir(DH, "$FW_icondir/$ldir")) {
|
||||
@entries= sort readdir(DH); # assures order: .gif .ico .jpg .png
|
||||
@entries= sort readdir(DH); # assures order: .gif .ico .jpg .png .svg
|
||||
closedir(DH);
|
||||
}
|
||||
|
||||
@ -2018,6 +2022,10 @@ FW_Notify($$)
|
||||
$FW_tp = ($FW_sp =~ m/smallscreen|touchpad/);
|
||||
@FW_iconDirs = grep { $_ } split(":", AttrVal($FW_wname, "iconPath",
|
||||
"$FW_sp:default:fhemSVG:openautomation"));
|
||||
if($h->{iconPath}) {
|
||||
unshift @FW_iconDirs, $h->{iconPath};
|
||||
FW_readIcons($h->{iconPath});
|
||||
}
|
||||
|
||||
my ($allSet, $cmdlist, $txt) = FW_devState($dn, "", \%extPage);
|
||||
($FW_wname, $FW_ME, $FW_ss, $FW_tp, $FW_subdir) = @old;
|
||||
|
@ -99,8 +99,11 @@ FW_longpoll()
|
||||
filter=sa[i].substring(7);
|
||||
}
|
||||
}
|
||||
if(filter == "" && document.getElementById("floorplan")) // floorplan special
|
||||
filter=".*";
|
||||
if(filter == "" && document.getElementById("floorplan")) { //floorplan special
|
||||
var name = document.getElementsByTagName("body")[0].getAttribute("id");
|
||||
name = name.substring(0,name.length-5);
|
||||
filter=".*;iconPath="+name;
|
||||
}
|
||||
|
||||
var query = document.location.pathname+"?XHR=1"+
|
||||
"&inform=type=status;filter="+filter+
|
||||
|
Loading…
x
Reference in New Issue
Block a user