Ticket #25060: 25060.3.patch
| File 25060.3.patch, 1.4 KB (added by , 13 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 }, 475 484 error : function(r) { commentReply.error(r); } 476 485 }); 477 478 486 return false; 479 487 }, 480 488 … … 517 525 $('#replyrow').after(c); 518 526 id = $(id); 519 527 t.addEvents(id); 520 bg = id.hasClass('unapproved') ? '#FFFFE0' : id.closest('.widefat, .postbox').css('backgroundColor');528 bg = id.hasClass('unapproved') ? '#FFFFE0' : '#FEFEFE'; 521 529 522 530 id.animate( { 'backgroundColor':'#CCEEBB' }, 300 ) 523 531 .animate( { 'backgroundColor': bg }, 300, function() {