Ticket #25060: 25060.patch
File 25060.patch, 1.0 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 var commentID = $('#comment_ID').val(); 467 var edit_row = $('#comment-' + commentID ); 468 var remove_class; 466 469 467 if ( $('#comment-' + $('#comment_ID').val()).hasClass('unapproved') )470 if (edit_row.hasClass('unapproved') ) 468 471 post.approve_parent = 1; 469 472 473 if (edit_row.prev().hasClass('even')) 474 remove_class = true; 475 470 476 $.ajax({ 471 477 type : 'POST', 472 478 url : ajaxurl, 473 479 data : post, 474 success : function(x) { commentReply.show(x); }, 480 success : function(x) { 481 commentReply.show(x); 482 if (remove_class) 483 edit_row.removeClass('even thread-even').addClass('alt odd thread-odd'); 484 485 }, 475 486 error : function(r) { commentReply.error(r); } 476 487 }); 477 478 488 return false; 479 489 }, 480 490