WordPress.org

Make WordPress Core

Changeset 7093


Ignore:
Timestamp:
02/28/2008 09:51:57 PM (12 years ago)
Author:
ryan
Message:

Fade approved comments from moderated list. Props filosofo. fixes #6032

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/js/wp-lists.js

    r7086 r7093  
    217217        var list = this; e = $(e); s = s || {};
    218218        var cls = wpList.parseClass(e,'dim');
     219        var hide = ( 'moderated' == $('input[name="comment_status"]').val() ) ? true : false;
    219220        s = wpList.pre.call( list, e, s, 'dim' );
    220221
     
    248249        var dimColor = isClass ? s.dimAddColor : s.dimDelColor;
    249250        if ( 'none' != dimColor ) {
     251            if ( hide ) {
     252                var anim = 'slideUp';
     253                if ( element.css( 'display' ).match(/table/) )
     254                    anim = 'fadeOut'; // Can't slideup table rows and other table elements.  Known jQuery bug
     255                element.animate( { backgroundColor: dimColor }, 'fast'  )[anim]( 'fast' )
     256            } else
     257                element.animate( { backgroundColor: dimColor }, 'fast' )
    250258            element
    251                 .animate( { backgroundColor: dimColor }, 'fast' )
    252259                .queue( function() { element.toggleClass(s.dimClass); $(this).dequeue(); } )
    253260                .animate( { backgroundColor: color }, { complete: function() { $(this).css( 'backgroundColor', '' ); } } );
Note: See TracChangeset for help on using the changeset viewer.