mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Remove thousands separators for comments count, see #8227
git-svn-id: http://svn.automattic.com/wordpress/trunk@9724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
54f3e3561d
commit
99ca4f0a8a
@ -12,7 +12,8 @@ setCommentsList = function() {
|
||||
|
||||
$('span.pending-count').each( function() {
|
||||
var a = $(this);
|
||||
var n = parseInt(a.html(),10);
|
||||
var n = a.html().replace(/[ ,.]+/g, '');
|
||||
n = parseInt(n,10);
|
||||
if ( isNaN(n) ) return;
|
||||
n = n + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 );
|
||||
if ( n < 0 ) { n = 0; }
|
||||
@ -24,7 +25,8 @@ setCommentsList = function() {
|
||||
var delAfter = function( r, settings ) {
|
||||
$('span.pending-count').each( function() {
|
||||
var a = $(this);
|
||||
var n = parseInt(a.html(),10);
|
||||
var n = a.html().replace(/[ ,.]+/g, '');
|
||||
n = parseInt(n,10);
|
||||
if ( isNaN(n) ) return;
|
||||
if ( $('#' + settings.element).is('.unapproved') ) { // we deleted a formerly unapproved comment
|
||||
n = n - 1;
|
||||
@ -38,7 +40,8 @@ setCommentsList = function() {
|
||||
|
||||
$('span.spam-count' ).each( function() {
|
||||
var a = $(this);
|
||||
var n = parseInt(a.html(),10);
|
||||
var n = a.html().replace(/[ ,.]+/g, '');
|
||||
n = parseInt(n,10);
|
||||
if ( isNaN(n) ) return;
|
||||
if ( $(settings.target).parents( 'span.spam' ).size() ) { // we marked a comment as spam
|
||||
n = n + 1;
|
||||
|
Loading…
Reference in New Issue
Block a user