Ticket #19029: 19029.diff
| File 19029.diff, 1.5 KB (added by duck_, 20 months ago) |
|---|
-
wp-admin/js/edit-comments.dev.js
103 103 return settings; 104 104 }; 105 105 106 // Updates the current total ( as displayed visibly)106 // Updates the current total (stored in the _total input) 107 107 updateTotalCount = function( total, time, setConfidentTime ) { 108 108 if ( time < lastConfidentTime ) 109 109 return; … … 112 112 lastConfidentTime = time; 113 113 114 114 totalInput.val( total.toString() ); 115 $('span.total-type-count').each( function() {116 updateCount( $(this), total );117 });118 115 }; 119 116 120 117 dashboardTotals = function(n) { … … 172 169 173 170 // In admin-ajax.php, we send back the unix time stamp instead of 1 on success 174 171 delAfter = function( r, settings ) { 175 var total, N, untrash = $(settings.target).parent().is('span.untrash'), 176 unspam = $(settings.target).parent().is('span.unspam'), spam, trash, pending, 172 var total, N, spam, trash, pending, 173 untrash = $(settings.target).parent().is('span.untrash'), 174 unspam = $(settings.target).parent().is('span.unspam'), 177 175 unapproved = $('#' + settings.element).is('.unapproved'); 178 176 179 177 function getUpdate(s) { … … 218 216 dashboardTotals(N); 219 217 } else { 220 218 total = totalInput.val() ? parseInt( totalInput.val(), 10 ) : 0; 221 total = total - spam - trash; 219 if ( $(settings.target).parent().is('span.undo') ) 220 total++; 221 else 222 total--; 223 222 224 if ( total < 0 ) 223 225 total = 0; 224 226