increment comment moderation counter when unapproving comment from approved comments screen. props mdawaffe. fixes #6338

git-svn-id: https://develop.svn.wordpress.org/trunk@7462 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Mark Jaquith 2008-03-21 21:57:25 +00:00
parent a991442f83
commit 104069af9a
2 changed files with 4 additions and 1 deletions

View File

@ -35,6 +35,8 @@ var delAfter = function( r, settings ) {
var n = parseInt(a.html(),10);
if ( $('#' + settings.element).is('.unapproved') ) { // we deleted a formerly unapproved comment
n = n - 1;
} else if ( $(settings.target).parents( 'span.unapprove' ).size() ) { // we "deleted" an approved comment from the approved list by clicking "Unapprove"
n = n + 1;
}
if ( n < 0 ) { n = 0; }
a.html( n.toString() );

View File

@ -36,7 +36,8 @@ var wpList = {
var bg; var r;
s = $.extend( {}, this.wpList.settings, {
element: null,
nonce: 0
nonce: 0,
target: e.get(0)
}, s || {} );
if ( $.isFunction( s.confirm ) ) {
if ( 'add' != a ) {