+ el.before(h);
+
+ $('strong', '#undo-' + id).text(author);
+ a = $('.undo a', '#undo-' + id);
+ a.attr('href', 'comment.php?action=un' + action + 'comment&c=' + id + '&_wpnonce=' + settings.data._ajax_nonce);
+ a.attr('data-wp-lists', 'delete:the-comment-list:comment-' + id + '::un' + action + '=1');
+ a.attr('class', 'vim-z vim-destructive');
+ $('.avatar', el).clone().prependTo('#undo-' + id + ' .' + action + '-undo-inside');
+
+ a.click(function(){
+ list.wpList.del(this);
+ $('#undo-' + id).css( {backgroundColor:'#ceb'} ).fadeOut(350, function(){
+ $(this).remove();
+ $('#comment-' + id).css('backgroundColor', '').fadeIn(300, function(){ $(this).show(); });
+ });
+ return false;
+ });
+ }
+
+ return settings;
+ };
+
+ // Updates the current total (stored in the _total input)
+ updateTotalCount = function( total, time, setConfidentTime ) {
+ if ( time < lastConfidentTime )
+ return;
+
+ if ( setConfidentTime )
+ lastConfidentTime = time;
+
+ totalInput.val( total.toString() );
+ };
+
+ dashboardTotals = function(n) {
+ var total, appr, totalN, apprN,
+ dash = $('#dashboard_right_now');
+
+ n = n || 0;
+ if ( isNaN(n) || !dash.length )
+ return;
+
+ total = $('span.total-count', dash);
+ appr = $('span.approved-count', dash);
+ totalN = getCount(total);
+
+ totalN = totalN + n;
+ apprN = totalN - getCount( $('span.pending-count', dash) ) - getCount( $('span.spam-count', dash) );
+ updateCount(total, totalN);
+ updateCount(appr, apprN);
+ };
+
+ getCount = function(el) {
+ var n = parseInt( el.html().replace(/[^0-9]+/g, ''), 10 );
+ if ( isNaN(n) )
+ return 0;
+ return n;
+ };
+
+ updateCount = function(el, n) {
+ var n1 = '';
+ if ( isNaN(n) )
+ return;
+ n = n < 1 ? '0' : n.toString();
+ if ( n.length > 3 ) {
+ while ( n.length > 3 ) {
+ n1 = thousandsSeparator + n.substr(n.length - 3) + n1;
+ n = n.substr(0, n.length - 3);