mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
SortBox: Fix "algorithm" to detect the opposite sort direction
This commit is contained in:
parent
3d60e60842
commit
4f5afb5ee2
@ -203,7 +203,7 @@ class SortBox extends AbstractWidget
|
||||
|
||||
// TODO(el): ToggleButton :)
|
||||
$toggle = array('asc' => 'sort-name-down', 'desc' => 'sort-name-up');
|
||||
unset($toggle[$direction]);
|
||||
unset($toggle[strtolower($direction) ?: 'asc']);
|
||||
$newDirection = key($toggle);
|
||||
$icon = current($toggle);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user