[buddypress-trac] [BuddyPress] #1616: Defining Custom javascript events for Ajax based loading of activity etc

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Thu Jan 21 11:47:51 UTC 2010


#1616: Defining Custom javascript events for Ajax based loading of activity etc
--------------------------+-------------------------------------------------
  Reporter:  sbrajesh     |       Owner:        
      Type:  enhancement  |      Status:  closed
  Priority:  major        |   Milestone:  1.2   
Resolution:  worksforme   |    Keywords:        
--------------------------+-------------------------------------------------

Old description:

> As of bp 1.2, activity stream is loaded using ajax so are some other
> components. So what If I want to call one of my javascript method after
> the activity is loaded. How do I get the idea when the activity is
> loaded(Just an example).
> Would not it be better to define custom events and fire them when some
> content is loaded(say activity_loaded) ,other developers can hook their
> custom code to these events. YUI provides an easy way to define custom
> events but there can be other implementations too.
>
> What are other developers are thinking about it? How do you know from you
> javascript code when activity is loaded or not.
>
> I will request to please add custom events on the completion of the
> actions, like after calling "bp_activity_request","bp_filter_request".
> That would help the third party plugin developers tremendously.
>
> Thought please.

New description:

 {{{

 }}}
 As of bp 1.2, activity stream is loaded using ajax so are some other
 components. So what If I want to call one of my javascript method after
 the activity is loaded. How do I get the idea when the activity is
 loaded(Just an example).
 Would not it be better to define custom events and fire them when some
 content is loaded(say activity_loaded) ,other developers can hook their
 custom code to these events. YUI provides an easy way to define custom
 events but there can be other implementations too.

 What are other developers are thinking about it? How do you know from you
 javascript code when activity is loaded or not.

 I will request to please add custom events on the completion of the
 actions, like after calling "bp_activity_request","bp_filter_request".
 That would help the third party plugin developers tremendously.

 Thought please.

--

Comment(by apeatling):

 Actually "ajaxStop" may be the event you are looking for.

-- 
Ticket URL: <http://trac.buddypress.org/ticket/1616#comment:6>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list