Comment List Tables:
* Toggle visibility of pending bubble when a comment is dynamically moderated * Add a CSS class to the pending bubble to hide it / remove to show it See #11200. Built from https://develop.svn.wordpress.org/trunk@33692 git-svn-id: http://core.svn.wordpress.org/trunk@33659 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -138,12 +138,12 @@ setCommentsList = function() {
|
||||
updatePending = function( diff, commentPostId ) {
|
||||
var postSelector = '.post-com-count-' + commentPostId,
|
||||
noClass = 'comment-count-no-pending',
|
||||
noParentClass = 'post-com-count-no-pending',
|
||||
pendingClass = 'comment-count-pending',
|
||||
counts = $( 'span.pending-count' ),
|
||||
pending,
|
||||
noPending;
|
||||
|
||||
counts.each(function() {
|
||||
$( 'span.pending-count' ).each(function() {
|
||||
var a = $(this), n = getCount(a) + diff;
|
||||
if ( n < 1 )
|
||||
n = 0;
|
||||
@@ -165,7 +165,11 @@ setCommentsList = function() {
|
||||
n = 0;
|
||||
|
||||
if ( 0 === n ) {
|
||||
a.parent().addClass( noParentClass );
|
||||
a.removeClass( pendingClass ).addClass( noClass );
|
||||
} else {
|
||||
a.parent().removeClass( noParentClass );
|
||||
a.addClass( pendingClass ).removeClass( noClass );
|
||||
}
|
||||
updateCount( a, n );
|
||||
});
|
||||
@@ -173,7 +177,11 @@ setCommentsList = function() {
|
||||
noPending.each(function() {
|
||||
var a = $(this);
|
||||
if ( diff > 0 ) {
|
||||
a.parent().removeClass( noParentClass );
|
||||
a.removeClass( noClass ).addClass( pendingClass );
|
||||
} else {
|
||||
a.parent().addClass( noParentClass );
|
||||
a.addClass( noClass ).removeClass( pendingClass );
|
||||
}
|
||||
updateCount( a, diff );
|
||||
});
|
||||
@@ -203,6 +211,8 @@ setCommentsList = function() {
|
||||
|
||||
if ( 0 === n ) {
|
||||
a.removeClass( approvedClass ).addClass( noClass );
|
||||
} else {
|
||||
a.addClass( approvedClass ).removeClass( noClass );
|
||||
}
|
||||
updateCount( a, n );
|
||||
});
|
||||
@@ -211,6 +221,8 @@ setCommentsList = function() {
|
||||
var a = $(this);
|
||||
if ( diff > 0 ) {
|
||||
a.removeClass( noClass ).addClass( approvedClass );
|
||||
} else {
|
||||
a.addClass( noClass ).removeClass( approvedClass );
|
||||
}
|
||||
updateCount( a, diff );
|
||||
});
|
||||
|
||||
2
wp-admin/js/edit-comments.min.js
vendored
2
wp-admin/js/edit-comments.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user