Skip to:
Content

BuddyPress.org

Changeset 13341


Ignore:
Timestamp:
10/19/2022 03:45:34 AM (2 years ago)
Author:
imath
Message:

Make sure the Members directory filter persists all session's long

The right behavior for the members directory loop is to sort members according to current Session's selected filter option using the Session storage.

Fixes #8627

File:
1 edited

Legend:

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

    r13189 r13341  
    368368
    369369                if (  $( '#buddypress [data-bp-filter="' + object + '"]' ).length ) {
    370                     if ( '-1' !== $( '#buddypress [data-bp-filter="' + object + '"]' ).val() && '0' !== $( '#buddypress [data-bp-filter="' + object + '"]' ).val() ) {
     370                    if ( undefined !== objectData.filter ) {
     371                        filter = objectData.filter;
     372                        $( '#buddypress [data-bp-filter="' + object + '"] option[value="' + filter + '"]' ).prop( 'selected', true );
     373                    } else if ( '-1' !== $( '#buddypress [data-bp-filter="' + object + '"]' ).val() && '0' !== $( '#buddypress [data-bp-filter="' + object + '"]' ).val() ) {
    371374                        filter = $( '#buddypress [data-bp-filter="' + object + '"]' ).val();
    372                     } else if ( undefined !== objectData.filter ) {
    373                         filter = objectData.filter,
    374                         $( '#buddypress [data-bp-filter="' + object + '"] option[value="' + filter + '"]' ).prop( 'selected', true );
    375375                    }
    376376                }
Note: See TracChangeset for help on using the changeset viewer.