cubicweb #736185 Ajax and add_onload feature [resolved]

add_onload is a great and simple functionality, now nicely integrated with load_xhtml (also working with force-html-content-type option set to true) ; however it generates a jQuery(CubicWeb).bind('ajax-loaded', my_javascript_function), so the my_javascript_function is binded again each time the same view is ajax reloaded, and even worse executed each time any view is loaded via ajax (because the 'ajax-loaded' event is triggered then).

jQuery now provides (from 1.3 revisions I think) a new function,'ajax-loaded', my_javascript_function), that is in my opinion much more suited for this situation, where we want my_javascript_function to be executed only once (any example where you do not want this behaviour?).

The patch is fairly obvious if you agree with above statements (see cubicweb/ for the add_onload method implementation).

done in3.7.0
load left0.000
closed by<not specified>