diff --git a/webfrontend/pgm2/01_FHEMWEB.pm b/webfrontend/pgm2/01_FHEMWEB.pm index 1545e9ed5..6f61715a4 100755 --- a/webfrontend/pgm2/01_FHEMWEB.pm +++ b/webfrontend/pgm2/01_FHEMWEB.pm @@ -40,11 +40,17 @@ use vars qw($FW_dir); # moddir (./FHEM), needed by SVG use vars qw($FW_ME); # webname (default is fhem), needed by 97_GROUP use vars qw($FW_ss); # is smallscreen, needed by 97_GROUP/95_VIEW use vars qw($FW_tp); # is touchpad (iPad / etc) -use vars qw(%FW_types);# device types, for 97_GROUP/95_VIEW + +# global variables, also used by 97_GROUP/95_VIEW/95_FLOORPLAN +use vars qw(%FW_types); # device types, +use vars qw($FW_RET); # Returned data (html) +use vars qw($FW_wname); # Web instance +use vars qw($FW_subdir); # Sub-path in URL for extensions, e.g. 95_FLOORPLAN +use vars qw(%FW_pos); # scroll position + my $zlib_loaded; my $try_zlib = 1; - ######################### # As we are _not_ multithreaded, it is safe to use global variables. # Note: for delivering SVG plots we fork @@ -57,14 +63,11 @@ my %FW_icons; # List of icons my $FW_iconsread; # Timestamp of last icondir check my $FW_plotmode; # Global plot mode (WEB attribute) my $FW_plotsize; # Global plot size (WEB attribute) -my %FW_pos; # scroll position my $FW_reldoc; # $FW_ME/commandref.html; -my $FW_RET; # Returned data (html) my $FW_RETTYPE; # image/png or the like my $FW_room; # currently selected room my %FW_rooms; # hash of all rooms my %FW_types; # device types, for sorting -my $FW_wname; # Web instance my $FW_cname; # Current connection my @FW_zoom; # "qday", "day","week","month","year" my %FW_zoom; # the same as @FW_zoom @@ -227,6 +230,8 @@ FW_Read($) $FW_wname = $hash->{SNAME}; $FW_cname = $name; + $FW_subdir = ""; + my $ll = GetLogLevel($FW_wname,4); my $c = $hash->{CD}; if(!$zlib_loaded && $try_zlib && AttrVal($FW_wname, "fwcompress", 1)) { @@ -467,8 +472,7 @@ FW_AnswerCall($) } $FW_longpoll = (AttrVal($FW_wname, "longpoll", undef) && - $FW_room && - !$FW_detail); + (($FW_room && !$FW_detail) || ($FW_subdir ne ""))); if($cmd =~ m/^toweblink (.*)$/) { my @aa = split(":", $1); @@ -678,7 +682,7 @@ FW_makeSelect($$$$) return if(!$list || $FW_hiddenroom{input}); my @al = sort map { s/[:;].*//;$_ } split(" ", $list); - FW_pO "