From b8396ee4bfd53e543b2840592ed16c9635a2dd02 Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Thu, 31 May 2018 12:48:45 +0000 Subject: [PATCH] [erp5_core] Switch test component editor to a renderJS gadget Allow edition in the new UI --- .../Document%20Component/view.xml | 17 +- .../Extension%20Component/view.xml | 21 +- .../portal_types/Test%20Component/view.xml | 17 +- .../ComponentMixin_view/my_text_content.xml | 272 ++---------------- 4 files changed, 21 insertions(+), 306 deletions(-) diff --git a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Document%20Component/view.xml b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Document%20Component/view.xml index d1ef3945fa..01070ae24f 100644 --- a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Document%20Component/view.xml +++ b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Document%20Component/view.xml @@ -26,9 +26,7 @@ </item> <item> <key> <string>condition</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> - </value> + <value> <string></string> </value> </item> <item> <key> <string>description</string> </key> @@ -80,17 +78,4 @@ </dictionary> </pickle> </record> - <record id="3" aka="AAAAAAAAAAM="> - <pickle> - <global name="Expression" module="Products.CMFCore.Expression"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>text</string> </key> - <value> <string>python: object is not None and not object.isWebMode()</string> </value> - </item> - </dictionary> - </pickle> - </record> </ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Extension%20Component/view.xml b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Extension%20Component/view.xml index d1ef3945fa..046e2d9e57 100644 --- a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Extension%20Component/view.xml +++ b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Extension%20Component/view.xml @@ -26,15 +26,11 @@ </item> <item> <key> <string>condition</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> - </value> + <value> <string></string> </value> </item> <item> <key> <string>description</string> </key> - <value> - <none/> - </value> + <value> <string>python: object is not None and not object.isWebMode()</string> </value> </item> <item> <key> <string>icon</string> </key> @@ -80,17 +76,4 @@ </dictionary> </pickle> </record> - <record id="3" aka="AAAAAAAAAAM="> - <pickle> - <global name="Expression" module="Products.CMFCore.Expression"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>text</string> </key> - <value> <string>python: object is not None and not object.isWebMode()</string> </value> - </item> - </dictionary> - </pickle> - </record> </ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Test%20Component/view.xml b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Test%20Component/view.xml index d1ef3945fa..01070ae24f 100644 --- a/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Test%20Component/view.xml +++ b/product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Test%20Component/view.xml @@ -26,9 +26,7 @@ </item> <item> <key> <string>condition</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> - </value> + <value> <string></string> </value> </item> <item> <key> <string>description</string> </key> @@ -80,17 +78,4 @@ </dictionary> </pickle> </record> - <record id="3" aka="AAAAAAAAAAM="> - <pickle> - <global name="Expression" module="Products.CMFCore.Expression"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>text</string> </key> - <value> <string>python: object is not None and not object.isWebMode()</string> </value> - </item> - </dictionary> - </pickle> - </record> </ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_view/my_text_content.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_view/my_text_content.xml index 605e4afe95..86b4161112 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_view/my_text_content.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ComponentMixin_view/my_text_content.xml @@ -2,10 +2,18 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <global name="EditorField" module="Products.ERP5Form.EditorField"/> + <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_text_content</string> </value> @@ -18,22 +26,6 @@ <key> <string>external_validator_failed</string> </key> <value> <string>The input failed the external validator.</string> </value> </item> - <item> - <key> <string>line_too_long</string> </key> - <value> <string>A line was too long.</string> </value> - </item> - <item> - <key> <string>required_not_found</string> </key> - <value> <string>Input is required but no input given.</string> </value> - </item> - <item> - <key> <string>too_long</string> </key> - <value> <string>You entered too many characters.</string> </value> - </item> - <item> - <key> <string>too_many_lines</string> </key> - <value> <string>You entered too many lines.</string> </value> - </item> </dictionary> </value> </item> @@ -42,79 +34,11 @@ <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>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>height</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_linelength</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_lines</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>required</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>text_editor</string> </key> + <key> <string>field_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>title</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>unicode</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>whitespace_preserve</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>width</string> </key> + <key> <string>form_id</string> </key> <value> <string></string> </value> </item> </dictionary> @@ -125,83 +49,11 @@ <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> - <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> - </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>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>height</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_linelength</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_lines</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>required</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>text_editor</string> </key> - <value> - <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> - </value> - </item> - <item> - <key> <string>title</string> </key> + <key> <string>field_id</string> </key> <value> <string></string> </value> </item> <item> - <key> <string>unicode</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>whitespace_preserve</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>width</string> </key> + <key> <string>form_id</string> </key> <value> <string></string> </value> </item> </dictionary> @@ -212,111 +64,21 @@ <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> <int>1</int> </value> - </item> - <item> - <key> <string>enabled</string> </key> - <value> <int>1</int> </value> - </item> - <item> - <key> <string>external_validator</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>extra</string> </key> - <value> <string>style="width: 100%"</string> </value> - </item> - <item> - <key> <string>height</string> </key> - <value> <int>20</int> </value> - </item> - <item> - <key> <string>hidden</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>max_length</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_linelength</string> </key> - <value> <string></string> </value> - </item> - <item> - <key> <string>max_lines</string> </key> - <value> <string></string> </value> + <key> <string>field_id</string> </key> + <value> <string>my_view_mode_text_content</string> </value> </item> <item> - <key> <string>required</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>text_editor</string> </key> - <value> <string>text_area</string> </value> + <key> <string>form_id</string> </key> + <value> <string>Base_viewFieldLibrary</string> </value> </item> <item> <key> <string>title</string> </key> <value> <string>Source Code</string> </value> </item> - <item> - <key> <string>unicode</string> </key> - <value> <int>0</int> </value> - </item> - <item> - <key> <string>whitespace_preserve</string> </key> - <value> <int>1</int> </value> - </item> - <item> - <key> <string>width</string> </key> - <value> <int>60</int> </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: here.getTextContent()</string> </value> - </item> - </dictionary> - </pickle> - </record> - <record id="3" aka="AAAAAAAAAAM="> - <pickle> - <global name="TALESMethod" module="Products.Formulator.TALESField"/> - </pickle> - <pickle> - <dictionary> - <item> - <key> <string>_text</string> </key> - <value> <string>python: here.portal_preferences.getPreferredSourceCodeEditor()</string> </value> - </item> - </dictionary> - </pickle> - </record> </ZopeData> -- 2.30.9