diff --git wp-admin/admin-ajax.php wp-admin/admin-ajax.php
index 5eb33e1..c740291 100644
|
|
case 'replyto-comment' : |
661 | 661 | $comment_id = wp_new_comment( $commentdata ); |
662 | 662 | $comment = get_comment($comment_id); |
663 | 663 | if ( ! $comment ) die('1'); |
664 | | |
| 664 | |
| 665 | $parent = get_comment( $comment_parent ); |
| 666 | if ( ! $parent->comment_approved && ! wp_update_comment( array( 'comment_ID' => $comment_parent, 'comment_approved' => 'approve' ) ) ) { |
| 667 | die('1'); |
| 668 | } |
665 | 669 | $position = ( isset($_POST['position']) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1'; |
666 | 670 | |
667 | 671 | $x = new WP_Ajax_Response(); |
diff --git wp-admin/css/wp-admin.dev.css wp-admin/css/wp-admin.dev.css
index 1781101..238bef6 100644
|
|
table.fixed { |
1373 | 1373 | #comments-form .fixed .column-author { |
1374 | 1374 | width: 20%; |
1375 | 1375 | } |
| 1376 | .comments tr.focus th, .comments tr.focus td { |
| 1377 | border-top-width:1px; |
| 1378 | border-top-style:solid; |
| 1379 | } |
| 1380 | |
| 1381 | .comments tr.blur th, .comments tr.blur td { |
| 1382 | border-bottom-width:0; |
| 1383 | } |
1376 | 1384 | #commentsdiv.postbox .inside { |
1377 | 1385 | line-height:1.4em; |
1378 | 1386 | margin:0; |
diff --git wp-admin/js/edit-comments.dev.js wp-admin/js/edit-comments.dev.js
index 177dc86..7eadd38 100644
|
|
setCommentsList = function() { |
252 | 252 | commentReply = { |
253 | 253 | cid : '', |
254 | 254 | act : '', |
| 255 | |
| 256 | showOverlay : function(id) { |
| 257 | var c = $('#comment-' + id), |
| 258 | excluded = c.find('td, th').css('opacity', 1).add('td, th', '#replyrow'); |
| 259 | listTable.$tbody.find('td, th').not(excluded).animate({opacity:'0.2'}, 300); |
| 260 | c.addClass('focus'); |
| 261 | c.prev().addClass('blur'); |
| 262 | }, |
| 263 | |
| 264 | hideOverlay : function() { |
| 265 | listTable.$tbody. |
| 266 | find('.blur').removeClass('blur').end(). |
| 267 | find('.focus').removeClass('focus'); |
| 268 | }, |
255 | 269 | |
256 | 270 | init : function() { |
257 | 271 | var row = $('#replyrow'); |
… |
… |
commentReply = { |
300 | 314 | |
301 | 315 | if ( $('#the-comment-list #replyrow').length < 1 ) |
302 | 316 | return false; |
| 317 | |
| 318 | listTable.$tbody.find('th, td').animate({opacity : 1}, 300); |
303 | 319 | |
304 | 320 | $('#replyrow').fadeOut('fast', function(){ |
305 | 321 | commentReply.close(); |
… |
… |
commentReply = { |
323 | 339 | $('input', '#edithead').val(''); |
324 | 340 | $('.error', '#replysubmit').html('').hide(); |
325 | 341 | $('.waiting', '#replysubmit').hide(); |
| 342 | this.hideOverlay(); |
326 | 343 | |
327 | 344 | if ( $.browser.msie ) |
328 | 345 | $('#replycontainer, #replycontent').css('height', '120px'); |
… |
… |
commentReply = { |
334 | 351 | }, |
335 | 352 | |
336 | 353 | open : function(id, p, a) { |
337 | | var t = this, editRow, rowData, act, h, c = $('#comment-' + id); |
| 354 | var t = this, editRow, rowData, act, h, c = $('#comment-' + id), replyButton; |
338 | 355 | t.close(); |
339 | 356 | t.cid = id; |
340 | 357 | |
… |
… |
commentReply = { |
345 | 362 | $('#action', editRow).val(act); |
346 | 363 | $('#comment_post_ID', editRow).val(p); |
347 | 364 | $('#comment_ID', editRow).val(id); |
348 | | |
| 365 | t.showOverlay(id); |
| 366 | |
349 | 367 | if ( a == 'edit' ) { |
350 | 368 | $('#author', editRow).val( $('div.author', rowData).text() ); |
351 | 369 | $('#author-email', editRow).val( $('div.author-email', rowData).text() ); |
… |
… |
commentReply = { |
366 | 384 | $('#replyrow').fadeIn(300, function(){ $(this).show() }); |
367 | 385 | }); |
368 | 386 | } else { |
| 387 | replyButton = $('#replybtn', editRow); |
369 | 388 | $('#edithead, #savebtn', editRow).hide(); |
370 | 389 | $('#replyhead, #replybtn', editRow).show(); |
371 | 390 | c.after(editRow); |
| 391 | if (c.hasClass('unapproved')) { |
| 392 | replyButton.text(adminCommentsL10n.replyApprove); |
| 393 | } else { |
| 394 | replyButton.text(adminCommentsL10n.reply); |
| 395 | } |
372 | 396 | $('#replyrow').fadeIn(300, function(){ $(this).show() }); |
373 | 397 | } |
374 | 398 | |
… |
… |
commentReply = { |
406 | 430 | }, |
407 | 431 | |
408 | 432 | send : function() { |
409 | | var post = {}; |
| 433 | var post = {}, c; |
410 | 434 | |
411 | 435 | $('#replysubmit .error').hide(); |
412 | 436 | $('#replysubmit .waiting').show(); |
… |
… |
commentReply = { |
419 | 443 | post.id = post.comment_post_ID; |
420 | 444 | post.comments_listing = this.comments_listing; |
421 | 445 | post.p = $('[name=p]').val(); |
422 | | |
| 446 | c = $('#comment-' + post.comment_ID); |
423 | 447 | $.ajax({ |
424 | 448 | type : 'POST', |
425 | 449 | url : ajaxurl, |
426 | 450 | data : post, |
427 | | success : function(x) { commentReply.show(x); }, |
| 451 | success : function(x) { |
| 452 | if (c.hasClass('unapproved')) { |
| 453 | c.removeClass('unapproved').addClass('approved'); |
| 454 | } |
| 455 | commentReply.show(x); |
| 456 | }, |
428 | 457 | error : function(r) { commentReply.error(r); } |
429 | 458 | }); |
430 | 459 | |
diff --git wp-includes/script-loader.php wp-includes/script-loader.php
index 706fd0a..0df59e4 100644
|
|
function wp_default_scripts( &$scripts ) { |
316 | 316 | $scripts->add_data( 'admin-comments', 'group', 1 ); |
317 | 317 | $scripts->localize( 'admin-comments', 'adminCommentsL10n', array( |
318 | 318 | 'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']), |
319 | | 'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last']) |
| 319 | 'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last']), |
| 320 | 'replyApprove' => __( 'Approve and Reply' ), |
| 321 | 'reply' => __( 'Reply' ), |
320 | 322 | ) ); |
321 | 323 | |
322 | 324 | $scripts->add( 'xfn', "/wp-admin/js/xfn$suffix.js", array('jquery'), '20100403' ); |