Ticket #27533: 27533.5.diff
File 27533.5.diff, 2.4 KB (added by , 11 years ago) |
---|
-
src/wp-admin/includes/class-wp-comments-list-table.php
476 476 477 477 $format = '<a data-comment-id="%d" data-post-id="%d" class="%s" title="%s" href="#">%s</a>'; 478 478 479 $actions['quickedit'] = sprintf( $format, $comment->comment_ID, $post->ID, 'vim-q edit-comment-inline ', esc_attr__( 'Quick Edit' ), __( 'Quick Edit' ) );479 $actions['quickedit'] = sprintf( $format, $comment->comment_ID, $post->ID, 'vim-q edit-comment-inline comment-inline', esc_attr__( 'Quick Edit' ), __( 'Quick Edit' ) ); 480 480 481 $actions['reply'] = sprintf( $format, $comment->comment_ID, $post->ID, 'vim-r reply-comment-inline ', esc_attr__( 'Reply to this comment' ), __( 'Reply' ) );481 $actions['reply'] = sprintf( $format, $comment->comment_ID, $post->ID, 'vim-r reply-comment-inline comment-inline', esc_attr__( 'Reply to this comment' ), __( 'Reply' ) ); 482 482 } 483 483 484 484 /** This filter is documented in wp-admin/includes/dashboard.php */ -
src/wp-admin/js/edit-comments.js
608 608 ); 609 609 } 610 610 611 if ( typeof commentReply != 'undefined' ) { 611 // Quick Edit and Reply have an inline comment editor. 612 $( '#the-comment-list' ).on( 'click', '.comment-inline', function (e) { 613 e.preventDefault(); 612 614 613 // Each "Quick Edit" link, open the comment editor 614 $( 'body' ).on( 'click', '.comment .row-actions .quickedit .edit-comment-inline', function (e) { 615 e.preventDefault(); 615 var $el = $( this ), 616 action = 'replyto'; 616 617 617 var $el = $( e.currentTarget );618 commentReply.open( $el.data( 'comment-id' ), $el.data( 'post-id' ), 'edit' );619 } );618 if ( $el.hasClass( 'edit-comment-inline' ) ) { 619 action = 'edit'; 620 } 620 621 621 // Each "Reply" link, open the comment reply 622 $( 'body' ).on( 'click', '.comment .row-actions .reply .reply-comment-inline', function (e) { 623 e.preventDefault(); 624 625 var $el = $( e.currentTarget ); 626 commentReply.open( $el.data('comment-id'), $el.data('post-id') ); 627 } ); 628 } 622 commentReply.open( $el.data( 'comment-id' ), $el.data( 'post-id' ), action ); 623 } ); 629 624 }); 630 625 631 626 })(jQuery);