User Directory - set class current on "All" if there is no selected filter

This commit is contained in:
Zach Copley 2011-03-10 14:20:35 -08:00
parent eccadb4a7b
commit 24d0094192

View File

@ -128,8 +128,8 @@ class AlphaNav extends Widget
$current = $this->action->arg('filter'); $current = $this->action->arg('filter');
// Highlight the selected filter. If there is no selected // Highlight the selected filter. If there is no selected
// filter, highlight the first filter in the list // filter, highlight the last filter in the list (all)
if (!isset($current) && $i == 0 if (!isset($current) && $i == ($size - 1)
|| $current === strtolower($filter)) { || $current === strtolower($filter)) {
$classes .= 'current '; $classes .= 'current ';
} }