Skip to content

Commit

Permalink
Nouveau: Fix the "Order By" AJAX dropdown filter.
Browse files Browse the repository at this point in the history
Nouveau looks for certain HTML data attributes to fire the AJAX request.
This commit adds these attributes.

See #97.
  • Loading branch information
r-a-y committed May 3, 2018
1 parent 643105e commit 26abbcb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _inc/templates/buddypress/members/single/follow.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?php do_action( 'bp_before_member_' . bp_current_action() . '_content' ); ?>

<?php // this is important! do not remove the classes in this DIV as AJAX relies on it! ?>
<div id="members-dir-list" class="dir-list members follow <?php echo bp_current_action(); ?>">
<div id="members-dir-list" class="dir-list members follow <?php echo bp_current_action(); ?>" data-bp-list="members">
<?php bp_get_template_part( 'members/members-loop' ) ?>
</div>

Expand Down
2 changes: 1 addition & 1 deletion _inc/users/screens.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function bp_follow_add_members_dropdown_filter() {

<?php // the ID for this is important as AJAX relies on it! ?>
<label for="members-<?php echo bp_current_action(); ?>-orderby"><?php _e( 'Order By:', 'buddypress-followers' ); ?></label>
<select id="members-<?php echo bp_current_action(); ?>-orderby">
<select id="members-<?php echo bp_current_action(); ?>-orderby" data-bp-filter="members">
<?php if ( class_exists( 'BP_User_Query' ) ) : ?>
<option value="newest-follows"><?php _e( 'Newest Follows', 'buddypress-followers' ); ?></option>
<option value="oldest-follows"><?php _e( 'Oldest Follows', 'buddypress-followers' ); ?></option>
Expand Down

0 comments on commit 26abbcb

Please sign in to comment.