Skip to:
Content

BuddyPress.org

Changeset 11198


Ignore:
Timestamp:
10/19/2016 05:26:38 PM (8 years ago)
Author:
boonebgorges
Message:

Don't use AJAX to refresh directories when filtered by type.

This is a workaround for a bug that caused the 'type' filter not to be
properly cleared when clicking the All Members or All Groups tab while
viewing a directory.

Props r-a-y, hnla.
Fixes #7291.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-template.php

    r11145 r11198  
    33123312            if ( bp_is_user_activity() ) {
    33133313                $bp_classes[] = 'my-activity';
     3314            }
     3315        } else {
     3316            if ( bp_get_current_member_type() ) {
     3317                $bp_classes[] = 'type';
    33143318            }
    33153319        }
  • trunk/src/bp-templates/bp-legacy/js/buddypress.js

    r11109 r11198  
    877877    /* When a navigation tab is clicked - e.g. | All Groups | My Groups | */
    878878    jq('div.item-list-tabs').on( 'click', function(event) {
     879        // If on a directory page with a type filter, add no-ajax class.
     880        if ( jq( 'body' ).hasClass( 'type' ) && jq( 'body' ).hasClass( 'directory' ) ) {
     881            jq(this).addClass( 'no-ajax' );
     882        }
     883
    879884        if ( jq(this).hasClass('no-ajax')  || jq( event.target ).hasClass('no-ajax') )  {
    880885            return;
Note: See TracChangeset for help on using the changeset viewer.