Hide moderation count bubble when no comments are awaiting moderation. Props filosofo. fixes #6010

git-svn-id: http://svn.automattic.com/wordpress/trunk@7200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2008-03-10 05:54:46 +00:00
parent 21f293db28
commit fe696318fc
3 changed files with 6 additions and 1 deletions

View File

@@ -33,6 +33,7 @@ var delAfter = function( r, settings ) {
if ( a.parent('.current').size() || $('#' + settings.element).is('.unapproved') ) {
var n = parseInt(a.html(),10) - 1;
a.html( n.toString() );
( 0 < n ) ? $('#awaiting-mod').each(function() { $(this).show(); $(this).removeClass('count-0') }) : $('#awaiting-mod').hide();
}
});
$('.post-com-count span.comment-count').each( function() {