From 88e804f6c0b2909520060567f594bb30e2eb24f5 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Thu, 20 Aug 2015 04:01:35 +0000 Subject: [PATCH] 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 --- src/wp-admin/js/edit-comments.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/js/edit-comments.js b/src/wp-admin/js/edit-comments.js index 6a8bb24d5b..89a32a88b7 100644 --- a/src/wp-admin/js/edit-comments.js +++ b/src/wp-admin/js/edit-comments.js @@ -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 ) {