Commit a9b37a16 authored by Ivan Tyagov's avatar Ivan Tyagov

Add "ID" for any form's gadget (required now).

Catch "ready" event and call form update.
parent 6ae08ec0
......@@ -61,6 +61,7 @@
\n
<!-- XXX: render gadget asynchronously -->\n
<div tal:attributes="gadget string:gadgets/form/${field_type}/gadget?field_name=${field_name};\n
id string:${form_id}_${field_name};\n
gadget:property string: {&quot;cacheable&quot;: &quot;1&quot;, &quot;cache_id&quot;: &quot;${form_id}_${field_name}&quot;}"></div>\n
\n
</div>\n
......
......@@ -75,12 +75,12 @@
\n
\074script type="text/javascript" language="javascript"\076\n
//\074![CDATA[\n
// init all when DOM is ready\n
// init all when all gadgets are ready (loaded)\n
$(document).ready(function() {\n
// XXX: start DOM is hard coded to "content" this is not so good for a generic library\n
RenderJs.bootstrap($("#content"));\n
// XXX: we use timeouts as we do not know if gadget structure is yet ready, how to do that in a generic way?\n
window.setTimeout(\' RenderJs.update($("#content"));\', DEFAULT_GADGET_DOM_READY_TIMEOUT);\n
GadgetIndex.getRootGadget().getDom().one("ready", function (){\n
RenderJs.update($("#content"));\n
});\n
});\n
//]]\076\n
\074/script\076\n
......
2
\ No newline at end of file
3
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment