Skip to:
Content

BuddyPress.org

Changeset 11108


Ignore:
Timestamp:
09/16/2016 11:12:13 PM (8 years ago)
Author:
r-a-y
Message:

bp-legacy: Fix AJAX search after directory form template refactoring.

Previously, our JS looked for a nested <label><input></label> element.
Since we moved the <input> out of the <label> element, our AJAX search
failed.

This commit changes the JS to look for the specific <input> field in
directory searches.

See #6844.

File:
1 edited

Legend:

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

    r10654 r11108  
    848848
    849849        var target = jq(event.target),
    850             css_id, object, template;
     850            css_id, object, template, search_terms;
    851851
    852852        if ( target.attr('type') === 'submit' ) {
     
    854854            object = css_id[0];
    855855            template = null;
     856            search_terms = target.parent().find( '#' + object + '_search' ).val();
    856857
    857858            // The Group Members page specifies its own template
     
    861862            }
    862863
    863             bp_filter_request( object, jq.cookie('bp-' + object + '-filter'), jq.cookie('bp-' + object + '-scope') , 'div.' + object, target.parent().children('label').children('input').val(), 1, jq.cookie('bp-' + object + '-extras'), null, template );
     864            bp_filter_request( object, jq.cookie('bp-' + object + '-filter'), jq.cookie('bp-' + object + '-scope') , 'div.' + object, search_terms, 1, jq.cookie('bp-' + object + '-extras'), null, template );
    864865
    865866            return false;
Note: See TracChangeset for help on using the changeset viewer.