Skip to:
Content

BuddyPress.org

Ticket #8128: 8128.1.diff

File 8128.1.diff, 1.6 KB (added by dcavins, 5 years ago)

Moves bp_ajax_request to fadeIn complete in Nouveau.

  • src/bp-templates/bp-nouveau/js/buddypress-nouveau.js

    diff --git src/bp-templates/bp-nouveau/js/buddypress-nouveau.js src/bp-templates/bp-nouveau/js/buddypress-nouveau.js
    index d0334a5dc..576c609c2 100644
    window.bp = window.bp || {}; 
    318318                                                $( 'html,body' ).animate( { scrollTop: top.offset().top }, 'slow', function() {
    319319                                                        $( data.target ).fadeOut( 100, function() {
    320320                                                                self.inject( this, response.data.contents, data.method );
    321                                                                 $( this ).fadeIn( 100 );
    322 
    323                                                                 // Inform other scripts the list of objects has been refreshed.
    324                                                                 $( data.target ).trigger( 'bp_ajax_request', $.extend( data, { response: response.data } ) );
     321                                                                $( this ).fadeIn( 100, 'swing', function(){
     322                                                                        // Inform other scripts the list of objects has been refreshed.
     323                                                                        $( data.target ).trigger( 'bp_ajax_request', $.extend( data, { response: response.data } ) );
     324                                                                } );
    325325                                                        } );
    326326                                                } );
    327327
    328328                                        } else {
    329329                                                $( data.target ).fadeOut( 100, function() {
    330330                                                        self.inject( this, response.data.contents, data.method );
    331                                                         $( this ).fadeIn( 100 );
    332 
    333                                                         // Inform other scripts the list of objects has been refreshed.
    334                                                         $( data.target ).trigger( 'bp_ajax_request', $.extend( data, { response: response.data } ) );
     331                                                        $( this ).fadeIn( 100, 'swing', function(){
     332                                                                // Inform other scripts the list of objects has been refreshed.
     333                                                                $( data.target ).trigger( 'bp_ajax_request', $.extend( data, { response: response.data } ) );
     334                                                        } );
    335335                                                } );
    336336                                        }
    337337                                }