[Erp5-report] r35714 yo - in /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style: SkinTemp...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri May 28 12:42:33 CEST 2010


Author: yo
Date: Fri May 28 12:42:32 2010
New Revision: 35714

URL: http://svn.erp5.org?rev=35714&view=rev
Log:
2010-05-28 yo
* Make it possible to customize the behavior after a new content is added.

Added:
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_getRedirectParameterDictAfterAdd.xml
Modified:
    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/bt/change_log
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/description
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision

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=35714&r1=35713&r2=35714&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doAction.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doAction.xml [utf8] Fri May 28 12:42:32 2010
@@ -89,10 +89,13 @@
                                    container=context)\n
   preserved_parameters[\'portal_status_message\'] = Base_translateString("Object created.")\n
   preserved_parameters[\'editable_mode\'] = 1\n
-  redirect_url = \'%s/view\' % (new_content.absolute_url(), )\n
-  # The created object is not a part of the selection, so prevent from displaying the selection navigation controls\n
-  kw[\'selection_index\']=None\n
-  kw[\'selection_name\']=None\n
+  try:\n
+    tmp_kw = new_content.getRedirectParameterDictAfterAdd(context, **kw)\n
+  except AttributeError:\n
+    # Maybe the Product is not upgraded yet.\n
+    tmp_kw = new_content.Base_getRedirectParameterDictAfterAdd(context, **kw)\n
+  redirect_url = tmp_kw.pop(\'redirect_url\', new_content.absolute_url() + \'/view\')\n
+  kw.update(tmp_kw)\n
 # Otherwise, check if this is an automatic menu (template)\n
 elif doAction0 == \'template\':\n
   template_relative_url = \' \'.join(Base_doAction[1:])\n
@@ -169,16 +172,16 @@
                             <string>doAction0</string>
                             <string>redirect_url</string>
                             <string>_write_</string>
-                            <string>new_id</string>
                             <string>type_name</string>
-                            <string>str</string>
                             <string>new_content</string>
+                            <string>_apply_</string>
+                            <string>tmp_kw</string>
+                            <string>AttributeError</string>
                             <string>template_relative_url</string>
                             <string>template</string>
                             <string>preference</string>
                             <string>new_content_list</string>
                             <string>new_content_id</string>
-                            <string>_apply_</string>
                           </tuple>
                         </value>
                     </item>

Added: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_getRedirectParameterDictAfterAdd.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_getRedirectParameterDictAfterAdd.xml?rev=35714&view=auto
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_getRedirectParameterDictAfterAdd.xml (added)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_getRedirectParameterDictAfterAdd.xml [utf8] Fri May 28 12:42:32 2010
@@ -1,0 +1,127 @@
+<?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>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># This is the default method for a redirection after being added.\n
+return dict(redirect_url=context.absolute_url() + \'/view\', selection_index=None, selection_name=None)\n
+</string> </value>
+        </item>
+        <item>
+            <key> <string>_code</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_params</string> </key>
+            <value> <string>folder, **kw</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>folder</string>
+                            <string>kw</string>
+                            <string>dict</string>
+                            <string>_getattr_</string>
+                            <string>context</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>Base_getRedirectParameterDictAfterAdd</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/bt/change_log
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/change_log?rev=35714&r1=35713&r2=35714&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/change_log [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/change_log [utf8] Fri May 28 12:42:32 2010
@@ -1,3 +1,6 @@
+2010-05-28 yo
+* Make it possible to customize the behavior after a new content is added.
+
 2010-03-09
 * Display title in breadcrumb if getCompactTranslatedTitle does not exist.
 

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/description
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/description?rev=35714&r1=35713&r2=35714&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/description [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/description [utf8] Fri May 28 12:42:32 2010
@@ -1,3 +1,3 @@
-This style is a rewrite of erp5_html_style more CSS and semantic html oriented.
-
+This style is a rewrite of erp5_html_style more CSS and semantic html oriented.
+
 Handles page parameters dynamically.

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=35714&r1=35713&r2=35714&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision [utf8] Fri May 28 12:42:32 2010
@@ -1,1 +1,1 @@
-948
+949




More information about the Erp5-report mailing list