Skip to:
Content

BuddyPress.org

Changeset 6172


Ignore:
Timestamp:
07/09/2012 08:42:55 PM (14 years ago)
Author:
boonebgorges
Message:

Adds a generic 'activity-item' class to bp_activity_css_class()

Having no class that was shared by all and only activity items made it
difficult to write JavaScript (as for, example, the Favorite and Remove
Favorite buttons) that would select in an elegant way that was not dependent
on HTML element names.

Fixes #4332

Props imath

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-template.php

    r6131 r6172  
    20112011                ) );
    20122012
    2013                 $class = '';
     2013                $class = ' activity-item';
     2014
    20142015                if ( in_array( $activities_template->activity->type, (array) $mini_activity_actions ) || empty( $activities_template->activity->content ) )
    2015                         $class = ' mini';
     2016                        $class .= ' mini';
    20162017
    20172018                if ( bp_activity_get_comment_count() && bp_activity_can_comment() )
  • trunk/bp-themes/bp-default/_inc/global.js

    r6144 r6172  
    189189                if ( target.hasClass('fav') || target.hasClass('unfav') ) {
    190190                        var type = target.hasClass('fav') ? 'fav' : 'unfav';
    191                         var parent = target.closest('.activity_update');
     191                        var parent = target.closest('.activity-item');
    192192                        var parent_id = parent.attr('id').substr( 9, parent.attr('id').length );
    193193
Note: See TracChangeset for help on using the changeset viewer.