summaryrefslogtreecommitdiff
path: root/includes/menu.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-07-19 21:57:49 +0000
committerDries Buytaert <dries@buytaert.net>2010-07-19 21:57:49 +0000
commit3fd692b390c7163acb225bf1e85dc2b482440bbd (patch)
treef31a317231535531c5f37f4005fcb52ff9f2f8d2 /includes/menu.inc
parent542ceec1deaa6bbff4fdac60e28ca875f562a118 (diff)
downloadbrdo-3fd692b390c7163acb225bf1e85dc2b482440bbd.tar.gz
brdo-3fd692b390c7163acb225bf1e85dc2b482440bbd.tar.bz2
- Patch #767478 by derjochenmeyer: menu li.leaf items get expanded (li.expanded) when active.
Diffstat (limited to 'includes/menu.inc')
-rw-r--r--includes/menu.inc6
1 files changed, 4 insertions, 2 deletions
diff --git a/includes/menu.inc b/includes/menu.inc
index 2b6738413..d79621f93 100644
--- a/includes/menu.inc
+++ b/includes/menu.inc
@@ -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']) {