[Erp5-report] r39109 kazuhiko - in /erp5/trunk/bt5/erp5_json_style: ./ RegisteredSkinSelect...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Oct 13 17:23:21 CEST 2010
Author: kazuhiko
Date: Wed Oct 13 17:23:18 2010
New Revision: 39109
URL: http://svn.erp5.org?rev=39109&view=rev
Log:
A skin for producing JSON output of ERP5 Form containing ListBox(es).
Added:
erp5/trunk/bt5/erp5_json_style/
erp5/trunk/bt5/erp5_json_style/RegisteredSkinSelectionTemplateItem/
erp5/trunk/bt5/erp5_json_style/RegisteredSkinSelectionTemplateItem/registered_skin_selection.xml
erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/
erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/
erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/
erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style.xml
erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/ListBox_asHTML.xml
erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/form_list.xml
erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/form_view.xml
erp5/trunk/bt5/erp5_json_style/bt/
erp5/trunk/bt5/erp5_json_style/bt/change_log
erp5/trunk/bt5/erp5_json_style/bt/copyright_list
erp5/trunk/bt5/erp5_json_style/bt/description
erp5/trunk/bt5/erp5_json_style/bt/license
erp5/trunk/bt5/erp5_json_style/bt/maintainer_list
erp5/trunk/bt5/erp5_json_style/bt/revision
erp5/trunk/bt5/erp5_json_style/bt/template_format_version
erp5/trunk/bt5/erp5_json_style/bt/template_registered_skin_selection_list
erp5/trunk/bt5/erp5_json_style/bt/template_skin_id_list
erp5/trunk/bt5/erp5_json_style/bt/title
erp5/trunk/bt5/erp5_json_style/bt/version
Added: erp5/trunk/bt5/erp5_json_style/RegisteredSkinSelectionTemplateItem/registered_skin_selection.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_json_style/RegisteredSkinSelectionTemplateItem/registered_skin_selection.xml?rev=39109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_json_style/RegisteredSkinSelectionTemplateItem/registered_skin_selection.xml (added)
+++ erp5/trunk/bt5/erp5_json_style/RegisteredSkinSelectionTemplateItem/registered_skin_selection.xml [utf8] Wed Oct 13 17:23:18 2010
@@ -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
Added: erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style.xml?rev=39109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style.xml (added)
+++ erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style.xml [utf8] Wed Oct 13 17:23:18 2010
@@ -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>
Added: erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/ListBox_asHTML.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/ListBox_asHTML.xml?rev=39109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/ListBox_asHTML.xml (added)
+++ erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/ListBox_asHTML.xml [utf8] Wed Oct 13 17:23:18 2010
@@ -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>
Added: erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/form_list.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/form_list.xml?rev=39109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/form_list.xml (added)
+++ erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/form_list.xml [utf8] Wed Oct 13 17:23:18 2010
@@ -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>
Added: erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/form_view.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/form_view.xml?rev=39109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/form_view.xml (added)
+++ erp5/trunk/bt5/erp5_json_style/SkinTemplateItem/portal_skins/erp5_json_style/form_view.xml [utf8] Wed Oct 13 17:23:18 2010
@@ -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>
Added: erp5/trunk/bt5/erp5_json_style/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_json_style/bt/change_log?rev=39109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_json_style/bt/change_log (added)
+++ erp5/trunk/bt5/erp5_json_style/bt/change_log [utf8] Wed Oct 13 17:23:18 2010
@@ -0,0 +1,2 @@
+2010-10-13 Kazuhiko
+* initial implementation.
\ No newline at end of file
Added: erp5/trunk/bt5/erp5_json_style/bt/copyright_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_json_style/bt/copyright_list?rev=39109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_json_style/bt/copyright_list (added)
+++ erp5/trunk/bt5/erp5_json_style/bt/copyright_list [utf8] Wed Oct 13 17:23:18 2010
@@ -0,0 +1 @@
+Copyright (c) 2010 Nexedi SA
\ No newline at end of file
Added: erp5/trunk/bt5/erp5_json_style/bt/description
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_json_style/bt/description?rev=39109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_json_style/bt/description (added)
+++ erp5/trunk/bt5/erp5_json_style/bt/description [utf8] Wed Oct 13 17:23:18 2010
@@ -0,0 +1 @@
+A skin for producing JSON output of ERP5 Form containing ListBox(es).
\ No newline at end of file
Added: erp5/trunk/bt5/erp5_json_style/bt/license
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_json_style/bt/license?rev=39109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_json_style/bt/license (added)
+++ erp5/trunk/bt5/erp5_json_style/bt/license [utf8] Wed Oct 13 17:23:18 2010
@@ -0,0 +1 @@
+GPL
\ No newline at end of file
Added: erp5/trunk/bt5/erp5_json_style/bt/maintainer_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_json_style/bt/maintainer_list?rev=39109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_json_style/bt/maintainer_list (added)
+++ erp5/trunk/bt5/erp5_json_style/bt/maintainer_list [utf8] Wed Oct 13 17:23:18 2010
@@ -0,0 +1 @@
+kazuhiko
\ No newline at end of file
Added: erp5/trunk/bt5/erp5_json_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_json_style/bt/revision?rev=39109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_json_style/bt/revision (added)
+++ erp5/trunk/bt5/erp5_json_style/bt/revision [utf8] Wed Oct 13 17:23:18 2010
@@ -0,0 +1 @@
+1
\ No newline at end of file
Added: erp5/trunk/bt5/erp5_json_style/bt/template_format_version
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_json_style/bt/template_format_version?rev=39109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_json_style/bt/template_format_version (added)
+++ erp5/trunk/bt5/erp5_json_style/bt/template_format_version [utf8] Wed Oct 13 17:23:18 2010
@@ -0,0 +1 @@
+1
\ No newline at end of file
Added: erp5/trunk/bt5/erp5_json_style/bt/template_registered_skin_selection_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_json_style/bt/template_registered_skin_selection_list?rev=39109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_json_style/bt/template_registered_skin_selection_list (added)
+++ erp5/trunk/bt5/erp5_json_style/bt/template_registered_skin_selection_list [utf8] Wed Oct 13 17:23:18 2010
@@ -0,0 +1 @@
+erp5_json_style | JSON
\ No newline at end of file
Added: erp5/trunk/bt5/erp5_json_style/bt/template_skin_id_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_json_style/bt/template_skin_id_list?rev=39109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_json_style/bt/template_skin_id_list (added)
+++ erp5/trunk/bt5/erp5_json_style/bt/template_skin_id_list [utf8] Wed Oct 13 17:23:18 2010
@@ -0,0 +1 @@
+erp5_json_style
\ No newline at end of file
Added: erp5/trunk/bt5/erp5_json_style/bt/title
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_json_style/bt/title?rev=39109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_json_style/bt/title (added)
+++ erp5/trunk/bt5/erp5_json_style/bt/title [utf8] Wed Oct 13 17:23:18 2010
@@ -0,0 +1 @@
+erp5_json_style
\ No newline at end of file
Added: erp5/trunk/bt5/erp5_json_style/bt/version
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_json_style/bt/version?rev=39109&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_json_style/bt/version (added)
+++ erp5/trunk/bt5/erp5_json_style/bt/version [utf8] Wed Oct 13 17:23:18 2010
@@ -0,0 +1 @@
+5.4.7
\ No newline at end of file
More information about the Erp5-report
mailing list