1 /* global adminCommentsL10n, thousandsSeparator, list_args, QTags, ajaxurl, wpAjax */
2 var setCommentsList, theList, theExtraList, commentReply;
5 var getCount, updateCount, updateCountText, updatePending, updateApproved,
6 updateHtmlTitle, updateDashboardText, adminTitle = document.title,
7 isDashboard = $('#dashboard_right_now').length,
10 getCount = function(el) {
11 var n = parseInt( el.html().replace(/[^0-9]+/g, ''), 10 );
18 updateCount = function(el, n) {
23 n = n < 1 ? '0' : n.toString();
25 while ( n.length > 3 ) {
26 n1 = thousandsSeparator + n.substr(n.length - 3) + n1;
27 n = n.substr(0, n.length - 3);
34 updateApproved = function( diff, commentPostId ) {
35 var postSelector = '.post-com-count-' + commentPostId,
36 noClass = 'comment-count-no-comments',
37 approvedClass = 'comment-count-approved',
41 updateCountText( 'span.approved-count', diff );
43 if ( ! commentPostId ) {
47 // cache selectors to not get dupes
48 approved = $( 'span.' + approvedClass, postSelector );
49 noComments = $( 'span.' + noClass, postSelector );
51 approved.each(function() {
52 var a = $(this), n = getCount(a) + diff;
57 a.removeClass( approvedClass ).addClass( noClass );
59 a.addClass( approvedClass ).removeClass( noClass );
64 noComments.each(function() {
67 a.removeClass( noClass ).addClass( approvedClass );
69 a.addClass( noClass ).removeClass( approvedClass );
71 updateCount( a, diff );
75 updateCountText = function( selector, diff ) {
76 $( selector ).each(function() {
77 var a = $(this), n = getCount(a) + diff;
85 updateDashboardText = function ( response ) {
86 if ( ! isDashboard || ! response || ! response.i18n_comments_text ) {
90 var rightNow = $( '#dashboard_right_now' );
92 $( '.comment-count a', rightNow ).text( response.i18n_comments_text );
93 $( '.comment-mod-count a', rightNow ).text( response.i18n_moderation_text )
95 [ response.in_moderation > 0 ? 'removeClass' : 'addClass' ]( 'hidden' );
98 updateHtmlTitle = function ( diff ) {
99 var newTitle, regExMatch, titleCount, commentFrag;
101 titleRegEx = titleRegEx || new RegExp( adminCommentsL10n.docTitleCommentsCount.replace( '%s', '\\([0-9' + thousandsSeparator + ']+\\)' ) + '?' );
102 // count funcs operate on a $'d element
103 titleDiv = titleDiv || $( '<div />' );
104 newTitle = adminTitle;
106 commentFrag = titleRegEx.exec( document.title );
108 commentFrag = commentFrag[0];
109 titleDiv.html( commentFrag );
110 titleCount = getCount( titleDiv ) + diff;
116 if ( titleCount >= 1 ) {
117 updateCount( titleDiv, titleCount );
118 regExMatch = titleRegEx.exec( document.title );
120 newTitle = document.title.replace( regExMatch[0], adminCommentsL10n.docTitleCommentsCount.replace( '%s', titleDiv.text() ) + ' ' );
123 regExMatch = titleRegEx.exec( newTitle );
125 newTitle = newTitle.replace( regExMatch[0], adminCommentsL10n.docTitleComments );
128 document.title = newTitle;
131 updatePending = function( diff, commentPostId ) {
132 var postSelector = '.post-com-count-' + commentPostId,
133 noClass = 'comment-count-no-pending',
134 noParentClass = 'post-com-count-no-pending',
135 pendingClass = 'comment-count-pending',
139 if ( ! isDashboard ) {
140 updateHtmlTitle( diff );
143 $( 'span.pending-count' ).each(function() {
144 var a = $(this), n = getCount(a) + diff;
147 a.closest('.awaiting-mod')[ 0 === n ? 'addClass' : 'removeClass' ]('count-0');
151 if ( ! commentPostId ) {
155 // cache selectors to not get dupes
156 pending = $( 'span.' + pendingClass, postSelector );
157 noPending = $( 'span.' + noClass, postSelector );
159 pending.each(function() {
160 var a = $(this), n = getCount(a) + diff;
165 a.parent().addClass( noParentClass );
166 a.removeClass( pendingClass ).addClass( noClass );
168 a.parent().removeClass( noParentClass );
169 a.addClass( pendingClass ).removeClass( noClass );
174 noPending.each(function() {
177 a.parent().removeClass( noParentClass );
178 a.removeClass( noClass ).addClass( pendingClass );
180 a.parent().addClass( noParentClass );
181 a.addClass( noClass ).removeClass( pendingClass );
183 updateCount( a, diff );
187 setCommentsList = function() {
188 var totalInput, perPageInput, pageInput, dimAfter, delBefore, updateTotalCount, delAfter, refillTheExtraList, diff,
189 lastConfidentTime = 0;
191 totalInput = $('input[name="_total"]', '#comments-form');
192 perPageInput = $('input[name="_per_page"]', '#comments-form');
193 pageInput = $('input[name="_page"]', '#comments-form');
195 // Updates the current total (stored in the _total input)
196 updateTotalCount = function( total, time, setConfidentTime ) {
197 if ( time < lastConfidentTime )
200 if ( setConfidentTime )
201 lastConfidentTime = time;
203 totalInput.val( total.toString() );
206 // this fires when viewing "All"
207 dimAfter = function( r, settings ) {
208 var editRow, replyID, replyButton, response,
209 c = $( '#' + settings.element );
211 if ( true !== settings.parsed ) {
212 response = settings.parsed.responses[0];
215 editRow = $('#replyrow');
216 replyID = $('#comment_ID', editRow).val();
217 replyButton = $('#replybtn', editRow);
219 if ( c.is('.unapproved') ) {
220 if ( settings.data.id == replyID )
221 replyButton.text(adminCommentsL10n.replyApprove);
223 c.find('div.comment_status').html('0');
225 if ( settings.data.id == replyID )
226 replyButton.text(adminCommentsL10n.reply);
228 c.find('div.comment_status').html('1');
231 diff = $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1;
233 updateDashboardText( response.supplemental );
234 updatePending( diff, response.supplemental.postId );
235 updateApproved( -1 * diff, response.supplemental.postId );
237 updatePending( diff );
238 updateApproved( -1 * diff );
242 // Send current total, page, per_page and url
243 delBefore = function( settings, list ) {
244 var note, id, el, n, h, a, author,
246 wpListsData = $( settings.target ).attr( 'data-wp-lists' );
248 settings.data._total = totalInput.val() || 0;
249 settings.data._per_page = perPageInput.val() || 0;
250 settings.data._page = pageInput.val() || 0;
251 settings.data._url = document.location.href;
252 settings.data.comment_status = $('input[name="comment_status"]', '#comments-form').val();
254 if ( wpListsData.indexOf(':trash=1') != -1 )
256 else if ( wpListsData.indexOf(':spam=1') != -1 )
260 id = wpListsData.replace(/.*?comment-([0-9]+).*/, '$1');
261 el = $('#comment-' + id);
262 note = $('#' + action + '-undo-holder').html();
264 el.find('.check-column :checkbox').prop('checked', false); // Uncheck the row so as not to be affected by Bulk Edits.
266 if ( el.siblings('#replyrow').length && commentReply.cid == id )
267 commentReply.close();
270 n = el.children(':visible').length;
271 author = $('.author strong', el).text();
272 h = $('<tr id="undo-' + id + '" class="undo un' + action + '" style="display:none;"><td colspan="' + n + '">' + note + '</td></tr>');
274 author = $('.comment-author', el).text();
275 h = $('<div id="undo-' + id + '" style="display:none;" class="undo un' + action + '">' + note + '</div>');
280 $('strong', '#undo-' + id).text(author);
281 a = $('.undo a', '#undo-' + id);
282 a.attr('href', 'comment.php?action=un' + action + 'comment&c=' + id + '&_wpnonce=' + settings.data._ajax_nonce);
283 a.attr('data-wp-lists', 'delete:the-comment-list:comment-' + id + '::un' + action + '=1');
284 a.attr('class', 'vim-z vim-destructive');
285 $('.avatar', el).first().clone().prependTo('#undo-' + id + ' .' + action + '-undo-inside');
287 a.click(function( e ){
289 list.wpList.del(this);
290 $('#undo-' + id).css( {backgroundColor:'#ceb'} ).fadeOut(350, function(){
292 $('#comment-' + id).css('backgroundColor', '').fadeIn(300, function(){ $(this).show(); });
300 // In admin-ajax.php, we send back the unix time stamp instead of 1 on success
301 delAfter = function( r, settings ) {
302 var total_items_i18n, total, animated, animatedCallback,
303 response = true === settings.parsed ? {} : settings.parsed.responses[0],
304 commentStatus = true === settings.parsed ? '' : response.supplemental.status,
305 commentPostId = true === settings.parsed ? '' : response.supplemental.postId,
306 newTotal = true === settings.parsed ? '' : response.supplemental,
308 targetParent = $( settings.target ).parent(),
309 commentRow = $('#' + settings.element),
311 spamDiff, trashDiff, pendingDiff, approvedDiff,
313 approved = commentRow.hasClass( 'approved' ),
314 unapproved = commentRow.hasClass( 'unapproved' ),
315 spammed = commentRow.hasClass( 'spam' ),
316 trashed = commentRow.hasClass( 'trash' );
318 updateDashboardText( newTotal );
320 // the order of these checks is important
321 // .unspam can also have .approve or .unapprove
322 // .untrash can also have .approve or .unapprove
324 if ( targetParent.is( 'span.undo' ) ) {
325 // the comment was spammed
326 if ( targetParent.hasClass( 'unspam' ) ) {
329 if ( 'trash' === commentStatus ) {
331 } else if ( '1' === commentStatus ) {
333 } else if ( '0' === commentStatus ) {
337 // the comment was trashed
338 } else if ( targetParent.hasClass( 'untrash' ) ) {
341 if ( 'spam' === commentStatus ) {
343 } else if ( '1' === commentStatus ) {
345 } else if ( '0' === commentStatus ) {
350 // user clicked "Spam"
351 } else if ( targetParent.is( 'span.spam' ) ) {
352 // the comment is currently approved
355 // the comment is currently pending
356 } else if ( unapproved ) {
358 // the comment was in the trash
359 } else if ( trashed ) {
362 // you can't spam an item on the spam screen
365 // user clicked "Unspam"
366 } else if ( targetParent.is( 'span.unspam' ) ) {
369 } else if ( unapproved ) {
371 } else if ( trashed ) {
372 // the comment was previously approved
373 if ( targetParent.hasClass( 'approve' ) ) {
375 // the comment was previously pending
376 } else if ( targetParent.hasClass( 'unapprove' ) ) {
379 } else if ( spammed ) {
380 if ( targetParent.hasClass( 'approve' ) ) {
383 } else if ( targetParent.hasClass( 'unapprove' ) ) {
387 // you can Unspam an item on the spam screen
390 // user clicked "Trash"
391 } else if ( targetParent.is( 'span.trash' ) ) {
394 } else if ( unapproved ) {
396 // the comment was in the spam queue
397 } else if ( spammed ) {
400 // you can't trash an item on the trash screen
403 // user clicked "Restore"
404 } else if ( targetParent.is( 'span.untrash' ) ) {
407 } else if ( unapproved ) {
409 } else if ( trashed ) {
410 if ( targetParent.hasClass( 'approve' ) ) {
412 } else if ( targetParent.hasClass( 'unapprove' ) ) {
416 // you can't go from trash to spam
417 // you can untrash on the trash screen
420 // User clicked "Approve"
421 } else if ( targetParent.is( 'span.approve:not(.unspam):not(.untrash)' ) ) {
425 // User clicked "Unapprove"
426 } else if ( targetParent.is( 'span.unapprove:not(.unspam):not(.untrash)' ) ) {
430 // User clicked "Delete Permanently"
431 } else if ( targetParent.is( 'span.delete' ) ) {
434 } else if ( trashed ) {
440 updatePending( pendingDiff, commentPostId );
441 updateCountText( 'span.all-count', pendingDiff );
444 if ( approvedDiff ) {
445 updateApproved( approvedDiff, commentPostId );
446 updateCountText( 'span.all-count', approvedDiff );
450 updateCountText( 'span.spam-count', spamDiff );
454 updateCountText( 'span.trash-count', trashDiff );
457 if ( ! isDashboard ) {
458 total = totalInput.val() ? parseInt( totalInput.val(), 10 ) : 0;
459 if ( $(settings.target).parent().is('span.undo') )
467 if ( 'object' === typeof r ) {
468 if ( response.supplemental.total_items_i18n && lastConfidentTime < response.supplemental.time ) {
469 total_items_i18n = response.supplemental.total_items_i18n || '';
470 if ( total_items_i18n ) {
471 $('.displaying-num').text( total_items_i18n );
472 $('.total-pages').text( response.supplemental.total_pages_i18n );
473 $('.tablenav-pages').find('.next-page, .last-page').toggleClass('disabled', response.supplemental.total_pages == $('.current-page').val());
475 updateTotalCount( total, response.supplemental.time, true );
476 } else if ( response.supplemental.time ) {
477 updateTotalCount( total, response.supplemental.time, false );
480 updateTotalCount( total, r, false );
484 if ( ! theExtraList || theExtraList.size() === 0 || theExtraList.children().size() === 0 ) {
488 theList.get(0).wpList.add( theExtraList.children( ':eq(0):not(.no-items)' ).remove().clone() );
490 refillTheExtraList();
492 animated = $( ':animated', '#the-comment-list' );
493 animatedCallback = function () {
494 if ( ! $( '#the-comment-list tr:visible' ).length ) {
495 theList.get(0).wpList.add( theExtraList.find( '.no-items' ).clone() );
499 if ( animated.length ) {
500 animated.promise().done( animatedCallback );
506 refillTheExtraList = function(ev) {
507 var args = $.query.get(), total_pages = $('.total-pages').text(), per_page = $('input[name="_per_page"]', '#comments-form').val();
512 if (args.paged > total_pages) {
517 theExtraList.empty();
518 args.number = Math.min(8, per_page); // see WP_Comments_List_Table::prepare_items() @ class-wp-comments-list-table.php
521 args.offset = Math.min(8, per_page) - 1; // fetch only the next item on the extra list
524 args.no_placeholder = true;
528 // $.query.get() needs some correction to be sent into an ajax request
529 if ( true === args.comment_type )
530 args.comment_type = '';
532 args = $.extend(args, {
533 'action': 'fetch-list',
534 'list_args': list_args,
535 '_ajax_fetch_list_nonce': $('#_ajax_fetch_list_nonce').val()
543 success: function(response) {
544 theExtraList.get(0).wpList.add( response.rows );
549 theExtraList = $('#the-extra-comment-list').wpList( { alt: '', delColor: 'none', addColor: 'none' } );
550 theList = $('#the-comment-list').wpList( { alt: '', delBefore: delBefore, dimAfter: dimAfter, delAfter: delAfter, addColor: 'none' } )
551 .bind('wpListDelEnd', function(e, s){
552 var wpListsData = $(s.target).attr('data-wp-lists'), id = s.element.replace(/[^0-9]+/g, '');
554 if ( wpListsData.indexOf(':trash=1') != -1 || wpListsData.indexOf(':spam=1') != -1 )
555 $('#undo-' + id).fadeIn(300, function(){ $(this).show(); });
564 var row = $('#replyrow');
566 $('a.cancel', row).click(function() { return commentReply.revert(); });
567 $('a.save', row).click(function() { return commentReply.send(); });
568 $( 'input#author-name, input#author-email, input#author-url', row ).keypress( function( e ) {
569 if ( e.which == 13 ) {
577 $('#the-comment-list .column-comment > p').dblclick(function(){
578 commentReply.toggle($(this).parent());
581 $('#doaction, #doaction2, #post-query-submit').click(function(){
582 if ( $('#the-comment-list #replyrow').length > 0 )
583 commentReply.close();
586 this.comments_listing = $('#comments-form > input[name="comment_status"]').val() || '';
588 /* $(listTable).bind('beforeChangePage', function(){
589 commentReply.close();
593 addEvents : function(r) {
595 $(this).find('.column-comment > p').dblclick(function(){
596 commentReply.toggle($(this).parent());
601 toggle : function(el) {
602 if ( 'none' !== $( el ).css( 'display' ) && ( $( '#replyrow' ).parent().is('#com-reply') || window.confirm( adminCommentsL10n.warnQuickEdit ) ) ) {
603 $( el ).find( 'a.vim-q' ).click();
607 revert : function() {
609 if ( $('#the-comment-list #replyrow').length < 1 )
612 $('#replyrow').fadeOut('fast', function(){
613 commentReply.close();
620 var c, replyrow = $('#replyrow');
622 // replyrow is not showing?
623 if ( replyrow.parent().is('#com-reply') )
626 if ( this.cid && this.act == 'edit-comment' ) {
627 c = $('#comment-' + this.cid);
628 c.fadeIn(300, function(){ c.show(); }).css('backgroundColor', '');
631 // reset the Quicktags buttons
632 if ( typeof QTags != 'undefined' )
633 QTags.closeAllTags('replycontent');
635 $('#add-new-comment').css('display', '');
638 $('#com-reply').append( replyrow );
639 $('#replycontent').css('height', '').val('');
640 $('#edithead input').val('');
641 $('.error', replyrow).empty().hide();
642 $( '.spinner', replyrow ).removeClass( 'is-active' );
647 open : function(comment_id, post_id, action) {
648 var editRow, rowData, act, replyButton, editHeight,
650 c = $('#comment-' + comment_id),
657 editRow = $('#replyrow');
658 rowData = $('#inline-'+comment_id);
659 action = action || 'replyto';
660 act = 'edit' == action ? 'edit' : 'replyto';
661 act = t.act = act + '-comment';
662 colspanVal = $( '> th:visible, > td:visible', c ).length;
664 // Make sure it's actually a table and there's a `colspan` value to apply.
665 if ( editRow.hasClass( 'inline-edit-row' ) && 0 !== colspanVal ) {
666 $( 'td', editRow ).attr( 'colspan', colspanVal );
669 $('#action', editRow).val(act);
670 $('#comment_post_ID', editRow).val(post_id);
671 $('#comment_ID', editRow).val(comment_id);
673 if ( action == 'edit' ) {
674 $( '#author-name', editRow ).val( $( 'div.author', rowData ).text() );
675 $('#author-email', editRow).val( $('div.author-email', rowData).text() );
676 $('#author-url', editRow).val( $('div.author-url', rowData).text() );
677 $('#status', editRow).val( $('div.comment_status', rowData).text() );
678 $('#replycontent', editRow).val( $('textarea.comment', rowData).val() );
679 $( '#edithead, #editlegend, #savebtn', editRow ).show();
680 $('#replyhead, #replybtn, #addhead, #addbtn', editRow).hide();
683 // Limit the maximum height when editing very long comments to make it more manageable.
684 // The textarea is resizable in most browsers, so the user can adjust it if needed.
685 editHeight = h > 500 ? 500 : h;
686 $('#replycontent', editRow).css('height', editHeight + 'px');
689 c.after( editRow ).fadeOut('fast', function(){
690 $('#replyrow').fadeIn(300, function(){ $(this).show(); });
692 } else if ( action == 'add' ) {
693 $('#addhead, #addbtn', editRow).show();
694 $( '#replyhead, #replybtn, #edithead, #editlegend, #savebtn', editRow ) .hide();
695 $('#the-comment-list').prepend(editRow);
696 $('#replyrow').fadeIn(300);
698 replyButton = $('#replybtn', editRow);
699 $( '#edithead, #editlegend, #savebtn, #addhead, #addbtn', editRow ).hide();
700 $('#replyhead, #replybtn', editRow).show();
703 if ( c.hasClass('unapproved') ) {
704 replyButton.text(adminCommentsL10n.replyApprove);
706 replyButton.text(adminCommentsL10n.reply);
709 $('#replyrow').fadeIn(300, function(){ $(this).show(); });
712 setTimeout(function() {
713 var rtop, rbottom, scrollTop, vp, scrollBottom;
715 rtop = $('#replyrow').offset().top;
716 rbottom = rtop + $('#replyrow').height();
717 scrollTop = window.pageYOffset || document.documentElement.scrollTop;
718 vp = document.documentElement.clientHeight || window.innerHeight || 0;
719 scrollBottom = scrollTop + vp;
721 if ( scrollBottom - 20 < rbottom )
722 window.scroll(0, rbottom - vp + 35);
723 else if ( rtop - 20 < scrollTop )
724 window.scroll(0, rtop - 35);
726 $('#replycontent').focus().keyup(function(e){
728 commentReply.revert(); // close on Escape
738 $('#replysubmit .error').hide();
739 $( '#replysubmit .spinner' ).addClass( 'is-active' );
741 $('#replyrow input').not(':button').each(function() {
743 post[ t.attr('name') ] = t.val();
746 post.content = $('#replycontent').val();
747 post.id = post.comment_post_ID;
748 post.comments_listing = this.comments_listing;
749 post.p = $('[name="p"]').val();
751 if ( $('#comment-' + $('#comment_ID').val()).hasClass('unapproved') )
752 post.approve_parent = 1;
758 success : function(x) { commentReply.show(x); },
759 error : function(r) { commentReply.error(r); }
765 show : function(xml) {
766 var t = this, r, c, id, bg, pid;
768 if ( typeof(xml) == 'string' ) {
769 t.error({'responseText': xml});
773 r = wpAjax.parseAjaxResponse(xml);
775 t.error({'responseText': wpAjax.broken});
782 id = '#comment-' + r.id;
784 if ( 'edit-comment' == t.act )
787 if ( r.supplemental.parent_approved ) {
788 pid = $('#comment-' + r.supplemental.parent_approved);
789 updatePending( -1, r.supplemental.parent_post_id );
791 if ( this.comments_listing == 'moderated' ) {
792 pid.animate( { 'backgroundColor':'#CCEEBB' }, 400, function(){
799 if ( r.supplemental.i18n_comments_text ) {
801 updateDashboardText( r.supplemental );
803 updateApproved( 1, r.supplemental.parent_post_id );
804 updateCountText( 'span.all-count', 1 );
808 c = $.trim(r.data); // Trim leading whitespaces
810 $('#replyrow').after(c);
814 bg = id.hasClass('unapproved') ? '#FFFFE0' : id.closest('.widefat, .postbox').css('backgroundColor');
816 id.animate( { 'backgroundColor':'#CCEEBB' }, 300 )
817 .animate( { 'backgroundColor': bg }, 300, function() {
818 if ( pid && pid.length ) {
819 pid.animate( { 'backgroundColor':'#CCEEBB' }, 300 )
820 .animate( { 'backgroundColor': bg }, 300 )
821 .removeClass('unapproved').addClass('approved')
822 .find('div.comment_status').html('1');
828 error : function(r) {
829 var er = r.statusText;
831 $( '#replysubmit .spinner' ).removeClass( 'is-active' );
833 if ( r.responseText )
834 er = r.responseText.replace( /<.[^<>]*?>/g, '' );
837 $('#replysubmit .error').html(er).show();
841 addcomment: function(post_id) {
844 $('#add-new-comment').fadeOut(200, function(){
845 t.open(0, post_id, 'add');
846 $('table.comments-box').css('display', '');
847 $('#no-comments').remove();
852 $(document).ready(function(){
853 var make_hotkeys_redirect, edit_comment, toggle_all, make_bulk;
858 $(document).on( 'click', 'span.delete a.delete', function( e ) {
862 if ( typeof $.table_hotkeys != 'undefined' ) {
863 make_hotkeys_redirect = function(which) {
867 first_last = 'next' == which? 'first' : 'last';
868 l = $('.tablenav-pages .'+which+'-page:not(.disabled)');
870 window.location = l[0].href.replace(/\&hotkeys_highlight_(first|last)=1/g, '')+'&hotkeys_highlight_'+first_last+'=1';
874 edit_comment = function(event, current_row) {
875 window.location = $('span.edit a', current_row).attr('href');
878 toggle_all = function() {
879 $('#cb-select-all-1').data( 'wp-toggle', 1 ).trigger( 'click' ).removeData( 'wp-toggle' );
882 make_bulk = function(value) {
884 var scope = $('select[name="action"]');
885 $('option[value="' + value + '"]', scope).prop('selected', true);
886 $('#doaction').click();
893 'a', 'u', 's', 'd', 'r', 'q', 'z',
895 ['shift+x', toggle_all],
896 ['shift+a', make_bulk('approve')],
897 ['shift+s', make_bulk('spam')],
898 ['shift+d', make_bulk('delete')],
899 ['shift+t', make_bulk('trash')],
900 ['shift+z', make_bulk('untrash')],
901 ['shift+u', make_bulk('unapprove')]
904 highlight_first: adminCommentsL10n.hotkeys_highlight_first,
905 highlight_last: adminCommentsL10n.hotkeys_highlight_last,
906 prev_page_link_cb: make_hotkeys_redirect('prev'),
907 next_page_link_cb: make_hotkeys_redirect('next'),
909 disableInInput: true,
911 noDisable: '.check-column input[type="checkbox"]'
913 cycle_expr: '#the-comment-list tr',
919 // Quick Edit and Reply have an inline comment editor.
920 $( '#the-comment-list' ).on( 'click', '.comment-inline', function (e) {
925 if ( 'undefined' !== typeof $el.data( 'action' ) ) {
926 action = $el.data( 'action' );
929 commentReply.open( $el.data( 'commentId' ), $el.data( 'postId' ), action );