From ad745e050da855d326d1b6bc3df8032c05574392 Mon Sep 17 00:00:00 2001 From: brettp Date: Sat, 20 Mar 2010 20:21:44 +0000 Subject: Moved toolbar dropdown menu to main nav. Added CSS for main nav dropdown. Emptied navigation/topbar_tools view. git-svn-id: http://code.elgg.org/elgg/trunk@5455 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'engine/lib/elgglib.php') diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 0c1bbd83e..7691ca5bb 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -2919,18 +2919,14 @@ function elgg_api_test($hook, $type, $value, $params) { } /** - * Sorts out the topbar menu and the featured URLs - * and saves them to $CONFIG->menu_items = array ('featured_urls' and 'toolbar') - * + * Sorts out the featured URLs and the "more" dropdown + * @return array ('featured_urls' and 'more') */ -function ui_page_setup() { - global $CONFIG; - - $hide_toolbar_dupes = get_config('menu_items_hide_toolbar_entries') == 'yes' ? TRUE : FALSE; +function elgg_get_nav_items() { $menu_items = get_register('menu'); $featured_urls_info = get_config('menu_items_featured_urls'); - $toolbar = array(); + $more = array(); $featured_urls = array(); $featured_urls_sanitised = array(); @@ -2952,14 +2948,14 @@ function ui_page_setup() { // add toolbar entries if not hiding dupes. foreach ($menu_items as $name => $info) { - if (!($hide_toolbar_dupes && in_array($info->value->url, $featured_urls))) { - $toolbar[] = $info; + if (!in_array($info->value->url, $featured_urls)) { + $more[] = $info; } } - $CONFIG->menu_items = array( - 'featured_urls' => $featured_urls_sanitised, - 'toolbar' => $toolbar + return array( + 'featured' => $featured_urls_sanitised, + 'more' => $more ); } -- cgit v1.2.3