[Erp5-report] r18021 - in /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style: SkinTemplat...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Dec 5 15:50:28 CET 2007
Author: jerome
Date: Wed Dec 5 15:50:28 2007
New Revision: 18021
URL: http://svn.erp5.org?rev=18021&view=rev
Log:
Add an implicit print dialog for print action that doesn't use a dialog.
Added:
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_fixDialogActions.xml
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_redirectToDialogAction.xml
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_viewIntermediatePrintDialog/
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_viewIntermediatePrintDialog.xml
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_viewIntermediatePrintDialog/your_dialog_action_url.xml
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5Site_getCurrentDialogAction.xml
Modified:
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/form_dialog.xml
erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision
Added: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_fixDialogActions.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_fixDialogActions.xml?rev=18021&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_fixDialogActions.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_fixDialogActions.xml Wed Dec 5 15:50:28 2007
@@ -1,0 +1,188 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
+ </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>"""This script fix dialog actions to add an empty dialog for object_print\n
+actions that does not provide one.\n
+"""\n
+from Products.PythonScripts.standard import url_quote\n
+\n
+if dialog_category != \'object_print\':\n
+ return actions.get(dialog_category, [])\n
+\n
+def addDialogIfNeeded(url):\n
+ \'\'\'If the action url is not a dialog, we add a generic print dialog.\n
+ \'\'\'\n
+ parts = url.split(\'/\')\n
+ absolute_url = \'/\'.join(parts[:-1])\n
+ action = parts[-1]\n
+ action_id = action.split(\'?\')[0]\n
+ form = getattr(context, action_id, None)\n
+ if form is not None and getattr(form, \'pt\', None) != \'form_dialog\':\n
+ url = \'%s/Base_viewIntermediatePrintDialog?dialog_action_url=%s\' % (\n
+ context.absolute_url(), url_quote(\'%s/%s\' % (absolute_url, action)))\n
+ return url\n
+\n
+print_action_list = actions[\'object_print\']\n
+new_print_action_list = []\n
+for ai in print_action_list:\n
+ ai_copy = ai.copy()\n
+ # this is quite low level. It may require to be done from file system code in\n
+ # the future.\n
+ ai_copy.data[\'original_url\'] = ai_copy[\'url\']\n
+ ai_copy.data[\'url\'] = addDialogIfNeeded(ai_copy[\'url\'])\n
+ new_print_action_list.append( ai_copy )\n
+\n
+return new_print_action_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>actions, dialog_category</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>2</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>actions</string>
+ <string>dialog_category</string>
+ <string>Products.PythonScripts.standard</string>
+ <string>url_quote</string>
+ <string>_getattr_</string>
+ <string>addDialogIfNeeded</string>
+ <string>_getitem_</string>
+ <string>print_action_list</string>
+ <string>new_print_action_list</string>
+ <string>_getiter_</string>
+ <string>ai</string>
+ <string>ai_copy</string>
+ <string>_write_</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>Base_fixDialogActions</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_redirectToDialogAction.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_redirectToDialogAction.xml?rev=18021&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_redirectToDialogAction.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_redirectToDialogAction.xml Wed Dec 5 15:50:28 2007
@@ -1,0 +1,147 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
+ </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>return container.REQUEST.RESPONSE.redirect(dialog_action_url)\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>dialog_action_url</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>1</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>dialog_action_url</string>
+ <string>_getattr_</string>
+ <string>container</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>Base_redirectToDialogAction</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_viewIntermediatePrintDialog.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_viewIntermediatePrintDialog.xml?rev=18021&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_viewIntermediatePrintDialog.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_viewIntermediatePrintDialog.xml Wed Dec 5 15:50:28 2007
@@ -1,0 +1,157 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="ERP5Form" module="Products.ERP5Form.Form"/>
+ <tuple/>
+ </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/>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_objects</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_owner</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>action</string> </key>
+ <value> <string>Base_redirectToDialogAction</string> </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>encoding</string> </key>
+ <value> <string>UTF-8</string> </value>
+ </item>
+ <item>
+ <key> <string>enctype</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>group_list</string> </key>
+ <value>
+ <list>
+ <string>left</string>
+ <string>right</string>
+ <string>center</string>
+ <string>bottom</string>
+ <string>hidden</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>groups</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>bottom</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>center</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>hidden</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ <item>
+ <key> <string>left</string> </key>
+ <value>
+ <list>
+ <string>your_dialog_action_url</string>
+ </list>
+ </value>
+ </item>
+ <item>
+ <key> <string>right</string> </key>
+ <value>
+ <list/>
+ </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>Base_viewIntermediatePrintDialog</string> </value>
+ </item>
+ <item>
+ <key> <string>method</string> </key>
+ <value> <string>POST</string> </value>
+ </item>
+ <item>
+ <key> <string>name</string> </key>
+ <value> <string>Folder_viewPrintDialog</string> </value>
+ </item>
+ <item>
+ <key> <string>pt</string> </key>
+ <value> <string>form_dialog</string> </value>
+ </item>
+ <item>
+ <key> <string>row_length</string> </key>
+ <value> <int>4</int> </value>
+ </item>
+ <item>
+ <key> <string>stored_encoding</string> </key>
+ <value> <string>UTF-8</string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string>Print</string> </value>
+ </item>
+ <item>
+ <key> <string>unicode_mode</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>update_action</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_viewIntermediatePrintDialog/your_dialog_action_url.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_viewIntermediatePrintDialog/your_dialog_action_url.xml?rev=18021&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_viewIntermediatePrintDialog/your_dialog_action_url.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_viewIntermediatePrintDialog/your_dialog_action_url.xml Wed Dec 5 15:50:28 2007
@@ -1,0 +1,281 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="StringField" module="Products.Formulator.StandardFields"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>your_dialog_action_url</string> </value>
+ </item>
+ <item>
+ <key> <string>message_values</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>external_validator_failed</string> </key>
+ <value> <string>The input failed the external validator.</string> </value>
+ </item>
+ <item>
+ <key> <string>required_not_found</string> </key>
+ <value> <string>Input is required but no input given.</string> </value>
+ </item>
+ <item>
+ <key> <string>too_long</string> </key>
+ <value> <string>Too much input was given.</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>overrides</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>alternate_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>css_class</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>default</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>display_maxwidth</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>display_width</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>editable</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>enabled</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>external_validator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>extra</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>hidden</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_length</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>required</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>truncate</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>unicode</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>whitespace_preserve</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>tales</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>alternate_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>css_class</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>default</string> </key>
+ <value>
+ <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
+ </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>display_maxwidth</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>display_width</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>editable</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>enabled</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>external_validator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>extra</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>hidden</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>max_length</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>required</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>truncate</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>unicode</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>whitespace_preserve</string> </key>
+ <value> <string></string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ <item>
+ <key> <string>values</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>alternate_name</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>css_class</string> </key>
+ <value> <string>invisible</string> </value>
+ </item>
+ <item>
+ <key> <string>default</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>description</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>display_maxwidth</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>display_width</string> </key>
+ <value> <int>20</int> </value>
+ </item>
+ <item>
+ <key> <string>editable</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>enabled</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>external_validator</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>extra</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>hidden</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>max_length</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
+ <key> <string>required</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>title</string> </key>
+ <value> <string>Action</string> </value>
+ </item>
+ <item>
+ <key> <string>truncate</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>unicode</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ <item>
+ <key> <string>whitespace_preserve</string> </key>
+ <value> <int>0</int> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+ <record id="2" aka="AAAAAAAAAAI=">
+ <pickle>
+ <tuple>
+ <global name="TALESMethod" module="Products.Formulator.TALESField"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>_text</string> </key>
+ <value> <string>request/dialog_action_url</string> </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5Site_getCurrentDialogAction.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5Site_getCurrentDialogAction.xml?rev=18021&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5Site_getCurrentDialogAction.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5Site_getCurrentDialogAction.xml Wed Dec 5 15:50:28 2007
@@ -1,0 +1,163 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
+ </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>request = container.REQUEST\n
+if \'dialog_action_url\' in request:\n
+ current_url = request[\'dialog_action_url\']\n
+ for action in dialog_actions:\n
+ if current_url == action[\'original_url\']:\n
+ return action\n
+else:\n
+ for action in dialog_actions:\n
+ if current_url == action[\'url\'].split(\'?\')[0]:\n
+ return action\n
+return None\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>current_url, dialog_actions</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>2</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>current_url</string>
+ <string>dialog_actions</string>
+ <string>_getattr_</string>
+ <string>container</string>
+ <string>request</string>
+ <string>_getitem_</string>
+ <string>_getiter_</string>
+ <string>action</string>
+ <string>None</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>ERP5Site_getCurrentDialogAction</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
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=18021&r1=18020&r2=18021&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 Wed Dec 5 15:50:28 2007
@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
- <tuple>
- <string>Products.PythonScripts.PythonScript</string>
- <string>PythonScript</string>
- </tuple>
- <none/>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
</tuple>
</pickle>
<pickle>
@@ -68,17 +65,18 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string>kw.update(context.REQUEST.form)\n
+ <value> <string>request = container.REQUEST\n
+kw.update(request.form)\n
context.ERP5Site_prepareAction(**kw)\n
\n
-print_action_list = context.Base_filterDuplicateActions(\n
- context.portal_actions.listFilteredActionsFor(context))[\'object_print\']\n
-if len(print_action_list) == 0:\n
- return\n
-if len(print_action_list) == 1:\n
- return context.ERP5Site_redirect(print_action_list[0][\'url\'], keep_items={\'form_id\': form_id}, **kw)\n
-else:\n
- return context.ERP5Site_redirect(\'%s/Base_print\' % (context.absolute_url(), ), keep_items={\'dialog_category\': \'object_print\', \'form_id\': form_id, \'cancel_url\': cancel_url}, **kw)\n
+new_print_action_list = context.Base_fixDialogActions(\n
+ context.Base_filterDuplicateActions(\n
+ context.portal_actions.listFilteredActionsFor(context)), \'object_print\')\n
+\n
+return context.ERP5Site_redirect(new_print_action_list[0][\'url\'],\n
+ keep_items={\'form_id\': form_id,\n
+ \'cancel_url\': cancel_url,\n
+ \'dialog_category\': \'object_print\'}, **kw)\n
</string> </value>
</item>
<item>
@@ -131,11 +129,12 @@
<string>cancel_url</string>
<string>kw</string>
<string>_getattr_</string>
+ <string>container</string>
+ <string>request</string>
+ <string>_apply_</string>
<string>context</string>
- <string>_apply_</string>
+ <string>new_print_action_list</string>
<string>_getitem_</string>
- <string>print_action_list</string>
- <string>len</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_dialog.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_dialog.xml?rev=18021&r1=18020&r2=18021&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_dialog.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/form_dialog.xml Wed Dec 5 15:50:28 2007
@@ -65,7 +65,8 @@
left_group python: form.get_fields_in_group(\'left\');\n
right_group python: form.get_fields_in_group(\'right\');\n
center_group python: form.get_fields_in_group(\'center\');\n
- dialog_actions python: actions.get(dialog_category, []);\n
+ dialog_actions python: here.Base_fixDialogActions(actions, dialog_category);\n
+ current_action python: here.ERP5Site_getCurrentDialogAction(current_url, dialog_actions);\n
field_render here/field_render/macros/field_render;">\n
<tal:block tal:condition="preferred_html_style_developper_mode">\n
<tal:block metal:use-macro="developper_shortcut_render/macros/form" />\n
@@ -83,6 +84,7 @@
i18n:translate="" i18n:domain="ui"></label>\n
<select name="select_dialog" id="dialog_selector"\n
tal:attributes="onChange string:submitAction(this.form,\'Base_doDialog\')">\n
+\n
<tal:block tal:repeat="action dialog_actions">\n
<option tal:attributes="value action/url;\n
selected python: action == current_action and \'selected\' or None"\n
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision?rev=18021&r1=18020&r2=18021&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision Wed Dec 5 15:50:28 2007
@@ -1,1 +1,1 @@
-453
+454
More information about the Erp5-report
mailing list