From 3e1698928137fbf651f82e7e784252ea69dffa7b Mon Sep 17 00:00:00 2001 From: Ash Ward Date: Thu, 1 Dec 2011 17:03:04 +0000 Subject: Fixes #4170: Messages icon on top bar doesn't have a title attribute (tooltip) --- mod/messages/start.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'mod/messages/start.php') diff --git a/mod/messages/start.php b/mod/messages/start.php index e4ef4d43a..1a2709324 100644 --- a/mod/messages/start.php +++ b/mod/messages/start.php @@ -125,11 +125,13 @@ function messages_notifier() { if (elgg_is_logged_in()) { $class = "elgg-icon elgg-icon-mail"; $text = ""; - + $tooltip = elgg_echo("messages"); + // get unread messages $num_messages = (int)messages_count_unread(); if ($num_messages != 0) { $text .= "$num_messages"; + $tooltip .= " (" . elgg_echo("messages:unreadcount", array($num_messages)) . ")"; } elgg_register_menu_item('topbar', array( @@ -137,6 +139,7 @@ function messages_notifier() { 'href' => 'messages/inbox/' . elgg_get_logged_in_user_entity()->username, 'text' => $text, 'priority' => 600, + 'title' => $tooltip, )); } } -- cgit v1.2.3