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

git-svn-id: http://svn.automattic.com/wordpress/trunk@7462 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
markjaquith 2008-03-21 21:57:25 +00:00
parent 8dcc9e02fa
commit d93684e0c1
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); var n = parseInt(a.html(),10);
if ( $('#' + settings.element).is('.unapproved') ) { // we deleted a formerly unapproved comment if ( $('#' + settings.element).is('.unapproved') ) { // we deleted a formerly unapproved comment
n = n - 1; 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; } if ( n < 0 ) { n = 0; }
a.html( n.toString() ); a.html( n.toString() );

View File

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