Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/03/2010 11:32:07 AM (14 years ago)
Author:
apeatling
Message:

Fixes #1755

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/_inc/global.js

    r2555 r2558  
    879879                    j('tr#m-' + j(this).attr('value') + ' td span.unread-count').html(unreadCount);
    880880                    j('tr#m-' + j(this).attr('value') + ' td span.unread-count').css('display', unreadCountDisplay);
    881                     var inboxcount = j('.inbox-count').html();
    882 
     881                    var inboxcount = j('a#user-messages strong').html().substr( 1, j('a#user-messages strong').html().length );
     882                    var inboxcount = inboxcount.substr( 0, inboxcount.length - 1 );
     883
     884                    if ( !inboxcount.length )
     885                        inboxcount = 0;
    883886                    if ( parseInt(inboxcount) == inboxCount ) {
    884                         j('.inbox-count').css('display', unreadCountDisplay);
    885                         j('.inbox-count').html(unreadCount);
     887                        j('a#user-messages strong').css('display', unreadCountDisplay);
     888                        j('a#user-messages strong').html( '(' + unreadCount + ')' );
    886889                    } else {
    887890                        if ( 'read' == currentClass )
    888                             j('.inbox-count').html(parseInt(inboxcount) + 1);
     891                            j('a#user-messages strong').html('(' + ( parseInt(inboxcount) + 1 ) + ')');
    889892                        else
    890                             j('.inbox-count').html(parseInt(inboxcount) - thread_count);
     893                            j('a#user-messages strong').html('(' + ( parseInt(inboxcount) - thread_count ) + ')');
    891894                    }
    892895
Note: See TracChangeset for help on using the changeset viewer.