Commit b344ea17 authored by Ivan Tyagov's avatar Ivan Tyagov

Use latest changes in RenderJs.

parent 41ff2e15
......@@ -119,7 +119,6 @@ for field_id in form.get_field_ids():\n
\n
# add field value\n
field_dict[\'value\'] = field_value\n
context.log(\'%s %s\' %(original_field.getId(), field_dict))\n
\n
return dumps(result)\n
</string> </value>
......
......@@ -57,12 +57,11 @@
<label tal:content="title" tal:condition="not:is_listbox"/>\n
<div class="input">\n
\n
<!-- <span tal:replace="structure python: getattr(here.gadgets.form, field_type).gadget(field_name=field_name)"/> -->\n
\n
<!-- XXX: render gadget asynchronously -->\n
<div tal:attributes="data-gadget string:gadgets/form/${field_type}/gadget?field_name=${field_name};\n
<!-- render gadget asynchronously -->\n
<div data-gadget-cacheable="1"\n
tal:attributes="data-gadget string:gadgets/form/${field_type}/gadget?field_name=${field_name};\n
id string:${form_id}_${field_name};\n
data-gadget:property string: {&quot;cacheable&quot;: &quot;1&quot;, &quot;cache_id&quot;: &quot;${form_id}_${field_name}&quot;}"></div>\n
data-gadget-cache-id string: ${form_id}_${field_name};"></div>\n
\n
</div>\n
</div>\n
......
......@@ -34,11 +34,13 @@
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode>\074tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"\n
<value> <unicode encoding="cdata"><![CDATA[
<tal:block xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal"\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n"\076\n
\074tal:block metal:define-macro="master"\076\n
\074tal:block\n
xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
<tal:block metal:define-macro="master">\n
<tal:block\n
tal:define="object_uid here/getUid | nothing;\n
object_path here/getPath | nothing;\n
form nocall: form | nothing;\n
......@@ -47,50 +49,40 @@
form_action python: form and form.action not in (\'\', None) and portal.portal_membership.checkPermission(\'Modify portal content\', here) and form.action or nothing;\n
local_parameter_list local_parameter_list | python: {};\n
dummy python: local_parameter_list.update({\'object_uid\': object_uid, \'object_path\': object_path, \'form_id\': form_id});\n
title python: \'%s - %s\' % (portal.Base_translateString(template.title_or_id()), here.getTitle());"\076\n
title python: \'%s - %s\' % (portal.Base_translateString(template.title_or_id()), here.getTitle());">\n
\n
\074tal:block metal:use-macro="here/main_template/macros/master"\076\n
\074tal:block metal:fill-slot="context_bar"\076\n
\074tal:block metal:use-macro="here/context_box_render/macros/master" /\076\n
\074/tal:block\076\n
\074tal:block metal:fill-slot="main"\076\n
<tal:block metal:use-macro="here/main_template/macros/master">\n
<tal:block metal:fill-slot="context_bar">\n
<tal:block metal:use-macro="here/context_box_render/macros/master" />\n
</tal:block>\n
<tal:block metal:fill-slot="main">\n
\n
\074!-- Experimental gadget form rendering --\076\n
\074!-- XXX: move to listbox gadget asap --\076\n
\074script src="jquery/ui/js/jquery-ui.js" type="text/javascript"\076\074/script\076\n
<!-- Experimental gadget form rendering -->\n
<!-- XXX: move to listbox gadget asap -->\n
<script src="jquery/ui/js/jquery-ui.js" type="text/javascript"></script>\n
\n
\074link rel="stylesheet" type="text/css" media="screen" href="jquery/plugin/jqgrid/ui.jqgrid.css" /\076\n
\074link rel="stylesheet" type="text/css" media="screen" href="jquery/ui/css/erp5-theme/jquery-ui.css" /\076\n
\074script type="text/javascript" src="jquery/plugin/jqgrid/grid.locale-en.js"\076\074/script\076\n
\074script type="text/javascript" src="jquery/plugin/jqgrid/jquery.jqGrid.src.js"\076\074/script\076\n
\074!--[if IE]\076\n
\074script type="text/javascript" src="jquery/plugin/jstorage/jquery.json-2.3.js"\076\074/script\076\n
\074!--\074![endif]--\076\n
\074script src="jquery/plugin/jstorage/jstorage.js" type="text/javascript"\076\074/script\076\n
\074script src="jquery/plugin/renderjs/renderjs.js"\076\074/script\076\n
\074script src="erp5_form.js"\076\074/script\076\n
<link rel="stylesheet" type="text/css" media="screen" href="jquery/plugin/jqgrid/ui.jqgrid.css" />\n
<link rel="stylesheet" type="text/css" media="screen" href="jquery/ui/css/erp5-theme/jquery-ui.css" />\n
<script type="text/javascript" src="jquery/plugin/jqgrid/grid.locale-en.js"></script>\n
<script type="text/javascript" src="jquery/plugin/jqgrid/jquery.jqGrid.src.js"></script>\n
<!--[if IE]>\n
<script type="text/javascript" src="jquery/plugin/jstorage/jquery.json-2.3.js"></script>\n
<!--<![endif]-->\n
<script src="jquery/plugin/jstorage/jstorage.js" type="text/javascript"></script>\n
<script src="jquery/plugin/renderjs/renderjs.js"></script>\n
<script src="erp5_form.js"></script>\n
\n
\074div id="content"\n
<div id="content"\n
data-gadget="gadgets/content/gadget"\n
tal:attributes="data-gadget string:gadgets/tabular_gadget/gadget?object_path=${object_path}\046current_form_id=${form_id}"\076\074/div\076\n
tal:attributes="data-gadget string:gadgets/tabular_gadget/gadget?object_path=${object_path}&current_form_id=${form_id}"></div>\n
\n
\074script type="text/javascript" language="javascript"\076\n
//\074![CDATA[\n
// init all when all gadgets are ready (loaded)\n
$(document).ready(function() {\n
RenderJs.bootstrap($("#content"));\n
RenderJs.GadgetIndex.getRootGadget().getDom().one("ready", function (){\n
RenderJs.update($("#content"));\n
});\n
});\n
//]]\076\n
\074/script\076\n
\n
\074/tal:block\076\n
\074/tal:block\076\n
\074/tal:block\076\n
\074/tal:block\076\n
\074/tal:block\076</unicode> </value>
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>\n
</tal:block>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
......@@ -108,6 +100,10 @@
<key> <string>output_encoding</string> </key>
<value> <string>iso-8859-15</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
......
9
\ No newline at end of file
10
\ 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