call postAjaxLoad in addInlineCreationForm javascript function in order to call buildWysiwygEditors when a section of the page is reloaded
authorStephanie Marcu <stephanie.marcu@logilab.fr>
Mon, 02 Mar 2009 11:08:33 +0100
changeset 992 d5fe2626695b
parent 991 746fed01d1e0
child 993 c1ce4c3a7c8f
call postAjaxLoad in addInlineCreationForm javascript function in order to call buildWysiwygEditors when a section of the page is reloaded
web/data/cubicweb.edition.js
--- a/web/data/cubicweb.edition.js	Mon Mar 02 10:17:27 2009 +0100
+++ b/web/data/cubicweb.edition.js	Mon Mar 02 11:08:33 2009 +0100
@@ -264,7 +264,8 @@
     var d = async_rawremote_exec('inline_creation_form', peid, ptype, ttype, rtype, role);
     d.addCallback(function (response) {
 	var linknode = getNode('add' + rtype + ':' + peid + 'link');
-	var form = jQuery(getDomFromResponse(response));
+        var dom = getDomFromResponse(response);
+	var form = jQuery(dom);
 	form.css('display', 'none');
 	form.insertBefore(linknode.parentNode).slideDown('fast');
 	// setStyle(form, {display: 'none'});
@@ -273,6 +274,7 @@
 	// slideDown(form, {'duration':0.6});
 	reorderTabindex();
 	form.trigger('inlinedform-added');
+        postAjaxLoad(dom);
 	// MochiKit.Signal.signal(CubicWeb, 'inlinedform-added', form);
     });
     d.addErrback(function (xxx) {