mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-15 04:20:56 +00:00
FHEMWEB: FW_groupList added (from svenson08), forum #20564
git-svn-id: https://svn.fhem.de/fhem/trunk@5838 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d434e8923e
commit
542009898c
@ -93,6 +93,7 @@ my %FW_icons; # List of icons
|
||||
my @FW_iconDirs; # Directory search order for icons
|
||||
my $FW_RETTYPE; # image/png or the like
|
||||
my %FW_rooms; # hash of all rooms
|
||||
my %FW_groups; # hash of all groups
|
||||
my %FW_types; # device types, for sorting
|
||||
my %FW_hiddengroup;# hash of hidden groups
|
||||
my $FW_inform;
|
||||
@ -778,6 +779,16 @@ FW_updateHashes()
|
||||
}
|
||||
}
|
||||
|
||||
#################
|
||||
# Make a group hash
|
||||
%FW_groups = ();
|
||||
foreach my $d (keys %defs ) {
|
||||
next if(IsIgnored($d));
|
||||
foreach my $r (split(",", AttrVal($d, "group", ""))) {
|
||||
$FW_groups{$r}{$d} = 1;
|
||||
}
|
||||
}
|
||||
|
||||
###############
|
||||
# Needed for type sorting
|
||||
%FW_types = ();
|
||||
@ -953,7 +964,10 @@ FW_doDetail($)
|
||||
my $attrList = getAllAttr($d);
|
||||
my $roomList = "multiple,".join(",",
|
||||
sort map { $_ =~ s/ /#/g ;$_} keys %FW_rooms);
|
||||
my $groupList = "multiple,".join(",",
|
||||
sort map { $_ =~ s/ /#/g ;$_} keys %FW_groups);
|
||||
$attrList =~ s/room /room:$roomList /;
|
||||
$attrList =~ s/group /group:$groupList /;
|
||||
$attrList = FW_widgetOverride($d, $attrList);
|
||||
FW_makeSelect($d, "attr", $attrList,"attr");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user