Changeset 4782
- Timestamp:
- 07/22/2011 09:20:56 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-messages/bp-messages-loader.php
r4776 r4782 89 89 global $bp; 90 90 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() ); 95 92 96 93 // Add 'Messages' to the main navigation -
trunk/bp-themes/bp-default/_inc/global.js
r4727 r4782 924 924 jq('tr#m-' + jq(this).attr('value') + ' td span.unread-count').html(unreadCount); 925 925 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 ); 927 928 var inboxcount = inboxcount.substr( 0, inboxcount.length - 1 ); 928 929 929 930 if ( !inboxcount.length ) 930 931 inboxcount = 0; 932 931 933 if ( parseInt(inboxcount) == inboxCount ) { 932 jq('a#user-messages s trong').css('display', unreadCountDisplay);933 jq('a#user-messages s trong').html( '(' + unreadCount + ')');934 jq('a#user-messages span').css('display', unreadCountDisplay); 935 jq('a#user-messages span').html( unreadCount ); 934 936 } else { 935 937 if ( 'read' == currentClass ) 936 jq('a#user-messages s trong').html('(' + ( parseInt(inboxcount) + 1 ) + ')');938 jq('a#user-messages span').html( ( parseInt(inboxcount) + 1 ) ); 937 939 else 938 jq('a#user-messages s trong').html('(' + ( parseInt(inboxcount) - thread_count ) + ')');940 jq('a#user-messages span').html( ( parseInt(inboxcount) - thread_count ) ); 939 941 } 940 942
Note: See TracChangeset
for help on using the changeset viewer.