Update both of the comment counts when something changes.
git-svn-id: http://svn.automattic.com/wordpress/trunk@6545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -2,17 +2,21 @@ var list; var extra;
|
||||
jQuery(function($) {
|
||||
|
||||
var dimAfter = function( r, settings ) {
|
||||
var a = $('#awaitmod');
|
||||
var n = parseInt(a.html(),10) + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 );
|
||||
a.html( n.toString() );
|
||||
$('.comment-count').each( function() {
|
||||
var a = $('#' + this.id );
|
||||
var n = parseInt(a.html(),10) + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 );
|
||||
a.html( n.toString() );
|
||||
});
|
||||
}
|
||||
|
||||
var delAfter = function( r, settings ) {
|
||||
var a = $('#awaitmod');
|
||||
if ( a.parent('.current').size() || $('#' + settings.element).is('.unapproved') && parseInt(a.html(),10) > 0 ) {
|
||||
var n = parseInt(a.html(),10) - 1;
|
||||
a.html( n.toString() );
|
||||
}
|
||||
$('.comment-count').each( function() {
|
||||
var a = $('#' + this.id );
|
||||
if ( a.parent('.current').size() || $('#' + settings.element).is('.unapproved') && parseInt(a.html(),10) > 0 ) {
|
||||
var n = parseInt(a.html(),10) - 1;
|
||||
a.html( n.toString() );
|
||||
}
|
||||
});
|
||||
|
||||
if ( extra.size() == 0 || extra.children().size() == 0 ) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user