From a744c532b0acb7c49487f22f6e2d051e610c6bbb Mon Sep 17 00:00:00 2001 From: Sem Date: Mon, 19 Dec 2011 02:02:28 +0100 Subject: Added groups menu in topbar. --- views/default/css/elements/icons.php | 10 +++++++++- views/default/css/elements/modules.php | 5 ++++- views/default/n1_theme/js.php | 7 +++++++ views/default/n1_theme/topbar/groups.php | 20 ++++++++++++++++++++ 4 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 views/default/n1_theme/js.php create mode 100644 views/default/n1_theme/topbar/groups.php (limited to 'views') diff --git a/views/default/css/elements/icons.php b/views/default/css/elements/icons.php index f7c789e..9cae59e 100644 --- a/views/default/css/elements/icons.php +++ b/views/default/css/elements/icons.php @@ -13,7 +13,7 @@ *************************************** */ .elgg-icon { - background: transparent url(_graphics/elgg_sprites.png) no-repeat left; + background: transparent url(mod/n1_theme/graphics/elgg_sprites.png) no-repeat left; width: 16px; height: 16px; margin: 0 2px; @@ -346,3 +346,11 @@ width: 200px; height: 200px; } + +.elgg-icon-groups { + background-position: 0 -1530px; +} + +.elgg-icon-groups:hover { + background-position: 0 -1550px; +} diff --git a/views/default/css/elements/modules.php b/views/default/css/elements/modules.php index ef85d4d..4868833 100644 --- a/views/default/css/elements/modules.php +++ b/views/default/css/elements/modules.php @@ -30,6 +30,9 @@ /* Popup */ .elgg-module-popup { + position: absolute; + width: 150px; + background-color: white; border: 1px solid #ccc; @@ -206,4 +209,4 @@ a.elgg-widget-edit-button { .elgg-widget-placeholder { border: 2px dashed #dedede; margin-bottom: 15px; -} \ No newline at end of file +} diff --git a/views/default/n1_theme/js.php b/views/default/n1_theme/js.php new file mode 100644 index 0000000..bed07f4 --- /dev/null +++ b/views/default/n1_theme/js.php @@ -0,0 +1,7 @@ +$(function(){ + $('.elgg-menu-item-groups').hover(function(){ + $('#topbar-groups').show(); + }, function() { + $('#topbar-groups').hide(); + }); +}); diff --git a/views/default/n1_theme/topbar/groups.php b/views/default/n1_theme/topbar/groups.php new file mode 100644 index 0000000..b71114d --- /dev/null +++ b/views/default/n1_theme/topbar/groups.php @@ -0,0 +1,20 @@ + 'group', + 'relationship' => 'member', + 'relationship_guid' => elgg_get_logged_in_user_guid(), + 'list_type' => 'gallery', + 'inverse_relationship' => false, + 'full_view' => false, +)); +if (!$content) { + $content = elgg_echo('groups:none'); +} + +$content .= elgg_view('output/url', array( + 'text' => elgg_echo('groups:all'), + 'href' => 'groups/all', +)); + +echo ""; -- cgit v1.2.3