[buddypress-trac] [BuddyPress Trac] #5826: Revisions to add/remove friendship buttons JS has omitted user account screens

buddypress-trac noreply at wordpress.org
Wed Aug 20 14:43:57 UTC 2014


#5826: Revisions to add/remove friendship buttons JS has omitted user account
screens
--------------------------+-----------------------------
 Reporter:  hnla          |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Core          |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 Currently in buddypress user account screens header action buttons for
 friends are not Ajaxed!

 Tracking back:

 In earlier versions (1.7.1 L902) BP JS ran:
 `jq(".friendship-button a").on('click', function() {`

 In 1.7.2 we've changed to:
 `       jq('#members-dir-list').on('click', '.friendship-button a',
 function() {`

 changed in: Changeset 6972

 Now we have become rather specific to the members dir only!

 In the latest revision L1203 we have:

 ` jq( '#members-dir-list, #members-group-list' ).on('click', '.friendship-
 button a', function() {`

 Members group buttons have been added in.

 I was checking some Ajax issues and having resolved was puzzled why the
 bp_user screens buttons were still not working.

 Seems like we have one more token to add in :) :
 ` jq( '#members-dir-list, #members-group-list, #item-header' ).on('click',
 '.friendship-button a', function() {`

 This kicked things back into life.

 Not sure though why the change to querying for those selectors when we
 didn't before, does that not just impose a degree of overhead to this
 function?

 I am wondering though whether I'm missing something that this hasn't been
 raised before by anyone?

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5826>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac


More information about the buddypress-trac mailing list