[Erp5-report] r16040 - /erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/porta...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Sep 4 17:28:05 CEST 2007


Author: tb
Date: Tue Sep  4 17:28:04 2007
New Revision: 16040

URL: http://svn.erp5.org?rev=16040&view=rev
Log:
2007-09-04 Thierry
* Add Base_hashCategoryList script used as script for parallel_list_field in order to implement a new multi_list_field behaviour

Added:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_hashCategoryList.xml

Added: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_hashCategoryList.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_hashCategoryList.xml?rev=16040&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_hashCategoryList.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_hashCategoryList.xml Tue Sep  4 17:28:04 2007
@@ -1,0 +1,202 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PythonScripts.PythonScript</string>
+          <string>PythonScript</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>Python_magic</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>Script_magic</string> </key>
+            <value> <int>3</int> </value>
+        </item>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </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 encoding="cdata"><![CDATA[
+
+"""\n
+  This script is used in parallel list fields\n
+  to implement a new \'multi list field behaviour\' \n
+  (it repeats category items\n
+  in such way that it is possible to select multiple\n
+  categories for the same document )\n
+"""\n
+# Initialise result\n
+sub_field_list = []\n
+\n
+# Maximum size of the MultiListField\n
+default_sub_field_property_dict.update({\'required\': 0,\'field_type\': \'ListField\',\'size\': 1,\'item_list\': [(\'\', \'\')] + item_list,\'value\': None})\n
+\n
+z = 0\n
+for i in range(1):\n
+  new_dict = default_sub_field_property_dict.copy()\n
+  new_dict[\'title\'] = \'&nbsp;\'\n
+  new_dict[\'key\'] = str(z)\n
+  z += 1\n
+  sub_field_list.append(new_dict)\n
+\n
+value_list.sort()\n
+for value in value_list:\n
+  new_dict = default_sub_field_property_dict.copy()\n
+  new_dict[\'value\'] = value\n
+  new_dict[\'title\'] = \'&nbsp;\'\n
+  new_dict[\'key\'] = str(z)\n
+  z += 1\n
+  sub_field_list.append(new_dict)\n
+\n
+new_dict[\'title\'] = default_sub_field_property_dict[\'title\']\n
+sub_field_list.reverse()\n
+return sub_field_list\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_filepath</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>item_list, value_list, default_sub_field_property_dict={}, is_right_display=0</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>4</int> </value>
+                    </item>
+                    <item>
+                        <key> <string>co_varnames</string> </key>
+                        <value>
+                          <tuple>
+                            <string>item_list</string>
+                            <string>value_list</string>
+                            <string>default_sub_field_property_dict</string>
+                            <string>is_right_display</string>
+                            <string>sub_field_list</string>
+                            <string>_getattr_</string>
+                            <string>None</string>
+                            <string>z</string>
+                            <string>_getiter_</string>
+                            <string>range</string>
+                            <string>i</string>
+                            <string>new_dict</string>
+                            <string>_write_</string>
+                            <string>str</string>
+                            <string>value</string>
+                            <string>_getitem_</string>
+                          </tuple>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>func_defaults</string> </key>
+            <value>
+              <tuple>
+                <dictionary/>
+                <int>0</int>
+              </tuple>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>Base_hashCategoryList</string> </value>
+        </item>
+        <item>
+            <key> <string>warnings</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>




More information about the Erp5-report mailing list