Fix Right Now comments counts for trash, spam or undo.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6aeb3bd273
commit
dafb319ebe
|
@ -110,7 +110,7 @@ setCommentsList = function() {
|
||||||
|
|
||||||
if ( totalN ) {
|
if ( totalN ) {
|
||||||
totalN = totalN + n;
|
totalN = totalN + n;
|
||||||
apprN = totalN - getCount( $('span.pending-count', dash) );
|
apprN = totalN - getCount( $('span.pending-count', dash) ) - getCount( $('span.spam-count', dash) );
|
||||||
updateCount(total, totalN);
|
updateCount(total, totalN);
|
||||||
updateCount(appr, apprN);
|
updateCount(appr, apprN);
|
||||||
}
|
}
|
||||||
|
@ -183,11 +183,8 @@ setCommentsList = function() {
|
||||||
});
|
});
|
||||||
|
|
||||||
if ( $('#dashboard_right_now').length ) {
|
if ( $('#dashboard_right_now').length ) {
|
||||||
N = spam || trash || 0;
|
N = trash ? -1 * trash : 0;
|
||||||
if ( N > 0 )
|
dashboardTotals(N);
|
||||||
dashboardTotals(-1);
|
|
||||||
else if ( N < 0 )
|
|
||||||
dashboardTotals(1);
|
|
||||||
} else {
|
} else {
|
||||||
total = totalInput.val() ? parseInt( totalInput.val(), 10 ) : 0;
|
total = totalInput.val() ? parseInt( totalInput.val(), 10 ) : 0;
|
||||||
total = total - spam - trash;
|
total = total - spam - trash;
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -263,7 +263,7 @@ function wp_default_scripts( &$scripts ) {
|
||||||
$scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array('jquery'), '20090514' );
|
$scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array('jquery'), '20090514' );
|
||||||
$scripts->add_data( 'user-profile', 'group', 1 );
|
$scripts->add_data( 'user-profile', 'group', 1 );
|
||||||
|
|
||||||
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20091128' );
|
$scripts->add( 'admin-comments', "/wp-admin/js/edit-comments$suffix.js", array('wp-lists', 'jquery-ui-resizable', 'quicktags'), '20091129' );
|
||||||
$scripts->add_data( 'admin-comments', 'group', 1 );
|
$scripts->add_data( 'admin-comments', 'group', 1 );
|
||||||
$scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
|
$scripts->localize( 'admin-comments', 'adminCommentsL10n', array(
|
||||||
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
|
'hotkeys_highlight_first' => isset($_GET['hotkeys_highlight_first']),
|
||||||
|
|
Loading…
Reference in New Issue