[Erp5-report] r8867 - /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Jul 28 16:24:46 CEST 2006


Author: vincent
Date: Fri Jul 28 16:24:44 2006
New Revision: 8867

URL: http://svn.erp5.org?rev=8867&view=rev
Log:
Separate "normal" and "should be removed" filters in ERP5XhtmlStyle_filterParameterList.
Fix defautl action name in list_main.

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5XhtmlStyle_filterParameterList.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/list_main.xml

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5XhtmlStyle_filterParameterList.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5XhtmlStyle_filterParameterList.xml?rev=8867&r1=8866&r2=8867&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5XhtmlStyle_filterParameterList.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5XhtmlStyle_filterParameterList.xml Fri Jul 28 16:24:44 2006
@@ -68,23 +68,54 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>def isValid(value_name):\n
+            <value> <string># XXX: This file contains many duplicated loops when filtering, this is done on purpose :\n
+# Each loop contains variable names which concern a certain hidden field generator (listbox, xhtml style,...).\n
+# Above each loop is said wether it is normal or shoul dbe fixed.\n
+\n
+def isValid(value_name):\n
   """\n
     Return true when the given field name can be propagated, false otherwise.\n
 \n
     FIXME: _select should be a prefix, not a sufix, to avoid potential collisions with property names.\n
   """\n
-  if not value_name.startswith(\'field_\') \\\n
-     and not value_name.startswith(\'subfield_\') \\\n
-     and not value_name.startswith(\'default_field\') \\\n
-     and not value_name.startswith(\'select_\') \\\n
-     or value_name == \'field_id\':\n
+  prefix = value_name.split(\'_\')[0]\n
+  if value_name == \'field_id\' \\\n
+     or prefix not in (\'field\', \'subfield\', \'default\', \'select\', \'search\'):\n
+    context.log(\'filter\', \'keeping %s\' % (value_name, ))\n
     return True\n
   return False\n
 \n
-# Remove some special values\n
-# FIXME: This list should be mostly empty, every variable not to propagate must have a distinct prefix and thus be handled by isValid.\n
-for k in (\'-C\', \'SearchableText\', \'uids\', \'listbox_uid\', \'list_selection_name\', \'list_start\', \'portal_status_message\', \'update_action\', \'dialog_method\', \'cancel_method\', \'title\', \'description\', \'reset\', \'md5_object_uid_list\', \'id\', \'came_from\'):\n
+# Remove a strange value. No idea on its meaning nor what it does here.\n
+if parameter_list.has_key(\'-C\'):\n
+  del parameter_list[\'-C\']\n
+\n
+# erp5_xhtml_style special fields.\n
+# This is normal.\n
+for k in (\'came_from\', \'SearchableText\', \'portal_status_message\', \'reset\'):\n
+  if parameter_list.has_key(k):\n
+    del parameter_list[k]\n
+\n
+# erp5_xhtml_style special fields.\n
+# XXX: This should not be needed.\n
+for k in (\'update_action\', \'dialog_method\', \'cancel_method\'):\n
+  if parameter_list.has_key(k):\n
+    del parameter_list[k]\n
+\n
+# Listbox search fields special values\n
+# XXX: This should not be needed.\n
+# for k in (\'id\', \'title\', \'description\', \'reporter\'):\n
+#   if parameter_list.has_key(k):\n
+#     del parameter_list[k]\n
+\n
+# Listbox special fields.\n
+# XXX: This should not be needed.\n
+for k in (\'list_start\', \'uids\', \'listbox_uid\', \'list_selection_name\', \'md5_object_uid_list\'):\n
+  if parameter_list.has_key(k):\n
+    del parameter_list[k]\n
+\n
+# Subversion special fields\n
+# XXX: This should not be needed.\n
+for k in (\'changelog\', \'added\', \'removed\', \'modified\'):\n
   if parameter_list.has_key(k):\n
     del parameter_list[k]\n
 \n
@@ -137,10 +168,10 @@
                           <tuple>
                             <string>parameter_list</string>
                             <string>isValid</string>
+                            <string>_getattr_</string>
+                            <string>_write_</string>
                             <string>_getiter_</string>
                             <string>k</string>
-                            <string>_getattr_</string>
-                            <string>_write_</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/list_main.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/list_main.xml?rev=8867&r1=8866&r2=8867&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/list_main.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/list_main.xml Fri Jul 28 16:24:44 2006
@@ -73,7 +73,7 @@
 -->\n
 </tal:block>\n
 <tal:block metal:define-macro="master">\n
-  <tal:block tal:define="form_action string:Base_doSelect:method;\n
+  <tal:block tal:define="form_action string:Base_doSelect;\n
                          form_id form/id;\n
                          list_mode python: True;\n
                          listmode_default_listbox python: here.ERP5XhtmlStyle_getListbox(form=form);\n




More information about the Erp5-report mailing list