diff --git a/bt5/erp5_json_style/RegisteredSkinSelectionTemplateItem/registered_skin_selection.xml b/bt5/erp5_json_style/RegisteredSkinSelectionTemplateItem/registered_skin_selection.xml new file mode 100644 index 0000000000000000000000000000000000000000..3fa30b26481affa845853d92e73319fe9e33458c --- /dev/null +++ b/bt5/erp5_json_style/RegisteredSkinSelectionTemplateItem/registered_skin_selection.xml @@ -0,0 +1,6 @@ +<registered_skin_selection> + <skin_folder_selection> + <skin_folder>erp5_json_style</skin_folder> + <skin_selection>JSON</skin_selection> + </skin_folder_selection> +</registered_skin_selection> \ No newline at end of file diff --git a/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style.xml b/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style.xml new file mode 100644 index 0000000000000000000000000000000000000000..9a63afb7654c3dc28161aba4e7bca459957e41f7 --- /dev/null +++ b/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style.xml @@ -0,0 +1,47 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Folder" module="OFS.Folder"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_local_properties</string> </key> + <value> + <tuple> + <dictionary> + <item> + <key> <string>id</string> </key> + <value> <string>business_template_skin_layer_priority</string> </value> + </item> + <item> + <key> <string>type</string> </key> + <value> <string>float</string> </value> + </item> + </dictionary> + </tuple> + </value> + </item> + <item> + <key> <string>_objects</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>business_template_skin_layer_priority</string> </key> + <value> <float>10.0</float> </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>erp5_json_style</string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/ListBox_asHTML.xml b/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/ListBox_asHTML.xml new file mode 100644 index 0000000000000000000000000000000000000000..b7ecab3c7d31804c5ca5f798f32b5caa8a417533 --- /dev/null +++ b/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/ListBox_asHTML.xml @@ -0,0 +1,142 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>Script_magic</string> </key> + <value> <int>3</int> </value> + </item> + <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_container</string> </key> + <value> <string>container</string> </value> + </item> + <item> + <key> <string>name_context</string> </key> + <value> <string>context</string> </value> + </item> + <item> + <key> <string>name_m_self</string> </key> + <value> <string>script</string> </value> + </item> + <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>_body</string> </key> + <value> <string>from Products.ERP5Type.collections import OrderedDict\n +from Products.ERP5Type.JSON import dumps\n +label_list = context.getLabelValueList()\n +num = len(label_list)\n +result_list = []\n +for line in context.query():\n + value_list = line.getValueList()\n + result_list.append(OrderedDict([(label_list[i][1], value_list[i][0]) for i in range(num)]))\n +return dumps(OrderedDict([(\'title\',context.getTitle()), (\'data\',result_list)]))\n +</string> </value> + </item> + <item> + <key> <string>_code</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>_params</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>errors</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>func_code</string> </key> + <value> + <object> + <klass> + <global name="FuncCode" module="Shared.DC.Scripts.Signature"/> + </klass> + <tuple/> + <state> + <dictionary> + <item> + <key> <string>co_argcount</string> </key> + <value> <int>0</int> </value> + </item> + <item> + <key> <string>co_varnames</string> </key> + <value> + <tuple> + <string>Products.ERP5Type.collections</string> + <string>OrderedDict</string> + <string>Products.ERP5Type.JSON</string> + <string>dumps</string> + <string>_getattr_</string> + <string>context</string> + <string>label_list</string> + <string>len</string> + <string>num</string> + <string>result_list</string> + <string>_getiter_</string> + <string>line</string> + <string>value_list</string> + <string>$list0</string> + <string>range</string> + <string>i</string> + <string>_getitem_</string> + </tuple> + </value> + </item> + </dictionary> + </state> + </object> + </value> + </item> + <item> + <key> <string>func_defaults</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>ListBox_asHTML</string> </value> + </item> + <item> + <key> <string>warnings</string> </key> + <value> + <tuple/> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/form_list.xml b/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/form_list.xml new file mode 100644 index 0000000000000000000000000000000000000000..ae06bf07a410daa1955863fae698455a03469867 --- /dev/null +++ b/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/form_list.xml @@ -0,0 +1,66 @@ +<?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[ + +[<tal:block tal:content="python:\', \'.join([form[\'listbox\'].render()])" />] + +]]></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>form_list</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> diff --git a/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/form_view.xml b/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/form_view.xml new file mode 100644 index 0000000000000000000000000000000000000000..31910871b2d1d4b2a2b0ff69534de50297d103b6 --- /dev/null +++ b/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/form_view.xml @@ -0,0 +1,66 @@ +<?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[ + +[<tal:block tal:content="python:\',\'.join([field.render() for field in form.get_fields() if (field.meta_type == \'ListBox\' or field.meta_type == \'ProxyField\' and field.getRecursiveTemplateField().meta_type == \'ListBox\')])" />] + +]]></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>form_view</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> diff --git a/bt5/erp5_json_style/bt/change_log b/bt5/erp5_json_style/bt/change_log new file mode 100644 index 0000000000000000000000000000000000000000..dfa110e0a5243e2a90631af2c32ec811cd5f782c --- /dev/null +++ b/bt5/erp5_json_style/bt/change_log @@ -0,0 +1,2 @@ +2010-10-13 Kazuhiko +* initial implementation. \ No newline at end of file diff --git a/bt5/erp5_json_style/bt/copyright_list b/bt5/erp5_json_style/bt/copyright_list new file mode 100644 index 0000000000000000000000000000000000000000..fe948b9fb7c242ba7403410bb05d78ca4343c414 --- /dev/null +++ b/bt5/erp5_json_style/bt/copyright_list @@ -0,0 +1 @@ +Copyright (c) 2010 Nexedi SA \ No newline at end of file diff --git a/bt5/erp5_json_style/bt/description b/bt5/erp5_json_style/bt/description new file mode 100644 index 0000000000000000000000000000000000000000..c3c7f914254fc822f9d57aa6709b5342c8367a94 --- /dev/null +++ b/bt5/erp5_json_style/bt/description @@ -0,0 +1 @@ +A skin for producing JSON output of ERP5 Form containing ListBox(es). \ No newline at end of file diff --git a/bt5/erp5_json_style/bt/license b/bt5/erp5_json_style/bt/license new file mode 100644 index 0000000000000000000000000000000000000000..3a3e12bcad97e4b3bdd6a8bb499fd23a4bcb0819 --- /dev/null +++ b/bt5/erp5_json_style/bt/license @@ -0,0 +1 @@ +GPL \ No newline at end of file diff --git a/bt5/erp5_json_style/bt/maintainer_list b/bt5/erp5_json_style/bt/maintainer_list new file mode 100644 index 0000000000000000000000000000000000000000..91fac13497f89ca1de121ab52e2be6d076c5c252 --- /dev/null +++ b/bt5/erp5_json_style/bt/maintainer_list @@ -0,0 +1 @@ +kazuhiko \ No newline at end of file diff --git a/bt5/erp5_json_style/bt/revision b/bt5/erp5_json_style/bt/revision new file mode 100644 index 0000000000000000000000000000000000000000..56a6051ca2b02b04ef92d5150c9ef600403cb1de --- /dev/null +++ b/bt5/erp5_json_style/bt/revision @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/bt5/erp5_json_style/bt/template_format_version b/bt5/erp5_json_style/bt/template_format_version new file mode 100644 index 0000000000000000000000000000000000000000..56a6051ca2b02b04ef92d5150c9ef600403cb1de --- /dev/null +++ b/bt5/erp5_json_style/bt/template_format_version @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/bt5/erp5_json_style/bt/template_registered_skin_selection_list b/bt5/erp5_json_style/bt/template_registered_skin_selection_list new file mode 100644 index 0000000000000000000000000000000000000000..f3a0bf2883a8cd947336e8dc22cdb244db9ef7ac --- /dev/null +++ b/bt5/erp5_json_style/bt/template_registered_skin_selection_list @@ -0,0 +1 @@ +erp5_json_style | JSON \ No newline at end of file diff --git a/bt5/erp5_json_style/bt/template_skin_id_list b/bt5/erp5_json_style/bt/template_skin_id_list new file mode 100644 index 0000000000000000000000000000000000000000..bda668c151283314620ddded3f0d14b770d16132 --- /dev/null +++ b/bt5/erp5_json_style/bt/template_skin_id_list @@ -0,0 +1 @@ +erp5_json_style \ No newline at end of file diff --git a/bt5/erp5_json_style/bt/title b/bt5/erp5_json_style/bt/title new file mode 100644 index 0000000000000000000000000000000000000000..bda668c151283314620ddded3f0d14b770d16132 --- /dev/null +++ b/bt5/erp5_json_style/bt/title @@ -0,0 +1 @@ +erp5_json_style \ No newline at end of file diff --git a/bt5/erp5_json_style/bt/version b/bt5/erp5_json_style/bt/version new file mode 100644 index 0000000000000000000000000000000000000000..48360de846a2e022a0b981d250895f20d3480d34 --- /dev/null +++ b/bt5/erp5_json_style/bt/version @@ -0,0 +1 @@ +5.4.7 \ No newline at end of file