diff --git wp-admin/admin-ajax.php wp-admin/admin-ajax.php
index b795180..5eb33e1 100644
|
|
case 'replyto-comment' : |
625 | 625 | |
626 | 626 | set_current_screen( 'edit-comments' ); |
627 | 627 | |
628 | | $wp_list_table = get_list_table('WP_Comments_List_Table'); |
629 | | $wp_list_table->checkbox = ( isset($_POST['checkbox']) && true == $_POST['checkbox'] ) ? 1 : 0; |
630 | | |
631 | 628 | $comment_post_ID = (int) $_POST['comment_post_ID']; |
632 | 629 | if ( !current_user_can( 'edit_post', $comment_post_ID ) ) |
633 | 630 | die('-1'); |
… |
… |
case 'replyto-comment' : |
674 | 671 | require_once( ABSPATH . 'wp-admin/includes/dashboard.php' ); |
675 | 672 | _wp_dashboard_recent_comments_row( $comment ); |
676 | 673 | } else { |
| 674 | if ( 'single' == $_REQUEST['mode'] ) { |
| 675 | $wp_list_table = get_list_table('WP_Post_Comments_List_Table'); |
| 676 | } else { |
| 677 | $wp_list_table = get_list_table('WP_Comments_List_Table'); |
| 678 | } |
677 | 679 | $wp_list_table->single_row( $comment ); |
678 | 680 | } |
679 | 681 | $comment_list_item = ob_get_contents(); |
diff --git wp-admin/css/wp-admin.dev.css wp-admin/css/wp-admin.dev.css
index 0854577..14e0d08 100644
|
|
table.fixed { |
1373 | 1373 | #comments-form .fixed .column-author { |
1374 | 1374 | width: 20%; |
1375 | 1375 | } |
1376 | | |
| 1376 | #commentsdiv.postbox .inside { |
| 1377 | line-height:1.4em; |
| 1378 | margin:0; |
| 1379 | } |
| 1380 | #commentsdiv.postbox .inside .row-actions { |
| 1381 | line-height:18px; |
| 1382 | } |
| 1383 | #commentsdiv.postbox .inside td { |
| 1384 | padding:1em 10px; |
| 1385 | } |
| 1386 | #commentsdiv.postbox .inside .column-comment p { |
| 1387 | } |
| 1388 | #commentsdiv.postbox .inside .column-author { |
| 1389 | width:33%; |
| 1390 | } |
| 1391 | #commentsdiv.postbox .inside p { |
| 1392 | margin:6px 10px 8px; |
| 1393 | } |
| 1394 | #commentsdiv.postbox .column-comment p { |
| 1395 | margin:0.6em 0; |
| 1396 | } |
| 1397 | #commentsdiv.postbox #replyrow td { |
| 1398 | padding:0; |
| 1399 | } |
1377 | 1400 | .sorting-indicator { |
1378 | 1401 | display: none; |
1379 | 1402 | width: 21px; |
… |
… |
span.imgedit-scale-warn { |
3411 | 3434 | #replysubmit { |
3412 | 3435 | margin: 0; |
3413 | 3436 | padding: 3px 7px; |
| 3437 | text-align:center; |
3414 | 3438 | } |
3415 | 3439 | |
3416 | 3440 | #replysubmit img.waiting, |
… |
… |
span.imgedit-scale-warn { |
3424 | 3448 | margin-right: 5px; |
3425 | 3449 | } |
3426 | 3450 | |
| 3451 | #replysubmit .error { |
| 3452 | color:red; |
| 3453 | line-height:21px; |
| 3454 | text-align:center; |
| 3455 | vertical-align:center; |
| 3456 | } |
| 3457 | |
3427 | 3458 | #replyrow #editor-toolbar { |
3428 | 3459 | display: none; |
3429 | 3460 | } |
diff --git wp-admin/includes/class-wp-comments-list-table.php wp-admin/includes/class-wp-comments-list-table.php
index cdec93e..4e2a258 100644
|
|
class WP_Comments_List_Table extends WP_List_Table { |
29 | 29 | add_filter( 'comment_author', 'floated_admin_avatar' ); |
30 | 30 | |
31 | 31 | parent::WP_List_Table( array( |
32 | | 'plural' => 'comments' |
| 32 | 'plural' => 'comments', |
| 33 | 'singular' => 'comment', |
33 | 34 | ) ); |
34 | 35 | } |
35 | 36 | |
… |
… |
class WP_Comments_List_Table extends WP_List_Table { |
66 | 67 | } |
67 | 68 | |
68 | 69 | $page = $this->get_pagenum(); |
69 | | |
70 | | $start = ( $page - 1 ) * $comments_per_page; |
| 70 | |
| 71 | if ( isset( $_REQUEST['start'] ) ) { |
| 72 | $start = $_REQUEST['start']; |
| 73 | } else { |
| 74 | $start = ( $page - 1 ) * $comments_per_page; |
| 75 | } |
71 | 76 | |
72 | 77 | if ( $doing_ajax && isset( $_REQUEST['offset'] ) ) { |
73 | 78 | $start += $_REQUEST['offset']; |
… |
… |
class WP_Comments_List_Table extends WP_List_Table { |
502 | 507 | */ |
503 | 508 | class WP_Post_Comments_List_Table extends WP_Comments_List_Table { |
504 | 509 | |
505 | | function get_columns() { |
506 | | return array( |
| 510 | function get_column_info() { |
| 511 | $this->_column_headers = array( |
| 512 | array( |
507 | 513 | 'author' => __( 'Author' ), |
508 | 514 | 'comment' => _x( 'Comment', 'column name' ), |
| 515 | ), |
| 516 | array(), |
| 517 | array(), |
509 | 518 | ); |
| 519 | |
| 520 | return $this->_column_headers; |
510 | 521 | } |
511 | | |
512 | | function get_sortable_columns() { |
513 | | return array(); |
| 522 | |
| 523 | function get_table_classes() { |
| 524 | $classes = parent::get_table_classes(); |
| 525 | $classes[] = 'comments-box'; |
| 526 | return $classes; |
| 527 | } |
| 528 | |
| 529 | function display( $output_empty = false ) { |
| 530 | extract( $this->_args ); |
| 531 | ?> |
| 532 | <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" cellspacing="0" style="display:none;"> |
| 533 | <tbody id="the-comment-list"<?php if ( $singular ) echo " class='list:$singular'"; ?>> |
| 534 | <?php if ( ! $output_empty ) $this->display_rows_or_placeholder(); ?> |
| 535 | </tbody> |
| 536 | </table> |
| 537 | <?php |
514 | 538 | } |
515 | 539 | } |
516 | 540 | |
diff --git wp-admin/includes/meta-boxes.php wp-admin/includes/meta-boxes.php
index 96466b5..5e002a0 100644
|
|
function post_comment_meta_box($post) { |
488 | 488 | wp_nonce_field( 'get-comments', 'add_comment_nonce', false ); |
489 | 489 | |
490 | 490 | $wp_list_table = get_list_table('WP_Post_Comments_List_Table'); |
| 491 | $wp_list_table->display( true ); |
491 | 492 | ?> |
492 | | |
493 | | <table class="widefat comments-box fixed" cellspacing="0" style="display:none;"> |
494 | | <thead><tr> |
495 | | <?php $wp_list_table->print_column_headers(); ?> |
496 | | </tr></thead> |
497 | | <tbody id="the-comment-list" class="list:comment"></tbody> |
498 | | </table> |
499 | 493 | <p class="hide-if-no-js"><a href="#commentstatusdiv" id="show-comments" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /></p> |
500 | 494 | <?php |
501 | 495 | $hidden = get_hidden_meta_boxes('post'); |
diff --git wp-admin/js/edit-comments.dev.js wp-admin/js/edit-comments.dev.js
index 796ead0..41fd452 100644
|
|
setCommentsList = function() { |
204 | 204 | } |
205 | 205 | } |
206 | 206 | |
207 | | if ( theExtraList.size() == 0 || theExtraList.children().size() == 0 || untrash || unspam ) { |
| 207 | |
| 208 | if ( ! theExtraList || theExtraList.size() == 0 || theExtraList.children().size() == 0 || untrash || unspam ) { |
208 | 209 | return; |
209 | 210 | } |
210 | 211 | |
… |
… |
commentReply = { |
403 | 404 | send : function() { |
404 | 405 | var post = {}; |
405 | 406 | |
| 407 | $('#replysubmit .error').hide(); |
406 | 408 | $('#replysubmit .waiting').show(); |
407 | 409 | |
408 | 410 | $('#replyrow input').each(function() { |
… |
… |
commentReply = { |
456 | 458 | .animate( { 'backgroundColor':'#CCEEBB' }, 600 ) |
457 | 459 | .animate( { 'backgroundColor': bg }, 600 ); |
458 | 460 | |
459 | | $.fn.wpList.process($(id)) |
| 461 | $.fn.wpList.process($(id)); |
460 | 462 | }, |
461 | 463 | |
462 | 464 | error : function(r) { |
diff --git wp-admin/js/post.dev.js wp-admin/js/post.dev.js
index ef3b1fb..1c39edf 100644
|
|
commentsBox = { |
173 | 173 | '_ajax_nonce' : $('#add_comment_nonce').val(), |
174 | 174 | 'p' : $('#post_ID').val(), |
175 | 175 | 'start' : st, |
176 | | 'num' : num |
| 176 | 'number' : num |
177 | 177 | }; |
178 | 178 | |
179 | 179 | $.post(ajaxurl, data, |
… |
… |
commentsBox = { |
187 | 187 | |
188 | 188 | theList = theExtraList = null; |
189 | 189 | $("a[className*=':']").unbind(); |
190 | | setCommentsList(); |
191 | 190 | |
192 | 191 | if ( commentsBox.st > commentsBox.total ) |
193 | 192 | $('#show-comments').hide(); |
diff --git wp-includes/js/wp-lists.dev.js wp-includes/js/wp-lists.dev.js
index e6e3793..d425931 100644
|
|
wpList = { |
207 | 207 | element = $('#' + s.element); |
208 | 208 | isClass = element.toggleClass(s.dimClass).is('.' + s.dimClass); |
209 | 209 | color = wpList.getColor( element ); |
210 | | element.toggleClass( s.dimClass ) |
| 210 | element.toggleClass( s.dimClass ); |
211 | 211 | dimColor = isClass ? s.dimAddColor : s.dimDelColor; |
212 | 212 | if ( 'none' != dimColor ) { |
213 | 213 | element |
… |
… |
wpList = { |
323 | 323 | process: function(el) { |
324 | 324 | var list = this, |
325 | 325 | $el = $(el || document); |
326 | | |
| 326 | |
327 | 327 | $el.delegate( "form[class^=add:" + list.id + ":]", 'submit', function(){ |
328 | 328 | return list.wpList.add(this); |
329 | 329 | }); |
… |
… |
wpList = { |
331 | 331 | $el.delegate( "[class^=add:" + list.id + ":]:not(form)", 'click', function(){ |
332 | 332 | return list.wpList.add(this); |
333 | 333 | }); |
334 | | |
| 334 | |
335 | 335 | $el.delegate( "[class^=delete:" + list.id + ":]", 'click', function(){ |
336 | 336 | return list.wpList.del(this); |
337 | 337 | }); |