Ticket #25060: 25060.2.patch
File 25060.2.patch, 1.5 KB (added by , 8 years ago) |
---|
-
wp-admin/js/edit-comments.js
463 463 post.id = post.comment_post_ID; 464 464 post.comments_listing = this.comments_listing; 465 465 post.p = $('[name="p"]').val(); 466 467 if ( $('#comment-' + $('#comment_ID').val()).hasClass('unapproved') ) 466 var commentID = $('#comment_ID').val(); 467 var edit_row = $('#comment-' + commentID ); 468 var remove_class; 469 if (edit_row.hasClass('unapproved') ) 468 470 post.approve_parent = 1; 469 471 472 if (edit_row.prev().hasClass('even')) 473 remove_class = true; 474 470 475 $.ajax({ 471 476 type : 'POST', 472 477 url : ajaxurl, 473 478 data : post, 474 success : function(x) { commentReply.show(x); }, 479 success : function(x) { 480 commentReply.show(x); 481 if (remove_class) { 482 $('#comment-' + commentID).removeClass('even').removeClass('thread-even').addClass('alt odd thread-odd'). 483 css('background-color', ''); 484 } 485 }, 475 486 error : function(r) { commentReply.error(r); } 476 487 }); 477 478 488 return false; 479 489 }, 480 490 … … 517 527 $('#replyrow').after(c); 518 528 id = $(id); 519 529 t.addEvents(id); 520 bg = id.hasClass('unapproved') ? '#FFFFE0' : id.closest('.widefat, .postbox').css('backgroundColor');530 bg = id.hasClass('unapproved') ? '#FFFFE0' : '#FEFEFE'; 521 531 522 532 id.animate( { 'backgroundColor':'#CCEEBB' }, 300 ) 523 533 .animate( { 'backgroundColor': bg }, 300, function() {