Changeset 33692
- Timestamp:
- 08/21/2015 05:25:06 PM (9 years ago)
- Location:
- trunk/src/wp-admin
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/css/list-tables.css
r33623 r33692 118 118 } 119 119 120 .column-response .post-com-count-no-pending, 121 .column-comments .post-com-count-no-pending { 122 display: none; 123 } 124 120 125 /* comments */ 121 126 -
trunk/src/wp-admin/includes/class-wp-list-table.php
r33668 r33692 650 650 ); 651 651 } else { 652 printf( '<span class="post-com-count post-com-count-pending "><span class="comment-count comment-count-no-pending" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>',652 printf( '<span class="post-com-count post-com-count-pending post-com-count-no-pending"><span class="comment-count comment-count-no-pending" aria-hidden="true">%s</span><span class="screen-reader-text">%s</span></span>', 653 653 $pending_comments_number, 654 654 $approved_comments ? __( 'No pending comments' ) : __( 'No comments' ) -
trunk/src/wp-admin/js/edit-comments.js
r33663 r33692 139 139 var postSelector = '.post-com-count-' + commentPostId, 140 140 noClass = 'comment-count-no-pending', 141 noParentClass = 'post-com-count-no-pending', 141 142 pendingClass = 'comment-count-pending', 142 counts = $( 'span.pending-count' ),143 143 pending, 144 144 noPending; 145 145 146 counts.each(function() {146 $( 'span.pending-count' ).each(function() { 147 147 var a = $(this), n = getCount(a) + diff; 148 148 if ( n < 1 ) … … 166 166 167 167 if ( 0 === n ) { 168 a.parent().addClass( noParentClass ); 168 169 a.removeClass( pendingClass ).addClass( noClass ); 170 } else { 171 a.parent().removeClass( noParentClass ); 172 a.addClass( pendingClass ).removeClass( noClass ); 169 173 } 170 174 updateCount( a, n ); … … 174 178 var a = $(this); 175 179 if ( diff > 0 ) { 180 a.parent().removeClass( noParentClass ); 176 181 a.removeClass( noClass ).addClass( pendingClass ); 182 } else { 183 a.parent().addClass( noParentClass ); 184 a.addClass( noClass ).removeClass( pendingClass ); 177 185 } 178 186 updateCount( a, diff ); … … 204 212 if ( 0 === n ) { 205 213 a.removeClass( approvedClass ).addClass( noClass ); 214 } else { 215 a.addClass( approvedClass ).removeClass( noClass ); 206 216 } 207 217 updateCount( a, n ); … … 212 222 if ( diff > 0 ) { 213 223 a.removeClass( noClass ).addClass( approvedClass ); 224 } else { 225 a.addClass( noClass ).removeClass( approvedClass ); 214 226 } 215 227 updateCount( a, diff );
Note: See TracChangeset
for help on using the changeset viewer.