Skip to:
Content

BuddyPress.org

Changeset 4782


Ignore:
Timestamp:
07/22/2011 09:20:56 AM (15 years ago)
Author:
johnjamesjacoby
Message:

Fix issue where private messages could not be marked as read, unread, or deleted. See #3367, #3241.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-messages/bp-messages-loader.php

    r4776 r4782  
    8989                global $bp;
    9090
    91                 if ( $count = bp_get_total_unread_messages_count() )
    92                         $name = sprintf( __( 'Messages <span class="count">%s</span>', 'buddypress' ), $count );
    93                 else
    94                         $name = __( 'Messages', 'buddypress' );
     91                $name = sprintf( __( 'Messages <span>%s</span>', 'buddypress' ), bp_get_total_unread_messages_count() );
    9592
    9693                // Add 'Messages' to the main navigation
  • trunk/bp-themes/bp-default/_inc/global.js

    r4727 r4782  
    924924                                        jq('tr#m-' + jq(this).attr('value') + ' td span.unread-count').html(unreadCount);
    925925                                        jq('tr#m-' + jq(this).attr('value') + ' td span.unread-count').css('display', unreadCountDisplay);
    926                                         var inboxcount = jq('a#user-messages strong').html().substr( 1, jq('a#user-messages strong').html().length );
     926
     927                                        var inboxcount = jq('a#user-messages span').html().substr( 1, jq('a#user-messages span').html().length );
    927928                                        var inboxcount = inboxcount.substr( 0, inboxcount.length - 1 );
    928929
    929930                                        if ( !inboxcount.length )
    930931                                                inboxcount = 0;
     932
    931933                                        if ( parseInt(inboxcount) == inboxCount ) {
    932                                                 jq('a#user-messages strong').css('display', unreadCountDisplay);
    933                                                 jq('a#user-messages strong').html( '(' + unreadCount + ')' );
     934                                                jq('a#user-messages span').css('display', unreadCountDisplay);
     935                                                jq('a#user-messages span').html( unreadCount );
    934936                                        } else {
    935937                                                if ( 'read' == currentClass )
    936                                                         jq('a#user-messages strong').html('(' + ( parseInt(inboxcount) + 1 ) + ')');
     938                                                        jq('a#user-messages span').html( ( parseInt(inboxcount) + 1 ) );
    937939                                                else
    938                                                         jq('a#user-messages strong').html('(' + ( parseInt(inboxcount) - thread_count ) + ')');
     940                                                        jq('a#user-messages span').html( ( parseInt(inboxcount) - thread_count ) );
    939941                                        }
    940942
Note: See TracChangeset for help on using the changeset viewer.