Use unobtrusive JS for Comment list table row actions.
Props aubreypwd. Fixes #27533. Built from https://develop.svn.wordpress.org/trunk@28810 git-svn-id: http://core.svn.wordpress.org/trunk@28618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -607,6 +607,25 @@ $(document).ready(function(){
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
if ( typeof commentReply != 'undefined' ) {
|
||||
|
||||
// Each "Quick Edit" link, open the comment editor
|
||||
$( 'body' ).on( 'click', '.comment .row-actions .quickedit .edit-comment-inline', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var $el = $( e.currentTarget );
|
||||
commentReply.open( $el.data( 'comment-id' ), $el.data( 'post-id' ), 'edit' );
|
||||
} );
|
||||
|
||||
// Each "Reply" link, open the comment reply
|
||||
$( 'body' ).on( 'click', '.comment .row-actions .reply .reply-comment-inline', function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var $el = $( e.currentTarget );
|
||||
commentReply.open( $el.data('comment-id'), $el.data('post-id') );
|
||||
} );
|
||||
}
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
|
||||
Reference in New Issue
Block a user