diff --git wp-admin/admin-ajax.php wp-admin/admin-ajax.php
index b6420e2..ab58456 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 | if ( ! wp_update_comment( array( 'comment_ID' => $comment_parent, 'comment_approved' => 'approve' ) ) ) { |
| | 665 | die('1'); |
| | 666 | } |
| 665 | 667 | $position = ( isset($_POST['position']) && (int) $_POST['position']) ? (int) $_POST['position'] : '-1'; |
| 666 | 668 | |
| 667 | 669 | $x = new WP_Ajax_Response(); |
diff --git wp-admin/css/wp-admin.dev.css wp-admin/css/wp-admin.dev.css
index 13694dd..4c5fe6b 100644
|
|
|
table.fixed { |
| 1373 | 1373 | width: 20%; |
| 1374 | 1374 | } |
| 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 | } |
| | 1384 | |
| 1376 | 1385 | .sorting-indicator { |
| 1377 | 1386 | display: none; |
| 1378 | 1387 | width: 21px; |
diff --git wp-admin/js/edit-comments.dev.js wp-admin/js/edit-comments.dev.js
index 796ead0..8c40d83 100644
|
|
|
setCommentsList = function() { |
| 249 | 249 | commentReply = { |
| 250 | 250 | cid : '', |
| 251 | 251 | act : '', |
| | 252 | |
| | 253 | showOverlay : function(id) { |
| | 254 | var c = $('#comment-' + id), |
| | 255 | excluded = c.find('td, th').css('opacity', 1).add('td, th', '#replyrow'); |
| | 256 | listTable.$tbody.find('td, th').not(excluded).animate({opacity:'0.2'}, 300); |
| | 257 | c.addClass('focus'); |
| | 258 | c.prev().addClass('blur'); |
| | 259 | }, |
| | 260 | |
| | 261 | hideOverlay : function() { |
| | 262 | listTable.$tbody. |
| | 263 | find('.blur').removeClass('blur').end(). |
| | 264 | find('.focus').removeClass('focus'); |
| | 265 | }, |
| 252 | 266 | |
| 253 | 267 | init : function() { |
| 254 | 268 | var row = $('#replyrow'); |
| … |
… |
commentReply = { |
| 294 | 308 | |
| 295 | 309 | if ( $('#the-comment-list #replyrow').length < 1 ) |
| 296 | 310 | return false; |
| | 311 | |
| | 312 | listTable.$tbody.find('th, td').animate({opacity : 1}, 300); |
| 297 | 313 | |
| 298 | 314 | $('#replyrow').fadeOut('fast', function(){ |
| 299 | 315 | commentReply.close(); |
| … |
… |
commentReply = { |
| 317 | 333 | $('input', '#edithead').val(''); |
| 318 | 334 | $('.error', '#replysubmit').html('').hide(); |
| 319 | 335 | $('.waiting', '#replysubmit').hide(); |
| | 336 | this.hideOverlay(); |
| 320 | 337 | |
| 321 | 338 | if ( $.browser.msie ) |
| 322 | 339 | $('#replycontainer, #replycontent').css('height', '120px'); |
| … |
… |
commentReply = { |
| 328 | 345 | }, |
| 329 | 346 | |
| 330 | 347 | open : function(id, p, a) { |
| 331 | | var t = this, editRow, rowData, act, h, c = $('#comment-' + id); |
| | 348 | var t = this, editRow, rowData, act, h, c = $('#comment-' + id), replyButton; |
| 332 | 349 | t.close(); |
| 333 | 350 | t.cid = id; |
| 334 | 351 | |
| … |
… |
commentReply = { |
| 340 | 357 | $('#action', editRow).val(act); |
| 341 | 358 | $('#comment_post_ID', editRow).val(p); |
| 342 | 359 | $('#comment_ID', editRow).val(id); |
| 343 | | |
| | 360 | t.showOverlay(id); |
| | 361 | |
| 344 | 362 | if ( a == 'edit' ) { |
| 345 | 363 | $('#author', editRow).val( $('div.author', rowData).text() ); |
| 346 | 364 | $('#author-email', editRow).val( $('div.author-email', rowData).text() ); |
| … |
… |
commentReply = { |
| 361 | 379 | $('#replyrow').fadeIn(300, function(){ $(this).show() }); |
| 362 | 380 | }); |
| 363 | 381 | } else { |
| | 382 | replyButton = $('#replybtn', editRow); |
| 364 | 383 | $('#edithead, #savebtn', editRow).hide(); |
| 365 | 384 | $('#replyhead, #replybtn', editRow).show(); |
| 366 | 385 | c.after(editRow); |
| | 386 | if (c.hasClass('unapproved')) { |
| | 387 | replyButton.text(adminCommentsL10n.replyApprove); |
| | 388 | } else { |
| | 389 | replyButton.text(adminCommentsL10n.reply); |
| | 390 | } |
| 367 | 391 | $('#replyrow').fadeIn(300, function(){ $(this).show() }); |
| 368 | 392 | } |
| 369 | 393 | |
| … |
… |
commentReply = { |
| 401 | 425 | }, |
| 402 | 426 | |
| 403 | 427 | send : function() { |
| 404 | | var post = {}; |
| | 428 | var post = {}, c; |
| 405 | 429 | |
| 406 | 430 | $('#replysubmit .waiting').show(); |
| 407 | 431 | |
| … |
… |
commentReply = { |
| 413 | 437 | post.id = post.comment_post_ID; |
| 414 | 438 | post.comments_listing = this.comments_listing; |
| 415 | 439 | post.p = $('[name=p]').val(); |
| 416 | | |
| | 440 | c = $('#comment-' + post.comment_ID); |
| 417 | 441 | $.ajax({ |
| 418 | 442 | type : 'POST', |
| 419 | 443 | url : ajaxurl, |
| 420 | 444 | data : post, |
| 421 | | success : function(x) { commentReply.show(x); }, |
| | 445 | success : function(x) { |
| | 446 | if (c.hasClass('unapproved')) { |
| | 447 | c.removeClass('unapproved').addClass('approved'); |
| | 448 | } |
| | 449 | commentReply.show(x); |
| | 450 | }, |
| 422 | 451 | error : function(r) { commentReply.error(r); } |
| 423 | 452 | }); |
| 424 | 453 | |
diff --git wp-includes/script-loader.php wp-includes/script-loader.php
index ef54e08..79904b6 100644
|
|
|
function wp_default_scripts( &$scripts ) { |
| 317 | 317 | $scripts->add_data( 'admin-comments', 'group', 1 ); |
| 318 | 318 | $scripts->localize( 'admin-comments', 'adminCommentsL10n', array( |
| 319 | 319 | 'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']), |
| 320 | | 'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last']) |
| | 320 | 'hotkeys_highlight_last' => isset($_GET['hotkeys_highlight_last']), |
| | 321 | 'replyApprove' => __( 'Approve and Reply' ), |
| | 322 | 'reply' => __( 'Reply' ), |
| 321 | 323 | ) ); |
| 322 | 324 | |
| 323 | 325 | $scripts->add( 'xfn', "/wp-admin/js/xfn$suffix.js", array('jquery'), '20100403' ); |