- Patch #767478 by derjochenmeyer: menu li.leaf items get expanded (li.expanded) when active.

merge-requests/26/head
Dries Buytaert 2010-07-19 21:57:49 +00:00
parent 542ceec1de
commit 3fd692b390
1 changed files with 4 additions and 2 deletions

View File

@ -922,8 +922,10 @@ function menu_tree_output($tree) {
if ($i == $num_items - 1) {
$class[] = 'last';
}
// Set a class if the link has children.
if ($data['below']) {
// Set a class for the <li>-tag. Since $data['below'] may contain local
// tasks, only set 'expanded' class if the link also has children within
// the current menu.
if ($data['link']['has_children'] && $data['below']) {
$class[] = 'expanded';
}
elseif ($data['link']['has_children']) {