Comments List Table:

* Properly increment/decrement approved/pending bubbles in `response` column

See #11200.


git-svn-id: https://develop.svn.wordpress.org/trunk@33656 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2015-08-20 04:01:35 +00:00
parent 9b6f5b6270
commit 88e804f6c0

View File

@ -35,7 +35,8 @@ setCommentsList = function() {
diff = $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1;
updatePending( diff );
updateCountText( 'span.approved-count', -1 * diff );
updateCountText( 'span.approved-count', -1 * diff );
updateCountText( 'span.comment-count-approved', -1 * diff );
};
// Send current total, page, per_page and url
@ -130,7 +131,7 @@ setCommentsList = function() {
};
updatePending = function( diff ) {
$('span.pending-count').each(function() {
$('span.pending-count, .comment-count-pending').each(function() {
var a = $(this), n = getCount(a) + diff;
if ( n < 1 )
n = 0;
@ -289,7 +290,8 @@ setCommentsList = function() {
}
if ( approvedDiff ) {
updateCountText( 'span.approved-count', approvedDiff );
updateCountText( 'span.approved-count', approvedDiff );
updateCountText( 'span.comment-count-approved', approvedDiff );
}
if ( spamDiff ) {