]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
fixed new message indicator
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 5 Mar 2011 23:31:53 +0000 (23:31 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 5 Mar 2011 23:31:53 +0000 (23:31 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8603 36083f99-b078-4883-b0ff-0f9b5a30f544

mod/messages/start.php
mod/messages/views/default/messages/css.php

index 27b6252eb12e564c0b1d059348dfd2427a9c7fc7..76acb36a9f115c92dbf79eda6a5b342f3d214148 100644 (file)
@@ -31,15 +31,13 @@ function messages_init() {
                ));
                
                $class = "elgg-icon messages-icon";
-               $text = "&nbsp;";
+               $text = "<span class='$class'></span>";
                
                // get unread messages
                $num_messages = (int)messages_count_unread();
                if ($num_messages != 0) {
-                       $class .= " new";
-                       $text = $num_messages;
+                       $text .= "<span class=\"messages-new\">$num_messages</span>";
                }
-               $text = "<span class='$class'>$text</span>";
                
                elgg_register_menu_item('topbar', array(
                        'name' => 'messages',
index ba8444f03010d0667a6b0b9974101ab29e2ffee7..69fa16bfbad3cca6358c73b433521c8d9f25978b 100644 (file)
@@ -47,7 +47,7 @@
        text-decoration: none;
        background-position: left -36px;
 }
-.messages-icon.new span {
+.messages-new {
        color: white;
        background-color: red;
        -webkit-border-radius: 10px; 
@@ -56,8 +56,8 @@
        -moz-box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.50); /* FF v3.5+ */
        position: absolute;
        text-align: center;
-       top: -2px;
-       left: 10px;
+       top: 0px;
+       left: 26px;
        min-width: 16px;
        height: 16px;
        font-size: 10px;