WordPress.org

Make WordPress Core

Changeset 6312


Ignore:
Timestamp:
11/04/2007 06:23:03 AM (14 years ago)
Author:
ryan
Message:

Update awaiting moderation count when comments are moderated through AJAX. Props mdawaffe. fixes #5315

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/edit-comments.js

    r6213 r6312  
    44var dimAfter = function( r, settings ) {
    55    var a = $('#awaitmod');
    6     a.html( parseInt(a.html(),10) + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 ) );
     6    var n = parseInt(a.html(),10) + ( $('#' + settings.element).is('.' + settings.dimClass) ? 1 : -1 );
     7    a.html( n.toString() );
    78}
    89
    910var delAfter = function( r, settings ) {
    1011    var a = $('#awaitmod');
    11     if ( $('#' + settings.element).is('.unapproved') && parseInt(a.html(),10) > 0 ) {
    12         a.html( parseInt(a.html(),10) - 1 );
     12    if ( a.parent('.current').size() || $('#' + settings.element).is('.unapproved') && parseInt(a.html(),10) > 0 ) {
     13        var n = parseInt(a.html(),10) - 1;
     14        a.html( n.toString() );
    1315    }
    1416
  • trunk/wp-includes/script-loader.php

    r6303 r6312  
    118118            $this->add( 'admin-categories', '/wp-admin/js/categories.js', array('wp-lists'), '20071031' );
    119119            $this->add( 'admin-custom-fields', '/wp-admin/js/custom-fields.js', array('wp-lists'), '20070823' );
    120             $this->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists'), '20070822' );
     120            $this->add( 'admin-comments', '/wp-admin/js/edit-comments.js', array('wp-lists'), '20071104' );
    121121            $this->add( 'admin-posts', '/wp-admin/js/edit-posts.js', array('wp-lists'), '20071023' );
    122122            $this->add( 'admin-users', '/wp-admin/js/users.js', array('wp-lists'), '20070823' );
Note: See TracChangeset for help on using the changeset viewer.