Don't change bg color or approval status after comment QE or reply, fixes #7930

git-svn-id: https://develop.svn.wordpress.org/trunk@9695 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2008-11-14 21:54:39 +00:00
parent ac3d78f694
commit f2f44af746
2 changed files with 11 additions and 3 deletions

View File

@ -3,6 +3,13 @@ var theList; var theExtraList;
setCommentsList = function() {
var dimAfter = function( r, settings ) {
var c = $('#' + settings.element);
if ( c.is('.unapproved') )
c.find('div.comment_status').html('0')
else
c.find('div.comment_status').html('1')
$('li span.comment-count').each( function() {
var a = $(this);
var n = parseInt(a.html(),10);
@ -263,10 +270,11 @@ commentReply = {
$(id+' .hide-if-no-js').removeClass('hide-if-no-js');
this.revert();
this.addEvents($(id));
var bg = $(id).hasClass('unapproved') ? '#ffffe0' : '#fff';
$(id)
.animate( { backgroundColor:"#CCEEBB" }, 600 )
.animate( { backgroundColor:"transparent" }, 600 );
.animate( { 'backgroundColor':'#CCEEBB' }, 600 )
.animate( { 'backgroundColor': bg }, 600 );
theList = theExtraList = null;
$("#get-extra-comments, a[className*=':']").unbind();

View File

@ -156,7 +156,7 @@ function wp_default_scripts( &$scripts ) {
'good' => __('Medium'),
'strong' => __('Strong')
) );
$scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20081031' );
$scripts->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20081114' );
$scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
'pending' => __('%i% pending'), // must look like: "# blah blah"
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),