mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-23 00:31:28 +01:00
Update awaiting moderation count when comments are moderated through AJAX. Props mdawaffe. fixes #5315
git-svn-id: http://svn.automattic.com/wordpress/trunk@6312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
ad563a953f
commit
6f761b1ef3
@ -3,13 +3,15 @@ jQuery(function($) {
|
||||
|
||||
var dimAfter = function( r, settings ) {
|
||||
var a = $('#awaitmod');
|
||||
a.html( parseInt(a.html(),10) + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 ) );
|
||||
var n = parseInt(a.html(),10) + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 );
|
||||
a.html( n.toString() );
|
||||
}
|
||||
|
||||
var delAfter = function( r, settings ) {
|
||||
var a = $('#awaitmod');
|
||||
if ( $('#' + settings.element).is('.unapproved') && parseInt(a.html(),10) > 0 ) {
|
||||
a.html( parseInt(a.html(),10) - 1 );
|
||||
if ( a.parent('.current').size() || $('#' + settings.element).is('.unapproved') && parseInt(a.html(),10) > 0 ) {
|
||||
var n = parseInt(a.html(),10) - 1;
|
||||
a.html( n.toString() );
|
||||
}
|
||||
|
||||
if ( extra.size() == 0 || extra.children().size() == 0 ) {
|
||||
|
@ -117,7 +117,7 @@ class WP_Scripts {
|
||||
) );
|
||||
$this->add( 'admin-categories', '/wp-admin/js/categories.js', array('wp-lists'), '20071031' );
|
||||
$this->add( 'admin-custom-fields', '/wp-admin/js/custom-fields.js', array('wp-lists'), '20070823' );
|
||||
$this->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists'), '20070822' );
|
||||
$this->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists'), '20071104' );
|
||||
$this->add( 'admin-posts', '/wp-admin/js/edit-posts.js', array('wp-lists'), '20071023' );
|
||||
$this->add( 'admin-users', '/wp-admin/js/users.js', array('wp-lists'), '20070823' );
|
||||
$this->add( 'xfn', '/wp-admin/js/xfn.js', false, '3517' );
|
||||
|
Loading…
Reference in New Issue
Block a user