[buddypress-trac] [BuddyPress] #4332: Trouble with ajax favoriting activities if different than activity_updates
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Fri Jul 6 15:15:04 UTC 2012
#4332: Trouble with ajax favoriting activities if different than activity_updates
--------------------------+-----------------------------
Reporter: imath | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Theme | Version: 1.6-beta
Severity: normal | Keywords:
--------------------------+-----------------------------
Hi,
I've noticed that bp-themes/bp-default/_inc/global.js has changed his way
to 'ajax favorite' the activities. Before 1.6beta, we had at line 173
''target.parent().parent().parent();'' now we have at line 191 :
'''target.closest('.activity_update')''';
The trouble with this change is that if the activity type is not an
activity update, then we dont have the class '.activity_update' and then
when clicking, it triggers a javascript error and the activity is
favorited but not in an ajax way.
Example : '.new_forum_topic' is not '.activity_update' so it leads to an
error when using target.closest('.activity_update').
So i tried these 2 options to make the ajax favoriting working :
1/ Modifying /bp-activity/bp-activity-template.php and global.js (attached
files bp-activity-template.diff and global.diff)
2/ Simply modifying global.js to come back to
''target.parent().parent().parent();''
(attached file global-option2.diff)
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/4332>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list