mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-04 18:01:42 +01:00
Fix Reply and Approve when replying from the comment moderation page, see #15898
git-svn-id: http://svn.automattic.com/wordpress/trunk@17983 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
98bd4c0b2f
commit
7815408b7a
@ -452,7 +452,7 @@ commentReply = {
|
||||
$('#replysubmit .error').hide();
|
||||
$('#replysubmit .waiting').show();
|
||||
|
||||
$('#replyrow input').each(function() {
|
||||
$('#replyrow input').not(':button').each(function() {
|
||||
post[ $(this).attr('name') ] = $(this).val();
|
||||
});
|
||||
|
||||
@ -478,6 +478,8 @@ commentReply = {
|
||||
show : function(xml) {
|
||||
var t = this, r, c, id, bg, pid;
|
||||
|
||||
t.revert();
|
||||
|
||||
if ( typeof(xml) == 'string' ) {
|
||||
t.error({'responseText': xml});
|
||||
return false;
|
||||
@ -495,28 +497,31 @@ commentReply = {
|
||||
if ( 'edit-comment' == t.act )
|
||||
$(id).remove();
|
||||
|
||||
$(c).hide()
|
||||
$('#replyrow').after(c);
|
||||
|
||||
if ( r.supplemental.parent_approved ) {
|
||||
pid = '#comment-' + r.supplemental.parent_approved;
|
||||
pid = $('#comment-' + r.supplemental.parent_approved);
|
||||
updatePending( getCount( $('span.pending-count').eq(0) ) - 1 );
|
||||
|
||||
if ( this.comments_listing == 'moderated' ) {
|
||||
pid.animate( { 'backgroundColor':'#CCEEBB' }, 400, function(){
|
||||
pid.fadeOut();
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
t.revert();
|
||||
t.addEvents($(id));
|
||||
bg = $(id).hasClass('unapproved') ? '#FFFFE0' : '#FFFFFF';
|
||||
$(c).hide()
|
||||
$('#replyrow').after(c);
|
||||
id = $(id);
|
||||
t.addEvents(id);
|
||||
bg = id.css('background-color');
|
||||
|
||||
$(id)
|
||||
.animate( { 'backgroundColor':'#CCEEBB' }, 300 )
|
||||
id.animate( { 'backgroundColor':'#CCEEBB' }, 300 )
|
||||
.animate( { 'backgroundColor': bg }, 300, function() {
|
||||
if ( pid ) {
|
||||
pid = $(pid)
|
||||
.animate( { 'backgroundColor':'#CCEEBB' }, 300 )
|
||||
.animate( { 'backgroundColor': '#FFFFFF' }, 300 )
|
||||
.removeClass('unapproved').addClass('approved');
|
||||
|
||||
pid.find('div.comment_status').html('1');
|
||||
if ( pid && pid.length ) {
|
||||
pid.animate( { 'backgroundColor':'#CCEEBB' }, 300 )
|
||||
.animate( { 'backgroundColor': bg }, 300 )
|
||||
.removeClass('unapproved').addClass('approved')
|
||||
.find('div.comment_status').html('1');
|
||||
}
|
||||
});
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -312,7 +312,7 @@ function wp_default_scripts( &$scripts ) {
|
||||
$scripts->add( 'admin-custom-fields', "/wp-admin/js/custom-fields$suffix.js", array('wp-lists'), '20110429' );
|
||||
$scripts->add_data( 'admin-custom-fields', 'group', 1 );
|
||||
|
||||
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'jquery-query'), '20110518' );
|
||||
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags', 'jquery-query'), '20110521' );
|
||||
$scripts->add_data( 'admin-comments', 'group', 1 );
|
||||
$scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
|
||||
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
|
||||
|
Loading…
Reference in New Issue
Block a user