diff --git a/fhem/webfrontend/pgm2/01_FHEMWEB.pm b/fhem/webfrontend/pgm2/01_FHEMWEB.pm index c491abf16..f37f67142 100755 --- a/fhem/webfrontend/pgm2/01_FHEMWEB.pm +++ b/fhem/webfrontend/pgm2/01_FHEMWEB.pm @@ -774,13 +774,14 @@ FW_showRoom() if(!$FW_iconsread || (time() - $FW_iconsread) > 5) { %FW_icons = (); if(opendir(DH, $FW_dir)) { - while(my $l = readdir(DH)) { - next if($l =~ m/^\./); + my @files = readdir(DH); + closedir(DH); + foreach my $l (sort @files) { # Order: .gif,.jpg,.png + next if($l !~ m/\.(png|gif|jpg)$/i); my $x = $l; $x =~ s/\.[^.]+$//; # Cut .gif/.jpg $FW_icons{$x} = $l; } - closedir(DH); } $FW_iconsread = time(); } @@ -843,11 +844,11 @@ FW_showRoom() } elsif($iv) { $iv =~ s/ .*//; # Want to be able to have icons for "on-for-timer xxx" - $iname = $FW_icons{"FS20.$iv"} if($FW_icons{"FS20.$iv"}); - $iname = $FW_icons{"$type"} if($FW_icons{"$type"}); - $iname = $FW_icons{"$type.$iv"} if($FW_icons{"$type.$iv"}); - $iname = $FW_icons{"$d"} if($FW_icons{"$d"}); - $iname = $FW_icons{"$d.$iv"} if($FW_icons{"$d.$iv"}); + $iname = $FW_icons{"$iv"} if($FW_icons{$iv}); # on.png + $iname = $FW_icons{"$type"} if($FW_icons{$type}); # FS20.png + $iname = $FW_icons{"$type.$iv"} if($FW_icons{"$type.$iv"}); # FS20.on.png + $iname = $FW_icons{"$d"} if($FW_icons{$d}); # lamp.png + $iname = $FW_icons{"$d.$iv"} if($FW_icons{"$d.$iv"}); # lamp.on.png } $v = "" if(!defined($v)); diff --git a/fhem/webfrontend/pgm2/FS20.off.gif b/fhem/webfrontend/pgm2/FS20.off.gif deleted file mode 100644 index c4a2fc94f..000000000 Binary files a/fhem/webfrontend/pgm2/FS20.off.gif and /dev/null differ diff --git a/fhem/webfrontend/pgm2/FS20.off.png b/fhem/webfrontend/pgm2/FS20.off.png new file mode 100644 index 000000000..6406416f9 Binary files /dev/null and b/fhem/webfrontend/pgm2/FS20.off.png differ diff --git a/fhem/webfrontend/pgm2/FS20.on.gif b/fhem/webfrontend/pgm2/FS20.on.gif deleted file mode 100644 index b385876e6..000000000 Binary files a/fhem/webfrontend/pgm2/FS20.on.gif and /dev/null differ diff --git a/fhem/webfrontend/pgm2/FS20.on.png b/fhem/webfrontend/pgm2/FS20.on.png new file mode 100644 index 000000000..91387cb47 Binary files /dev/null and b/fhem/webfrontend/pgm2/FS20.on.png differ diff --git a/fhem/webfrontend/pgm2/off-for-timer.png b/fhem/webfrontend/pgm2/off-for-timer.png new file mode 100644 index 000000000..355994ac5 Binary files /dev/null and b/fhem/webfrontend/pgm2/off-for-timer.png differ diff --git a/fhem/webfrontend/pgm2/off.png b/fhem/webfrontend/pgm2/off.png new file mode 100644 index 000000000..6406416f9 Binary files /dev/null and b/fhem/webfrontend/pgm2/off.png differ diff --git a/fhem/webfrontend/pgm2/on-for-timer.png b/fhem/webfrontend/pgm2/on-for-timer.png new file mode 100644 index 000000000..f54efc9f5 Binary files /dev/null and b/fhem/webfrontend/pgm2/on-for-timer.png differ diff --git a/fhem/webfrontend/pgm2/on.png b/fhem/webfrontend/pgm2/on.png new file mode 100644 index 000000000..91387cb47 Binary files /dev/null and b/fhem/webfrontend/pgm2/on.png differ