Skip to:
Content

BuddyPress.org

Changeset 9305


Ignore:
Timestamp:
01/06/2015 09:15:49 PM (12 years ago)
Author:
r-a-y
Message:

bp-legacy: Add better detection for the group member search field.

Previously, if the activity component is disabled and a user is on a group
homepage, the AJAX search and select dropdown would not function properly.

This commit fixes this by setting the appropriate object and scope
parameters when the group member search field is detected.

Props vimes1984 for an initial patch.

Fixes #6033.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/js/buddypress.js

    r9291 r9305  
    821821
    822822                        // The Group Members page specifies its own template
    823                         if ( 'members' === object && 'groups' === css_id[1] ) {
     823                        if ( event.currentTarget.className === 'groups-members-search' ) {
    824824                                object = 'group_members';
    825825                                template = 'groups/single/members';
    … …  
    890890                if ( $gm_search.length ) {
    891891                        search_terms = $gm_search.val();
     892                        object = 'members';
     893                        scope = 'groups';
    892894                }
    893895
    … …  
    953955                        if ( $gm_search.length ) {
    954956                                search_terms = $gm_search.val();
     957                                object = 'members';
    955958                        }
    956959
Note: See TracChangeset for help on using the changeset viewer.