[Erp5-report] r10682 - in /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplate...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Oct 13 10:46:28 CEST 2006


Author: vincent
Date: Fri Oct 13 10:46:23 2006
New Revision: 10682

URL: http://svn.erp5.org?rev=10682&view=rev
Log:
Cleanup ERP5XhtmlStyle_filterParameterList.
Remove variable names from explicit propagation, because they must be generated explicitely in the page templates which require them. Further cleanup is still required for some of the remaining names.
Add explicit rendering of variables whose name were removed from filter script.

Added:
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/relation_form.xml
Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_html_compatibility/form_list_relation.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doAction.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doDialog.xml
    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/Folder_print.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/TemplateTool_callViewInstallRepositoryBusinessTemplateListDialog.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/dialog_main.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/global_definitions.xml

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_html_compatibility/form_list_relation.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_html_compatibility/form_list_relation.xml?rev=10682&r1=10681&r2=10682&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_html_compatibility/form_list_relation.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_html_compatibility/form_list_relation.xml Fri Oct 13 10:46:23 2006
@@ -48,7 +48,7 @@
             <key> <string>_text</string> </key>
             <value> <string encoding="cdata"><![CDATA[
 
-<tal:block metal:use-macro="here/form_dialog/macros/master" />\n
+<tal:block metal:use-macro="here/relation_form/macros/master" />\n
 
 
 ]]></string> </value>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doAction.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doAction.xml?rev=10682&r1=10681&r2=10682&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doAction.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doAction.xml Fri Oct 13 10:46:23 2006
@@ -70,7 +70,7 @@
             <key> <string>_body</string> </key>
             <value> <string>portal = context.getPortalObject()\n
 N_ = portal.Base_translateString\n
-preserved_parameters={}\n
+preserved_parameters={\'form_id\': form_id, \'cancel_url\': cancel_url}\n
 request = context.REQUEST\n
 \n
 Base_doAction = select_action.split()\n
@@ -135,7 +135,7 @@
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>select_action, **kw</string> </value>
+            <value> <string>select_action, form_id, cancel_url, **kw</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -155,13 +155,15 @@
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>1</int> </value>
+                        <value> <int>3</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
                         <value>
                           <tuple>
                             <string>select_action</string>
+                            <string>form_id</string>
+                            <string>cancel_url</string>
                             <string>kw</string>
                             <string>_getattr_</string>
                             <string>context</string>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doDialog.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doDialog.xml?rev=10682&r1=10681&r2=10682&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doDialog.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doDialog.xml Fri Oct 13 10:46:23 2006
@@ -68,7 +68,8 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>return context.ERP5XhtmlStyle_redirect(select_dialog.split()[0], keep_items={\'dialog_category\': dialog_category}, **kw)\n
+            <value> <string>kw.update(context.REQUEST.form)\n
+return context.ERP5XhtmlStyle_redirect(select_dialog.split()[0], keep_items={\'dialog_category\': dialog_category, \'form_id\': form_id, \'cancel_url\': cancel_url}, **kw)\n
 </string> </value>
         </item>
         <item>
@@ -91,7 +92,7 @@
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>select_dialog, dialog_category, **kw</string> </value>
+            <value> <string>select_dialog, dialog_category, form_id, cancel_url, **kw</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -111,7 +112,7 @@
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>2</int> </value>
+                        <value> <int>4</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
@@ -119,10 +120,12 @@
                           <tuple>
                             <string>select_dialog</string>
                             <string>dialog_category</string>
+                            <string>form_id</string>
+                            <string>cancel_url</string>
                             <string>kw</string>
-                            <string>_apply_</string>
                             <string>_getattr_</string>
                             <string>context</string>
+                            <string>_apply_</string>
                             <string>_getitem_</string>
                           </tuple>
                         </value>

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=10682&r1=10681&r2=10682&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 Oct 13 10:46:23 2006
@@ -70,11 +70,7 @@
             <key> <string>_body</string> </key>
             <value> <string>kept_names = (\'editable_mode\', \'ignore_layout\',            # erp5_web\n
               \'selection_name\', \'selection_index\',         # list mode\n
-              \'form_id\',                                   # list mode and view mode\n
-              \'object_uid\', \'object_path\',                 # view mode\n
-              \'field_id\', \'form_pickle\', \'form_signature\', # related string field\n
               \'bt_list\',                                   # business template installation system\n
-              \'cancel_url\',\n
              )\n
 # Dialog mode is absent from the kept_name list on purpose :\n
 # none of its variable should ever get transmited because\n
@@ -83,20 +79,8 @@
 # a dialog. So this is safe to propagate it.\n
 \n
 kept_names = dict([(key, None) for key in kept_names])\n
-\n
-def isValid(value_name):\n
-  """\n
-    Return true when the given field name can be propagated, false otherwise.\n
-  """\n
-  if kept_names.has_key(value_name):\n
-    return True\n
-  return False\n
-\n
-for k in parameter_list.keys():\n
-  if not isValid(k):\n
-    del parameter_list[k]\n
-\n
-return parameter_list\n
+to_keep = kept_names.has_key\n
+return dict([(k, v) for k, v in parameter_list.items() if to_keep(k)])\n
 </string> </value>
         </item>
         <item>
@@ -147,10 +131,10 @@
                             <string>_getiter_</string>
                             <string>key</string>
                             <string>None</string>
-                            <string>isValid</string>
                             <string>_getattr_</string>
+                            <string>to_keep</string>
                             <string>k</string>
-                            <string>_write_</string>
+                            <string>v</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Folder_print.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Folder_print.xml?rev=10682&r1=10681&r2=10682&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Folder_print.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Folder_print.xml Fri Oct 13 10:46:23 2006
@@ -77,7 +77,7 @@
 if len(print_action_list) == 1:\n
   return context.ERP5XhtmlStyle_redirect(print_action_list[0][\'url\'], **kw)\n
 else:\n
-  return context.ERP5XhtmlStyle_redirect(\'%s/Base_print\' % (context.absolute_url(), ), keep_items={\'dialog_category\': \'object_print\'}, **kw)\n
+  return context.ERP5XhtmlStyle_redirect(\'%s/Base_print\' % (context.absolute_url(), ), keep_items={\'dialog_category\': \'object_print\', \'form_id\': form_id, \'cancel_url\': cancel_url}, **kw)\n
 </string> </value>
         </item>
         <item>
@@ -94,7 +94,7 @@
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>form_id, **kw</string> </value>
+            <value> <string>form_id, cancel_url, **kw</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -114,13 +114,14 @@
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>1</int> </value>
+                        <value> <int>2</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
                         <value>
                           <tuple>
                             <string>form_id</string>
+                            <string>cancel_url</string>
                             <string>kw</string>
                             <string>_getattr_</string>
                             <string>context</string>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/TemplateTool_callViewInstallRepositoryBusinessTemplateListDialog.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/TemplateTool_callViewInstallRepositoryBusinessTemplateListDialog.xml?rev=10682&r1=10681&r2=10682&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/TemplateTool_callViewInstallRepositoryBusinessTemplateListDialog.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/TemplateTool_callViewInstallRepositoryBusinessTemplateListDialog.xml Fri Oct 13 10:46:23 2006
@@ -72,7 +72,8 @@
 # Clear selection\n
 context.portal_selections.setSelectionCheckedUidsFor(\'template_tool_install_selection\', [])\n
 # Then call the listbox\n
-return context.ERP5XhtmlStyle_redirect("%s/%s" % (context.absolute_url(), \'TemplateTool_viewInstallRepositoryBusinessTemplateListDialog\'), keep_items={\'dialog_category\': dialog_category}, **kw)\n
+kw.update(context.REQUEST.form)\n
+return context.ERP5XhtmlStyle_redirect("%s/%s" % (context.absolute_url(), \'TemplateTool_viewInstallRepositoryBusinessTemplateListDialog\'), keep_items={\'dialog_category\': dialog_category, \'form_id\': form_id, \'cancel_url\': cancel_url}, **kw)\n
 </string> </value>
         </item>
         <item>
@@ -95,7 +96,7 @@
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>dialog_category=None, **kw</string> </value>
+            <value> <string>dialog_category=None, form_id, cancel_url, **kw</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -115,13 +116,15 @@
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>1</int> </value>
+                        <value> <int>3</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
                         <value>
                           <tuple>
                             <string>dialog_category</string>
+                            <string>form_id</string>
+                            <string>cancel_url</string>
                             <string>kw</string>
                             <string>_getattr_</string>
                             <string>context</string>
@@ -138,6 +141,8 @@
             <key> <string>func_defaults</string> </key>
             <value>
               <tuple>
+                <none/>
+                <none/>
                 <none/>
               </tuple>
             </value>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/dialog_main.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/dialog_main.xml?rev=10682&r1=10681&r2=10682&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/dialog_main.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/dialog_main.xml Fri Oct 13 10:46:23 2006
@@ -75,12 +75,13 @@
 <tal:block metal:define-macro="master">\n
   <tal:block tal:define="form_action string:Base_callDialogMethod;\n
                          dialog_id form/id | template/id;\n
+                         form_id request/form_id | string:view;\n
                          dialog_method form/action | dialog_id;\n
                          update_action form/update_action;\n
                          global dialog_category request/dialog_category | nothing;\n
 \n
                          local_parameter_list local_parameter_list | python: {};\n
-                         dummy python: local_parameter_list.update({\'dialog_id\': dialog_id, \'dialog_method\': dialog_method, \'update_method\': update_action, \'dialog_category\': dialog_category});\n
+                         dummy python: local_parameter_list.update({\'dialog_id\': dialog_id, \'dialog_method\': dialog_method, \'update_method\': update_action, \'dialog_category\': dialog_category, \'cancel_url\': request.get(\'cancel_url\'), \'form_id\': form_id});\n
                          title form/title">\n
     <tal:block metal:use-macro="here/main_template/macros/master">\n
       <tal:block metal:fill-slot="main">\n

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/global_definitions.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/global_definitions.xml?rev=10682&r1=10681&r2=10682&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/global_definitions.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/global_definitions.xml Fri Oct 13 10:46:23 2006
@@ -67,8 +67,7 @@
     global js_list   js_list | python: [];\n
            dummy     python: js_list.extend([\'%s/%s\' % (here.portal_url.getPortalPath(), x) for x in here.ERP5XhtmlStyle_getJSList()]);\n
 \n
-    global http_parameter_list  request/form/copy;\n
-           http_parameter_list  python: here.ERP5XhtmlStyle_filterParameterList(http_parameter_list);\n
+    global http_parameter_list  python: here.ERP5XhtmlStyle_filterParameterList(request.form);\n
            dummy                python: http_parameter_list.update(local_parameter_list);\n
     global http_parameters      python: here.ERP5XhtmlStyle_renderHTTPParameterList(http_parameter_list);\n
     global form                 nocall:form | nothing;\n

Added: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/relation_form.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/relation_form.xml?rev=10682&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/relation_form.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/relation_form.xml Fri Oct 13 10:46:23 2006
@@ -1,0 +1,104 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PageTemplates.ZopePageTemplate</string>
+          <string>ZopePageTemplate</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <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_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> <string encoding="cdata"><![CDATA[
+
+<tal:block tal:replace="nothing"\n
+           xmlns:tal="http://xml.zope.org/namespaces/tal"\n
+           xmlns:metal="http://xml.zope.org/namespaces/metal"\n
+           xmlns:i18n="http://xml.zope.org/namespaces/i18n">\n
+<!--\n
+Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.\n
+                   Vincent Pelletier <vincent at nexedi.com>\n
+                   Christophe Dumez <christophe at nexedi.com>\n
+\n
+This program is Free Software; you can redistribute it and/or\n
+modify it under the terms of the GNU General Public License\n
+as published by the Free Software Foundation; either version 2\n
+of the License, or (at your option) any later version.\n
+\n
+This program is distributed in the hope that it will be useful,\n
+but WITHOUT ANY WARRANTY; without even the implied warranty of\n
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n
+GNU General Public License for more details.\n
+\n
+You should have received a copy of the GNU General Public License\n
+along with this program; if not, write to the Free Software\n
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\n
+-->\n
+</tal:block>\n
+<tal:block metal:define-macro="master">\n
+  <tal:block tal:define="local_parameter_list local_parameter_list | python: {};\n
+                         dummy python: local_parameter_list.update({\'field_id\': request[\'field_id\'], \'form_pickle\': request[\'form_pickle\'], \'form_signature\': request[\'form_signature\']});">\n
+    <tal:block metal:use-macro="here/form_dialog/macros/master" />\n
+  </tal:block>\n
+</tal:block>\n
+
+
+]]></string> </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>relation_form</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>




More information about the Erp5-report mailing list