Skip to:
Content

BuddyPress.org

Changeset 13115


Ignore:
Timestamp:
09/29/2021 07:53:28 PM (3 years ago)
Author:
imath
Message:

Improve BP Nouveau Group Invites UI feedback message content & style

  • Create a more accurate message when no friends matched a search although the users do have friends.
  • Use the Ajax response specific type if set to display the right feedback style.

Props comminski

Fixes #8577

Location:
trunk/src/bp-templates/bp-nouveau
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/includes/groups/ajax.php

    r12715 r13115  
    334334                    'type'     => 'info',
    335335                );
     336            } else {
     337                $error = array(
     338                    'feedback' => __( 'No friends were found. Try another filter.', 'buddypress' ),
     339                    'type'     => 'info',
     340                );
    336341            }
    337342        }
  • trunk/src/bp-templates/bp-nouveau/js/buddypress-group-invites.js

    r12856 r13115  
    127127            } );
    128128
    129             // Use it in the filters viex
     129            // Use it in the filters view.
    130130            filters_view = new bp.Views.inviteFilters( { model: this.filters, users: collection } );
    131131
     
    537537
    538538        usersFilterError: function( collection, response ) {
    539             bp.Nouveau.GroupInvites.displayFeedback( response.feedback, 'error' );
     539            var type = 'error';
     540
     541            if ( response.type ) {
     542                type = response.type;
     543            }
     544
     545            bp.Nouveau.GroupInvites.displayFeedback( response.feedback, type );
    540546        },
    541547
Note: See TracChangeset for help on using the changeset viewer.