Tweaks for the admin bar comment bubble: allow JS updating the count, center the bubble when no pending comments, props duck_, fixes #18809

git-svn-id: http://svn.automattic.com/wordpress/trunk@19156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2011-11-04 15:55:00 +00:00
parent 31c84c9d7b
commit 2f5eff99f4
3 changed files with 11 additions and 4 deletions

View File

@ -559,7 +559,7 @@ function wp_admin_bar_comments_menu( $wp_admin_bar ) {
$icon .= "<div class='ab-comments-icon-arrow'></div>"; $icon .= "<div class='ab-comments-icon-arrow'></div>";
$icon .= "</div>"; $icon .= "</div>";
$title = ( $awaiting_mod ) ? '<span id="ab-awaiting-mod" class="pending-count">' . number_format_i18n( $awaiting_mod ) . '</span>' : ''; $title = '<span id="ab-awaiting-mod" class="awaiting-mod pending-count count-' . $awaiting_mod . '">' . number_format_i18n( $awaiting_mod ) . '</span>';
$wp_admin_bar->add_menu( array( $wp_admin_bar->add_menu( array(
'id' => 'comments', 'id' => 'comments',

File diff suppressed because one or more lines are too long

View File

@ -463,7 +463,7 @@
} }
#wpadminbar .ab-comments-icon-body { #wpadminbar .ab-comments-icon-body {
margin: 3px 4px 0 -2px; margin-top: 3px;
background: #999; background: #999;
height: 10px; height: 10px;
width: 14px; width: 14px;
@ -480,7 +480,7 @@
height: 0; height: 0;
position: absolute; position: absolute;
bottom: -3px; bottom: -3px;
left: 1px; left: 3px;
/* Use transparent borders to form a triangle */ /* Use transparent borders to form a triangle */
border-left: 4px solid #999; border-left: 4px solid #999;
border-bottom: 4px solid transparent; border-bottom: 4px solid transparent;
@ -489,6 +489,13 @@
border-left-color: #bbb; border-left-color: #bbb;
} }
#wpadminbar #ab-awaiting-mod {
margin-left: 4px;
}
#wpadminbar span.count-0 {
display: none;
}
/** /**
* IE 6-targeted rules * IE 6-targeted rules