Skip to:
Content

BuddyPress.org

Changeset 6838


Ignore:
Timestamp:
03/04/2013 02:01:28 PM (8 years ago)
Author:
boonebgorges
Message:

For activity comment Cancel link, use stream delegation

Delegation is necessary in this case, so that the Cancel button works for items
that are added to the DOM via AJAX, as when clicking different activity
filters.

Fixes #4862

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-templates/bp-legacy/js/buddypress.js

    r6837 r6838  
    584584            return false;
    585585        }
     586
     587        // Canceling an activity comment   
     588        if ( target.hasClass( 'ac-reply-cancel' ) ) {
     589            jq(target).closest('.ac-form').slideUp( 200 );
     590            return false;
     591        };
    586592    });
    587593
     
    608614            }
    609615        }
    610     });
    611 
    612     /* Link for cancelling comment forms */
    613     jq('.ac-reply-cancel').on( 'click', function() {
    614         jq(this).closest('.ac-form').slideUp( 200 );
    615         return false;
    616616    });
    617617
Note: See TracChangeset for help on using the changeset viewer.