mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
95_Dashboard: the column sort order is now correctly read from the sorting attribute
git-svn-id: https://svn.fhem.de/fhem/trunk@9246 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d714a605a0
commit
22f70c322a
@ -1,5 +1,7 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- bugfix: 95_Dashboard: the sort order in columns is now correctly read
|
||||
from the sorting attribute.
|
||||
- bugfix: 00_MAXLAN: set time on cube if it has none (by Tom_S)
|
||||
- bugfix: 14_CUL_MAX: work together with a-culfw
|
||||
- bugfix: 70_PushNotifier: bugfix regex deviceID
|
||||
|
@ -697,20 +697,34 @@ sub BuildGroupWidgets($$$$$) {
|
||||
|
||||
my $counter = 0;
|
||||
my %sorting = ();
|
||||
my %groups = ();
|
||||
my @groupnames = ();
|
||||
|
||||
foreach (split(":", $groupsorting)) {
|
||||
my @parts = split (',', $_);
|
||||
$sorting{$parts[1]} = $_;
|
||||
# add group names to a list to have the correct order afterwards in the foreach loop
|
||||
# store the group names in the right order to use them in the foreach loop
|
||||
push(@groupnames, $parts[1]);
|
||||
}
|
||||
my $groupicon = '';
|
||||
|
||||
my @devicegroups = split('§§§', $devicegroups);
|
||||
|
||||
# sort the devices into a hash to be able to access them via group name
|
||||
foreach my $singlegroup (@devicegroups) {
|
||||
# make sure that splitting with colon is not destroying the devspec that might
|
||||
# also contain a colon followed by a filter
|
||||
my ($groupname, $groupdevices, $groupicon) = split(/:(?!FILTER=)/, $singlegroup);
|
||||
|
||||
my @values = ($groupdevices, $groupicon);
|
||||
$groups{$groupname} = \@values;
|
||||
}
|
||||
|
||||
my $groupicon = '';
|
||||
|
||||
foreach my $groupname (@groupnames) {
|
||||
my ($groupdevices, $groupicon) = @{$groups{$groupname}};
|
||||
|
||||
# if the device is not stored in the current column, skip it
|
||||
next if (index($sorting{$groupname}, 't'.$tab.'c'.$column) < 0);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user