From 363ddd3b4fa9faf571d420a023fd932b9cda1d7f Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 27 Feb 2008 23:36:24 +0000 Subject: [PATCH] Fix AJAX comment moderation on edit post view. Props mdawaffe. fixes #4245 git-svn-id: http://svn.automattic.com/wordpress/trunk@7075 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/edit-comments.js | 4 ++-- wp-includes/script-loader.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-admin/js/edit-comments.js b/wp-admin/js/edit-comments.js index 11e0c49009..a44a727042 100644 --- a/wp-admin/js/edit-comments.js +++ b/wp-admin/js/edit-comments.js @@ -2,13 +2,13 @@ var list; var extra; jQuery(function($) { var dimAfter = function( r, settings ) { - $('span.comment-count').each( function() { + $('li span.comment-count').each( function() { var a = $(this); var n = parseInt(a.html(),10) + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 ); a.html( n.toString() ); }); // we need to do the opposite for this guy, TODO: update title - $('.post-com-count').each( function() { + $('.post-com-count span.comment-count').each( function() { var a = $(this); var n = parseInt(a.html(),10) + ( $('#' + settings.element).is('.' + settings.dimClass) ? -1 : 1 ); a.html( n.toString() ); diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index be0a06ee99..32ebb02f2f 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -125,7 +125,7 @@ class WP_Scripts { 'good' => __('Good'), 'strong' => __('Strong') ) ); - $this->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists'), '20071104' ); + $this->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists'), '20080227' ); $this->add( 'admin-users', '/wp-admin/js/users.js', array('wp-lists'), '20070823' ); $this->add( 'admin-forms', '/wp-admin/js/forms.js', false, '20080108' ); $this->add( 'xfn', '/wp-admin/js/xfn.js', false, '3517' );