Commit 4bcdb943 authored by Sven Franck's avatar Sven Franck Committed by Romain Courteaud

erp5_web_renderjs_ui: allow to define panel gadget on ERP5 side

parent 8239d658
......@@ -117,10 +117,10 @@
\n
<script data-renderjs-configuration="application_title" type="text/x-renderjs-configuration">${application_title}</script>\n
<script data-renderjs-configuration="frontpage_gadget" type="text/x-renderjs-configuration">${frontpage_gadget}</script>\n
<script data-renderjs-configuration="panel_gadget" type="text/x-renderjs-configuration">${panel_gadget}</script>\n
<script data-renderjs-configuration="action_view" type="text/x-renderjs-configuration">${action_view}</script>\n
<script data-renderjs-configuration="default_view_reference" type="text/x-renderjs-configuration">${default_view_reference}</script>\n
<script data-renderjs-configuration="hateoas_url" type="text/x-renderjs-configuration">${hateoas_url}</script>\n
\n
\n
<script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n
......@@ -132,6 +132,7 @@
\n
</head>\n
<body>\n
\n
<div data-gadget-url="gadget_jio.html"\n
data-gadget-scope="jio_gadget"\n
data-gadget-sandbox="public"></div>\n
......@@ -140,7 +141,7 @@
data-gadget-scope="header"\n
data-gadget-sandbox="public"></div>\n
\n
<div data-gadget-url="gadget_erp5_panel.html"\n
<div data-gadget-url="${panel_gadget}"\n
data-gadget-scope="panel"\n
data-gadget-sandbox="public"></div>\n
\n
......@@ -274,7 +275,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>romain</string> </value>
<value> <string>sven</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -288,7 +289,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>941.31252.46674.14728</string> </value>
<value> <string>942.12881.1847.42734</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -306,7 +307,7 @@
</tuple>
<state>
<tuple>
<float>1425659919.68</float>
<float>1428487030.04</float>
<string>GMT</string>
</tuple>
</state>
......
......@@ -241,6 +241,7 @@
key,\n
value,\n
i;\n
\n
for (i = 0; i < len; i += 1) {\n
key = element_list[i].getAttribute(\'data-renderjs-configuration\');\n
value = element_list[i].textContent;\n
......@@ -489,7 +490,7 @@
return gadget.dropGadget("panel");\n
})\n
.push(function () {\n
return gadget.declareGadget("gadget_erp5_panel.html",\n
return gadget.declareGadget(g.props.panel_gadget,\n
{scope: "panel",\n
element: div});\n
})\n
......@@ -731,7 +732,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>romain</string> </value>
<value> <string>sven</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -745,7 +746,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>941.39539.39866.22681</string> </value>
<value> <string>942.12884.35349.45585</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -763,7 +764,7 @@
</tuple>
<state>
<tuple>
<float>1426155464.07</float>
<float>1428487042.05</float>
<string>GMT</string>
</tuple>
</state>
......
......@@ -63,7 +63,8 @@ return default_web_page.WebPage_viewAsWeb(mapping_dict={\n
"application_title": web_section.getLayoutProperty("configuration_application_title", default="ERP5"),\n
"action_view": web_section.getLayoutProperty("configuration_view_action_category", default="object_view"),\n
"default_view_reference": web_section.getLayoutProperty("configuration_default_view_action_reference", default="view"),\n
"hateoas_url": web_section.getLayoutProperty("configuration_hateoas_url", default="hateoas/")\n
"hateoas_url": web_section.getLayoutProperty("configuration_hateoas_url", default="hateoas/"),\n
"panel_gadget": web_section.getLayoutProperty("configuration_panel_gadget_url", default="gadget_erp5_panel.html")\n
})\n
</string> </value>
</item>
......
......@@ -75,6 +75,7 @@
<string>my_configuration_default_view_action_reference</string>
<string>my_configuration_view_action_category</string>
<string>my_configuration_frontpage_gadget_url</string>
<string>my_configuration_panel_gadget_url</string>
<string>my_configuration_application_title</string>
<string>my_configuration_hateoas_url</string>
</list>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>my_configuration_panel_gadget_url</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_reference</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Panel Gadget</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
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