Commit b6574626 authored by Xiaowu Zhang's avatar Xiaowu Zhang

Reimplementation of Formulator ERP5 GadgetField

The new implementation of GadgetField allow to integrate renderjs's
gadget into ERP5 ui. Some examples are in bt erp5_ui_test to validate
implementation.
parent 65ae7d9f
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ActionInformation" module="Products.CMFCore.ActionInformation"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>action</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>categories</string> </key>
<value>
<tuple>
<string>action_type/object_view</string>
</tuple>
</value>
</item>
<item>
<key> <string>category</string> </key>
<value> <string>object_view</string> </value>
</item>
<item>
<key> <string>condition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>icon</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>view_gadget_field</string> </value>
</item>
<item>
<key> <string>permissions</string> </key>
<value>
<tuple>
<string>View</string>
</tuple>
</value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Action Information</string> </value>
</item>
<item>
<key> <string>priority</string> </key>
<value> <float>5.0</float> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Gadget Field</string> </value>
</item>
<item>
<key> <string>visible</string> </key>
<value> <int>1</int> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Expression" module="Products.CMFCore.Expression"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>text</string> </key>
<value> <string>string:${object_url}/Foo_viewGadgetField</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Zuite" module="Products.Zelenium.zuite"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>gadget_field_zuite</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Testing Gadget Fields</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>Test Gadget Field</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test Gadget Field</td></tr>\n
</thead><tbody>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/ListBoxZuite_reset</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Reset Successfully.</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/FooModule_createObjects?num:int=1</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Created Successfully.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_waitForActivities</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/0/Foo_viewGadgetField</td>\n
<td></td>\n
</tr>\n
\n
\n
\n
<!-- Initialize -->\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//input[@title=\'my_file\']</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>type</td>\n
<td>//input[@title=\'my_file\']</td>\n
<td>test</td>\n
</tr>\n
\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@title=\'Save\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyPortalStatusMessage</td>\n
<td>Data updated.</td>\n
<td></td>\n
</tr>\n
\n
\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/0/Foo_viewGadgetField/getData</td>\n
<td></td>\n
</tr>\n
\n
\n
<tr>\n
<td>verifyBodyText</td>\n
<td>test</td>\n
<td></td>\n
</tr>\n
\n
</tbody></table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testBlobSave</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -36,11 +36,101 @@
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<div>\n
<div id="activity_watcher_gadget"></div>\n
<script src="jquery/core/jquery.js"></script>\n
<script src="activity-watcher-gadget.js"></script>\n
</div>
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>Test Gadget Field</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test Gadget Field</td></tr>\n
</thead><tbody>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/ListBoxZuite_reset</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Reset Successfully.</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/FooModule_createObjects?num:int=1</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Created Successfully.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_waitForActivities</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/0/Foo_viewGadgetField</td>\n
<td></td>\n
</tr>\n
\n
\n
\n
<!-- Initialize -->\n
\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//input[@title=\'my_subject\']</td>\n
<td></td>\n
</tr>\n
\n
\n
\n
<tr>\n
<td>type</td>\n
<td>//input[@title=\'my_subject\']</td>\n
<td>couscous</td>\n
</tr>\n
\n
\n
<tr>\n
<td>click</td>\n
<td>//button[@title=\'Save\']</td>\n
<td></td>\n
</tr>\n
\n
\n
<tr>\n
<td>pause</td>\n
<td>2000</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyBodyText</td>\n
<td>"Error: URL is not a dataURL"</td>\n
<td></td>\n
</tr>\n
\n
\n
\n
\n
</tbody></table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
......@@ -54,7 +144,7 @@
</item>
<item>
<key> <string>id</string> </key>
<value> <string>ActivityWatcherGadget_view</string> </value>
<value> <string>testNotDataURLException</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>Test Gadget Field</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test Gadget Field</td></tr>\n
</thead><tbody>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/ListBoxZuite_reset</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Reset Successfully.</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/FooModule_createObjects?num:int=1</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Created Successfully.</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_waitForActivities</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/0/Foo_viewGadgetField</td>\n
<td></td>\n
</tr>\n
\n
\n
\n
<!-- Initialize -->\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//input[@title=\'my_language\']</td>\n
<td></td>\n
</tr>\n
\n
\n
\n
<tr>\n
<td>type</td>\n
<td>//input[@title=\'my_language\']</td>\n
<td>couscous</td>\n
</tr>\n
\n
\n
\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@title=\'Save\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyPortalStatusMessage</td>\n
<td>Data updated.</td>\n
<td></td>\n
</tr>\n
\n
\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//input[@title=\'my_language\']</td>\n
<td></td>\n
</tr>\n
\n
\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@title=\'my_language\']</td>\n
<td></td>\n
</tr>\n
\n
\n
\n
</tbody></table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testNotEditable</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>Test Gadget Field</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test Gadget Field</td></tr>\n
</thead><tbody>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/ListBoxZuite_reset</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Reset Successfully.</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/FooModule_createObjects?num:int=1</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Created Successfully.</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_waitForActivities</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/0/Foo_viewGadgetField</td>\n
<td></td>\n
</tr>\n
\n
\n
\n
<!-- Initialize -->\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//input[@title=\'my_description\']</td>\n
<td></td>\n
</tr>\n
\n
\n
\n
<tr>\n
<td>type</td>\n
<td>//input[@title=\'my_description\']</td>\n
<td>123</td>\n
</tr>\n
\n
\n
\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@title=\'Save\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyPortalStatusMessage</td>\n
<td>Data updated.</td>\n
<td></td>\n
</tr>\n
\n
\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//input[@title=\'my_description\']</td>\n
<td></td>\n
</tr>\n
\n
\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@title=\'my_description\']</td>\n
<td>123</td>\n
</tr>\n
\n
\n
\n
</tbody></table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSaveAndLoad</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ZopePageTemplate" module="Products.PageTemplates.ZopePageTemplate"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_text</string> </key>
<value> <unicode encoding="cdata"><![CDATA[
<html xmlns:tal="http://xml.zope.org/namespaces/tal"\n
xmlns:metal="http://xml.zope.org/namespaces/metal">\n
<head>\n
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">\n
<title>Test Gadget Field</title>\n
</head>\n
<body>\n
<table cellpadding="1" cellspacing="1" border="1">\n
<thead>\n
<tr><td rowspan="1" colspan="3">Test Gadget Field</td></tr>\n
</thead><tbody>\n
<tal:block metal:use-macro="here/Zuite_CommonTemplate/macros/init" />\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/ListBoxZuite_reset</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Reset Successfully.</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/FooModule_createObjects?num:int=1</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Created Successfully.</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/Zuite_waitForActivities</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>assertTextPresent</td>\n
<td>Done.</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>open</td>\n
<td>${base_url}/foo_module/0/Foo_viewGadgetField</td>\n
<td></td>\n
</tr>\n
\n
\n
\n
<!-- Initialize -->\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//input[@title=\'my_right\']</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//input[@title=\'my_format\']</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>type</td>\n
<td>//input[@title=\'my_right\']</td>\n
<td>couscous</td>\n
</tr>\n
\n
<tr>\n
<td>type</td>\n
<td>//input[@title=\'my_format\']</td>\n
<td>couscous</td>\n
</tr>\n
\n
\n
<tr>\n
<td>clickAndWait</td>\n
<td>//button[@title=\'Save\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyPortalStatusMessage</td>\n
<td>Data updated.</td>\n
<td></td>\n
</tr>\n
\n
\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//input[@title=\'my_right\']</td>\n
<td></td>\n
</tr>\n
\n
<tr>\n
<td>waitForElementPresent</td>\n
<td>//input[@title=\'my_format\']</td>\n
<td></td>\n
</tr>\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@title=\'my_right\']</td>\n
<td>couscous</td>\n
</tr>\n
\n
<tr>\n
<td>verifyValue</td>\n
<td>//input[@title=\'my_format\']</td>\n
<td></td>\n
</tr>\n
\n
</tbody></table>\n
</body>\n
</html>
]]></unicode> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>expand</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>testSaveAndNotEditableInIFrame</string> </value>
</item>
<item>
<key> <string>output_encoding</string> </key>
<value> <string>utf-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <unicode></unicode> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -51,12 +51,36 @@
</item>
<item>
<key> <string>init_script</string> </key>
<value> <string></string> </value>
<value>
<none/>
</value>
</item>
<item>
<key> <string>permission</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>type_class</string> </key>
<value> <string>File</string> </value>
</item>
<item>
<key> <string>type_interface</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>type_mixin</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ERP5 Form" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_edit</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>edit_order</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string>multipart/form-data</string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list>
<string>my_right</string>
<string>my_format</string>
</list>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list>
<string>my_id</string>
<string>my_title</string>
<string>my_description</string>
<string>my_language</string>
</list>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list>
<string>my_file</string>
<string>my_subject</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Foo_viewGadgetField</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Foo_viewGadgetField</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Foo_viewGadgetField</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>update_action_title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="GadgetField" module="Products.ERP5Form.GadgetField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_description</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>my_description</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: field.restrictedTraverse(\'gadget_stringfield.html\').absolute_url()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="GadgetField" module="Products.ERP5Form.GadgetField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_file</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>my_file</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: field.restrictedTraverse(\'gadget_create_manual_dataurl.html\').absolute_url()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="GadgetField" module="Products.ERP5Form.GadgetField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_format</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string>iframe</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>my_format</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: field.restrictedTraverse(\'gadget_stringfield.html\').absolute_url()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="GadgetField" module="Products.ERP5Form.GadgetField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_language</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>my_language</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: field.restrictedTraverse(\'gadget_stringfield.html\').absolute_url()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="GadgetField" module="Products.ERP5Form.GadgetField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_right</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string>iframe</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>my_right</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: field.restrictedTraverse(\'gadget_stringfield.html\').absolute_url()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="GadgetField" module="Products.ERP5Form.GadgetField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>my_subject</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>alternate_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>css_class</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>enabled</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>extra</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>my_subject</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: field.restrictedTraverse(\'gadget_create_manual_generalurl.html\').absolute_url()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts16492962.91</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>gadget_create_manual_dataurl.html</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html>\n
<head>\n
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />\n
<meta name="viewport" content="width=device-width, user-scalable=no" />\n
<!-- renderjs -->\n
<script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n
<!-- custom script -->\n
<script src="gadget_create_manual_dataurl.js" type="text/javascript"></script>\n
\n
</head>\n
<body>\n
<input type=\'text\'/>\n
</body>\n
</html>
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>498</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts16394141.44</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>gadget_create_manual_dataurl.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string>/*global window, rJS, btoa*/\n
/*jslint nomen: true, maxlen:80, indent:2*/\n
(function (rJS) {\n
"use strict";\n
\n
rJS(window)\n
.ready(function (g) {\n
g.props = {};\n
})\n
.ready(function (g) {\n
return g.getElement()\n
.push(function (element) {\n
g.props.element = element;\n
});\n
})\n
.declareMethod(\'render\', function (options) {\n
var gadget = this;\n
gadget.props.key = options.key || "";\n
gadget.props.element.querySelector(\'input\').value = options.value;\n
gadget.props.element.querySelector(\'input\').title = options.key;\n
})\n
\n
.declareMethod(\'getContent\', function () {\n
var input = this.props.element.querySelector(\'input\'),\n
form_gadget = this,\n
result = {};\n
if (input.value) {\n
result[form_gadget.props.key] = {\'url\': "data:text/plain;base64,"\n
+ btoa(input.value),\n
\'type\': \'text/plain\',\n
\'file_name\': \'test.txt\'};\n
}\n
return result;\n
});\n
\n
}(rJS));</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1093</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts16492973.44</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>gadget_create_manual_generalurl.html</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html>\n
<head>\n
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />\n
<meta name="viewport" content="width=device-width, user-scalable=no" />\n
\n
\n
<!-- renderjs -->\n
<script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n
<!-- custom script -->\n
<script src="gadget_create_manual_generalurl.js" type="text/javascript"></script>\n
\n
</head>\n
<body>\n
<input type=\'text\'/>\n
</body>\n
</html>
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>505</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts16394133.05</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>gadget_create_manual_generalurl.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string>/*global window, rJS, console, RSVP */\n
/*jslint nomen: true, maxlen:80, indent:2*/\n
(function (rJS) {\n
"use strict";\n
\n
rJS(window)\n
.ready(function (g) {\n
g.props = {};\n
})\n
.ready(function (g) {\n
return g.getElement()\n
.push(function (element) {\n
g.props.element = element;\n
});\n
})\n
.declareMethod(\'render\', function (options) {\n
var gadget = this;\n
gadget.props.key = options.key || "";\n
gadget.props.element.querySelector(\'input\').value = options.value || "";\n
gadget.props.element.querySelector(\'input\').title = options.key;\n
})\n
\n
.declareMethod(\'getContent\', function () {\n
var input = this.props.element.querySelector(\'input\'),\n
form_gadget = this,\n
result = {};\n
if (input.value) {\n
result[form_gadget.props.key] = {\'url\': input.value,\n
\'type\': \'text/html\',\n
\'file_name\': \'test.txt\'};\n
}\n
return result;\n
});\n
\n
}(rJS));</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1028</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts16492914.94</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>gadget_stringfield.html</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html>\n
<head>\n
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />\n
<meta name="viewport" content="width=device-width, user-scalable=no" />\n
<title>ERP5 Stringfield</title>\n
\n
<!-- renderjs -->\n
<script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n
<!-- custom script -->\n
<script src="gadget_stringfield.js" type="text/javascript"></script>\n
\n
</head>\n
<body>\n
<input type=\'text\'/>\n
</body>\n
</html>
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>525</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts16406199.62</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>gadget_stringfield.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string>/*global window, rJS*/\n
/*jslint nomen: true, maxlen:80, indent:2*/\n
(function (rJS) {\n
"use strict";\n
\n
rJS(window)\n
.ready(function (g) {\n
g.props = {};\n
})\n
.ready(function (g) {\n
return g.getElement()\n
.push(function (element) {\n
g.props.element = element;\n
});\n
})\n
.declareMethod(\'render\', function (options) {\n
this.props.key = options.key || "";\n
this.props.element.querySelector(\'input\').value = options.value || "";\n
this.props.element.querySelector(\'input\').title = options.key;\n
})\n
\n
.declareMethod(\'getContent\', function () {\n
var input = this.props.element.querySelector(\'input\'),\n
form_gadget = this,\n
result = {};\n
result[form_gadget.props.key] = input.value;\n
return result;\n
});\n
\n
}(rJS));</string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>806</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -57,31 +57,15 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_cache_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_cached</string> </key>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_connection</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_html</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_property</string> </key>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
......@@ -132,31 +116,17 @@
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_cache_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_cached</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_connection</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_html</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_id</string> </key>
<value> <string></string> </value>
<key> <string>gadget_url</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>gadget_property</string> </key>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
......@@ -230,10 +200,18 @@
<key> <string>gadget_property</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>gadget_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>js_sandbox</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Watcher</string> </value>
......@@ -244,4 +222,17 @@
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: field.restrictedTraverse(\'gadget_activity_watcher.html\').absolute_url()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="DTMLDocument" module="OFS.DTMLDocument"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__name__</string> </key>
<value> <string>activity-watcher-gadget.js</string> </value>
</item>
<item>
<key> <string>_vars</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>globals</string> </key>
<value>
<dictionary/>
</value>
</item>
<item>
<key> <string>raw</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*\n
This script generate a lot of html tags inside a div.\n
It would be better to use templates (like mustache)\n
*/\n
(function () {\n
var interval = 1000,\n
div = \'#activity_watcher_gadget\',\n
html_content = \'\',\n
basedir = location.pathname.split(\'/\').slice(0,-1).join(\'/\') + \'/\',\n
fillMessageList = function (data,messagetype,string) {\n
if (data[string] && data[string].line_list) {\n
for (i = 0; i < data[string].line_list.length; i++) {\n
var key_list = [\'message\',\'method_id\',\'node\',\'min_pri\',\'max_pri\'], j;\n
html_content +=\n
\'<tr>\' +\n
\'<td>\' + messagetype + \'</td>\';\n
for (j = 0; j < key_list.length; j++) {\n
html_content +=\n
\'<td>\' + data[string].line_list[i][key_list[j]] + \'</td>\';\n
}\n
html_content +=\n
\'</tr>\';\n
}\n
}\n
},\n
fillMessagePri = function (data,messagetype,string) {\n
if (data[string] && data[string].line_list) {\n
for (i = 0; i < data[string].line_list.length; i++) {\n
var key_list = [\'min\',\'avg\',\'max\'], j;\n
html_content +=\n
\'<tr>\' +\n
\'<td>\' + messagetype + \'</td>\' +\n
\'<td>\' + data[string].line_list[i].pri + \'</td>\';\n
for (j = 0; j < key_list.length; j++) {\n
html_content +=\n
\'<td>\' + data[string].line_list[i][key_list[j]] + \'</td>\';\n
}\n
html_content +=\n
\'</tr>\';\n
}\n
}\n
},\n
watcher = function () {\n
$.ajax({\n
url: basedir + \'ActivityTool_getSqlStatisticList\',\n
type: \'POST\',\n
timeout: 10000,\n
success: function (response) {\n
var i, data, today = new Date();\n
data = JSON.parse(response);\n
html_content =\n
\'Date : \' + today.toTimeString() +\n
\'<table>\' +\n
\' <tr>\' +\n
\' <th>Type</th>\'+\n
\' <th>Message</th>\'+\n
\' <th>Method Id</th>\'+\n
\' <th>Processing Node</th>\'+\n
\' <th>Min pri</th>\'+\n
\' <th>Max pri</th>\' +\n
\' </tr>\';\n
fillMessageList (data,\'dict\',\'SQLDict\');\n
fillMessageList (data,\'queue\',\'SQLQueue\');\n
html_content +=\n
\' </table>\' +\n
\'<table>\'+\n
\' <tr>\'+\n
\' <th>Type</th>\'+\n
\' <th>Pri</th>\'+\n
\' <th>Min</th>\'+\n
\' <th>Avg</th>\'+\n
\' <th>Max</th>\'+\n
\' </tr>\';\n
fillMessagePri (data,\'dict\',\'SQLDict2\');\n
fillMessagePri (data,\'queue\',\'SQLQueue2\');\n
html_content +=\n
\' </table>\';\n
$(div).html(html_content);\n
setTimeout(watcher,interval);\n
},\n
error: function (type) {\n
if (!html_content) {\n
$(div).html(\'ERROR \' + type.status + \': \' + type.statusText);\n
} else {\n
$(div).html(\'ERROR \' + type.status + \': \' + type.statusText +\n
\'<br />\' + html_content);\n
}\n
if (type.status < 400) {\n
setTimeout(watcher,interval);\n
}\n
}\n
});\n
};\n
watcher();\n
}());\n
]]></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts16502968.34</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>gadget_activity_watcher.html</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>text/html</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
<!DOCTYPE html>\n
<html>\n
<head>\n
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />\n
<meta name="viewport" content="width=device-width, user-scalable=no" />\n
<script src="handlebars.js" type="text/javascript"></script>\n
<script id="getData" type="text/x-handlebars-template">\n
Date : {{time}} \n
<table>\n
<tr>\n
<th>Type</th>\n
<th>Message</th>\n
<th>Method Id</th>\n
<th>Processing Node</th>\n
<th>Min pri</th>\n
<th>Max pri</th>\n
</tr>\n
{{#each messageList1}}\n
<tr> \n
<td>{{this.messagetype}} </td>\n
<td>{{this.message}}</td>\n
<td>{{this.method_id}}</td>\n
<td>{{this.node}}</td>\n
<td>{{this.min_pri}}</td>\n
<td>{{this.max_pri}}</td>\n
</tr> \n
{{/each}}\n
{{#each messageList2}}\n
<tr> \n
<td>{{this.messagetype}} </td>\n
<td>{{this.message}}</td>\n
<td>{{this.method_id}}</td>\n
<td>{{this.node}}</td>\n
<td>{{this.min_pri}}</td>\n
<td>{{this.max_pri}}</td>\n
</tr> \n
{{/each}}\n
</table>\n
<table>\n
<tr>\n
<th>Type</th>\n
<th>Pri</th>\n
<th>Min</th>\n
<th>Avg</th>\n
<th>Max</th>\n
</tr>\n
{{#each messagePri1}}\n
<tr> \n
<td>{{this.messagetype}} </td>\n
<td>{{this.pri}}</td>\n
<td>{{this.min}}</td>\n
<td>{{this.avg}}</td>\n
<td>{{this.max}}</td>\n
</tr> \n
{{/each}}\n
{{#each messagePri2}}\n
<tr> \n
<td>{{this.messagetype}} </td>\n
<td>{{this.pri}}</td>\n
<td>{{this.min}}</td>\n
<td>{{this.avg}}</td>\n
<td>{{this.max}}</td>\n
</tr> \n
{{/each}}\n
</table>\n
</script> \n
\n
\n
<script src="rsvp.js" type="text/javascript"></script>\n
<script src="renderjs.js" type="text/javascript"></script>\n
<script src="jio_sha256.amd.js" type="text/javascript"></script>\n
<script src="jio.js" type="text/javascript"></script>\n
<script src="gadget_activity_watcher.js" type="text/javascript"></script>\n
\n
</head>\n
\n
<body>\n
<div class="activity_watcher_gadget"></div>\n
</body>\n
</html>
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>2109</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts16394919.58</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>gadget_activity_watcher.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*global window, rJS, RSVP, Handlebars, jIO, location */\n
/*jslint nomen: true, maxlen:80, indent:2*/\n
(function (rJS, jIO, Handlebars, RSVP, window) {\n
"use strict";\n
var gk = rJS(window),\n
data_source = gk.__template_element.getElementById(\'getData\').innerHTML,\n
get_data_template = Handlebars.compile(data_source);\n
\n
function putMessageType(data, messagetype, string) {\n
var i;\n
if (data[string] && data[string].line_list) {\n
for (i = 0; i < data[string].line_list.length; i += 1) {\n
data[string].line_list[i].messagetype = messagetype;\n
}\n
return data[string].line_list;\n
}\n
return \'\';\n
}\n
\n
rJS(window)\n
.ready(function (g) {\n
g.props = {};\n
})\n
.ready(function (g) {\n
return g.getElement().push(function (element) {\n
g.props.element = element;\n
});\n
})\n
.declareService(function () {\n
var form_gadget = this,\n
html_content,\n
basedir = location.pathname.split(\'/\').slice(0, -1).join(\'/\') + \'/\',\n
queue = new RSVP.Queue();\n
function getDataExamine() {\n
queue\n
.push(function () {\n
return jIO.util.ajax(\n
{\n
"type": "POST",\n
"url": basedir + \'ActivityTool_getSqlStatisticList\',\n
"xhrFields": {\n
withCredentials: true\n
}\n
}\n
);\n
})\n
.push(function (evt) {\n
var data = JSON.parse(evt.target.response);\n
html_content = get_data_template(\n
{\n
time: new Date().toTimeString(),\n
messageList1: putMessageType(data, \'dict\', \'SQLDict\'),\n
messageList2: putMessageType(data, \'queue\', \'SQLQueue\'),\n
messagePri1 : putMessageType(data, \'dict\', \'SQLDict2\'),\n
messagePri2 : putMessageType(data, \'queue\', \'SQLQueue2\')\n
}\n
);\n
\n
form_gadget.props.element.querySelector(".activity_watcher_gadget")\n
.innerHTML = html_content;\n
return RSVP.delay(1000);\n
})\n
.push(function () {\n
return getDataExamine();\n
});\n
}\n
return queue.push(function () {\n
return getDataExamine();\n
});\n
});\n
}(rJS, jIO, Handlebars, RSVP, window));
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>2318</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts16413519.07</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>erp5_gadgetfield.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
/*global window, rJS, RSVP, Blob, Uint8Array, document, FormData, jIO */\n
/*jslint nomen: true, maxlen:80, indent:2*/\n
(function (window, rJS, RSVP) {\n
"use strict";\n
function convertDataURL2Blob(url, type) {\n
var binary,\n
array = [],\n
i;\n
url = url.split(\',\')[1];\n
if (url !== undefined) {\n
binary = window.atob(url);\n
for (i = 0; i < binary.length; i += 1) {\n
array.push(binary.charCodeAt(i));\n
}\n
return new Blob([new Uint8Array(array)], {type: type});\n
}\n
throw "Error: URL is not a dataURL";\n
}\n
\n
function promiseEventListener(target, type, useCapture) {\n
//////////////////////////\n
// Resolve the promise as soon as the event is triggered\n
// eventListener is removed when promise is cancelled/resolved/rejected\n
//////////////////////////\n
var handle_event_callback;\n
\n
function canceller() {\n
target.removeEventListener(type, handle_event_callback, useCapture);\n
}\n
\n
function resolver(resolve) {\n
handle_event_callback = function (evt) {\n
canceller();\n
evt.stopPropagation();\n
evt.preventDefault();\n
resolve(evt);\n
return false;\n
};\n
\n
target.addEventListener(type, handle_event_callback, useCapture);\n
}\n
return new RSVP.Promise(resolver, canceller);\n
}\n
rJS(window)\n
/////////////////////////////////////////////////////////////////\n
// ready\n
/////////////////////////////////////////////////////////////////\n
// Init local properties\n
.ready(function (g) {\n
g.props = {};\n
})\n
\n
// Assign the element to a variable\n
.ready(function (g) {\n
return g.getElement()\n
.push(function (element) {\n
g.props.element = element;\n
});\n
})\n
/////////////////////////////////////////////////////////////////\n
// declared methods\n
/////////////////////////////////////////////////////////////////\n
.declareService(function () {\n
var g = this,\n
i,\n
formdata,\n
list_gadget = document.getElementsByClassName("gadget"),\n
all_gadget,\n
list = [],\n
gadget_attributes = [],\n
scope,\n
tmp;\n
for (i = 0; i < list_gadget.length; i += 1) {\n
scope = list_gadget[i].getAttribute("data-gadget-scope");\n
if (scope !== undefined) {\n
tmp = {};\n
list.push(g.getDeclaredGadget(scope));\n
tmp.sandbox = list_gadget[i].getAttribute("data-gadget-sandbox");\n
tmp.key = scope;\n
tmp.editable = list_gadget[i].getAttribute("editable");\n
tmp.value = list_gadget[i].getAttribute("value");\n
gadget_attributes.push(tmp);\n
}\n
}\n
return new RSVP.Queue()\n
.push(function () {\n
return RSVP.all(list);\n
})\n
.push(function (results) {\n
all_gadget = results;\n
list = [];\n
for (i = 0; i < gadget_attributes.length; i += 1) {\n
if (gadget_attributes[i].sandbox === "iframe") {\n
list.push(all_gadget[i].getElement());\n
}\n
}\n
return RSVP.all(list);\n
})\n
.push(function (elements) {\n
var iframe,\n
j;\n
list = [];\n
for (i = 0, j = 0; i < gadget_attributes.length; i += 1) {\n
if (all_gadget[i].render !== undefined) {\n
list.push(\n
all_gadget[i].render(\n
{\n
"key": gadget_attributes[i].key,\n
"value": gadget_attributes[i].value\n
}\n
)\n
);\n
}\n
if (gadget_attributes[i].sandbox === "iframe") {\n
iframe = elements[j].querySelector(\'iframe\');\n
//xxx input field\n
elements[j].parentNode.style.width = "100%";\n
elements[j].parentNode.style.height = "100%";\n
//xxx section div\n
elements[j].style.width = "100%";\n
elements[j].style.height = "100%";\n
iframe.style.width = "100%";\n
iframe.style.height = "100%";\n
j += 1;\n
}\n
}\n
return RSVP.all(list);\n
})\n
.push(function () {\n
return promiseEventListener(g.props.element,\n
\'submit\', false);\n
})\n
.push(function (evt) {\n
list = [];\n
formdata = new FormData(evt.target);\n
for (i = 0; i < all_gadget.length; i += 1) {\n
if (all_gadget[i].getContent !== undefined &&\n
gadget_attributes[i].editable !== null) {\n
list.push(all_gadget[i].getContent());\n
}\n
}\n
return RSVP.all(list);\n
})\n
.push(function (all_content) {\n
var key,\n
form,\n
arg,\n
result;\n
for (i = 0; i < all_content.length; i += 1) {\n
for (key in all_content[i]) {\n
if (all_content[i].hasOwnProperty(key)) {\n
if (typeof all_content[i][key] === "object") {\n
arg = all_content[i][key];\n
result = convertDataURL2Blob(arg.url, arg.type);\n
formdata.append(key, result, arg.file_name);\n
} else {\n
formdata.append(key, all_content[i][key]);\n
}\n
}\n
}\n
}\n
form = g.props.element.querySelector(\'form\');\n
return jIO.util.ajax(\n
{\n
"type": form.getAttribute("method"),\n
"url": form.getAttribute("action"),\n
"data": formdata,\n
"xhrFields":\n
{\n
withCredentials: true\n
}\n
}\n
);\n
})\n
.push(function (evt) {\n
//XXX WORK ONLY IN ERP5!!!!!\n
//In erp5, after form submit, a new page is redirected automatically\n
//so get the new url, it should use getResponseHeader(\'Location\')\n
//But since the response code is 302, we have no way to get new url\n
//with getResponseHeader, that\'s why in this cas, we use responseURL \n
//It only works in erp5. \n
return window.location.replace(evt.target.responseURL);\n
});\n
});\n
}(window, rJS, RSVP));
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>6233</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="File" module="OFS.Image"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_EtagSupport__etag</string> </key>
<value> <string>ts16413671.77</string> </value>
</item>
<item>
<key> <string>__name__</string> </key>
<value> <string>jio_sha256.amd.js</string> </value>
</item>
<item>
<key> <string>content_type</string> </key>
<value> <string>application/javascript</string> </value>
</item>
<item>
<key> <string>data</string> </key>
<value> <string encoding="cdata"><![CDATA[
(function (dependencies, module) {\n
if (typeof define === \'function\' && define.amd) {\n
return define(dependencies, module);\n
}\n
if (typeof exports === \'object\') {\n
return module(exports);\n
}\n
module(window);\n
}([\'exports\'], function (window) {\n
/* A JavaScript implementation of the Secure Hash Algorithm, SHA-256\n
* Version 0.3 Copyright Angel Marin 2003-2004 - http://anmar.eu.org/\n
* Distributed under the BSD License\n
* Some bits taken from Paul Johnston\'s SHA-1 implementation\n
*/\n
(function () {\n
var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */\n
function safe_add (x, y) {\n
var lsw = (x & 0xFFFF) + (y & 0xFFFF);\n
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n
return (msw << 16) | (lsw & 0xFFFF);\n
}\n
function S (X, n) {return ( X >>> n ) | (X << (32 - n));}\n
function R (X, n) {return ( X >>> n );}\n
function Ch(x, y, z) {return ((x & y) ^ ((~x) & z));}\n
function Maj(x, y, z) {return ((x & y) ^ (x & z) ^ (y & z));}\n
function Sigma0256(x) {return (S(x, 2) ^ S(x, 13) ^ S(x, 22));}\n
function Sigma1256(x) {return (S(x, 6) ^ S(x, 11) ^ S(x, 25));}\n
function Gamma0256(x) {return (S(x, 7) ^ S(x, 18) ^ R(x, 3));}\n
function Gamma1256(x) {return (S(x, 17) ^ S(x, 19) ^ R(x, 10));}\n
function newArray (n) {\n
var a = [];\n
for (;n>0;n--) {\n
a.push(undefined);\n
}\n
return a;\n
}\n
function core_sha256 (m, l) {\n
var K = [0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2];\n
var HASH = [0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19];\n
var W = newArray(64);\n
var a, b, c, d, e, f, g, h, i, j;\n
var T1, T2;\n
/* append padding */\n
m[l >> 5] |= 0x80 << (24 - l % 32);\n
m[((l + 64 >> 9) << 4) + 15] = l;\n
for ( var i = 0; i<m.length; i+=16 ) {\n
a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3];\n
e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7];\n
for ( var j = 0; j<64; j++) {\n
if (j < 16) {\n
W[j] = m[j + i];\n
} else {\n
W[j] = safe_add(safe_add(safe_add(Gamma1256(\n
W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]);\n
}\n
T1 = safe_add(safe_add(safe_add(\n
safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]);\n
T2 = safe_add(Sigma0256(a), Maj(a, b, c));\n
h = g; g = f; f = e; e = safe_add(d, T1);\n
d = c; c = b; b = a; a = safe_add(T1, T2);\n
}\n
HASH[0] = safe_add(a, HASH[0]); HASH[1] = safe_add(b, HASH[1]);\n
HASH[2] = safe_add(c, HASH[2]); HASH[3] = safe_add(d, HASH[3]);\n
HASH[4] = safe_add(e, HASH[4]); HASH[5] = safe_add(f, HASH[5]);\n
HASH[6] = safe_add(g, HASH[6]); HASH[7] = safe_add(h, HASH[7]);\n
}\n
return HASH;\n
}\n
function str2binb (str) {\n
var bin = Array();\n
var mask = (1 << chrsz) - 1;\n
for(var i = 0; i < str.length * chrsz; i += chrsz)\n
bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - i%32);\n
return bin;\n
}\n
function binb2hex (binarray) {\n
var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */\n
var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";\n
var str = "";\n
for (var i = 0; i < binarray.length * 4; i++) {\n
str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) +\n
hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF);\n
}\n
return str;\n
}\n
function hex_sha256(s){\n
return binb2hex(core_sha256(str2binb(s),s.length * chrsz));\n
}\n
window.hex_sha256 = hex_sha256;\n
}());\n
}));
]]></string> </value>
</item>
<item>
<key> <string>precondition</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>4494</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -2,77 +2,63 @@ from Products.Formulator.Field import ZMIField
from Products.Formulator import Widget
from Products.Formulator.DummyField import fields
from Products.Formulator import Validator
from zLOG import LOG
from zLOG import LOG, ERROR
class GadgetWidget(Widget.TextWidget):
"""
A widget that displays a renderjs gadget
"""
property_names = Widget.TextWidget.property_names + \
['gadget_html', 'gadget_cached', 'gadget_cache_id', 'gadget_property',
'gadget_connection', 'gadget_id']
['gadget_url', 'js_sandbox']
gadget_html = fields.StringField('gadget_html',
title='Gadget Html',
description=("The id of the html page containing the \
gadget_url = fields.StringField('gadget_url',
title='Gadget Url',
description=("The url of the html page containing the \
gadget"),
default='',
required=0)
gadget_id = fields.StringField('gadget_id',
title='Gadget Id',
description=("The id of the gadget"),
js_sandbox = fields.StringField('js_sandbox',
title='Gadget Sandbox',
description=("Gadget sandbox"),
default='',
required=0)
gadget_cache_id = fields.StringField('gadget_cache_id',
title='Gadget Cache Id',
description=("The id of the cache in localstorage"),
default='',
required=0)
gadget_property = fields.StringField('gadget_property',
title='Gadget Properties',
description=("Json Data used to initialize the gadget"),
default='',
required=0)
gadget_connection = fields.StringField('gadget_connection',
title='Gadget Connections',
description=("Json Data used to define interactions"),
default='',
required=0)
gadget_cached = fields.CheckBoxField('gadget_cached',
title='Gadget Cached',
description=("The rendering of the gadget will be \
cached in localstorage."),
default=0,
required=0)
def render(self, field, key, value, REQUEST, render_prefix=None):
return self.render_view(field, value, REQUEST, render_prefix)
return self.render_view(field, value, REQUEST, render_prefix, key)
def render_view(self, field, value, REQUEST=None, render_prefix=None):
def render_view(self, field, value, REQUEST=None, render_prefix=None, key=None):
kw = {}
gadget_mapping = {"gadget_cached": "data-gadget-cacheable",
"gadget_cache_id": "data-gadget-cache-id",
"gadget_html": "data-gadget",
"gadget_id": "id",
"gadget_connection": "data-gadget-connection",
"gadget_property": "data-gadget-property"}
for property_name in gadget_mapping.keys():
property_value = field.get_value(property_name)
if property_value or property_name=="gadget_html":
kw[gadget_mapping[property_name]] = property_value
return Widget.render_element("div",
kw['data-gadget-url'] = field.get_value('gadget_url')
kw['data-gadget-scope'] = field.id
if key is not None:
kw['editable'] = key
kw['class'] = "gadget"
kw['value'] = value
kw['data-gadget-sandbox'] = field.get_value('js_sandbox')
return Widget.render_element("section",
**kw)
def get_javascript_list(self, field, REQUEST=None):
"""
Returns list of javascript needed by the widget
"""
js_list = ['rsvp.js', 'renderjs.js', 'erp5_gadgetfield.js',
'jio_sha256.amd.js', 'jio.js']
result = []
try:
for js_file in js_list:
result.append(field.restrictedTraverse(js_file).absolute_url())
except KeyError:
LOG('keyError:', ERROR, 'Error Value: %s' % js_file)
return []
return result
GadgetWidgetInstance = GadgetWidget()
class GadgetField(ZMIField):
""" Gadget field
"""
meta_type = "GadgetField"
widget = GadgetWidgetInstance
......
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