Commit aee646db authored by Vincent Pelletier's avatar Vincent Pelletier

Add compatibility code to allow upgrading a versoin of erp5_core which does...

Add compatibility code to allow upgrading a versoin of erp5_core which does not contain Base_updateListboxSelection after upgrading erp5_xhtml_style.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19167 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8a573fdf
......@@ -71,7 +71,11 @@ preserved_parameters={\'form_id\': form_id, \'cancel_url\': cancel_url}\n
request = context.REQUEST\n
\n
# prevent lose checked itens after click to print\n
context.Base_updateListboxSelection()\n
# For backward compatibility, do nothing if\n
# Base_updateListboxSelection cannot be found.\n
Base_updateListboxSelection = getattr(context, \'Base_updateListboxSelection\', None)\n
if Base_updateListboxSelection is not None:\n
Base_updateListboxSelection()\n
\n
Base_doAction = select_action.split()\n
if len(Base_doAction) == 0:\n
......@@ -178,6 +182,9 @@ return context.ERP5Site_redirect(redirect_url, keep_items=preserved_parameters,
<string>N_</string>
<string>preserved_parameters</string>
<string>request</string>
<string>getattr</string>
<string>None</string>
<string>Base_updateListboxSelection</string>
<string>Base_doAction</string>
<string>len</string>
<string>_getitem_</string>
......@@ -189,7 +196,6 @@ return context.ERP5Site_redirect(redirect_url, keep_items=preserved_parameters,
<string>type_name</string>
<string>str</string>
<string>new_content</string>
<string>None</string>
<string>template_relative_url</string>
<string>template</string>
<string>preference</string>
......
......@@ -66,7 +66,11 @@
<item>
<key> <string>_body</string> </key>
<value> <string># prevent lose checked itens at listbox after click to print\n
context.Base_updateListboxSelection()\n
# For backward compatibility, do nothing if\n
# Base_updateListboxSelection cannot be found.\n
Base_updateListboxSelection = getattr(context, \'Base_updateListboxSelection\', None)\n
if Base_updateListboxSelection is not None:\n
Base_updateListboxSelection()\n
\n
kw.update(context.REQUEST.form)\n
return context.ERP5Site_redirect(select_dialog.split()[0], keep_items={\'dialog_category\': dialog_category, \'form_id\': form_id, \'cancel_url\': cancel_url}, **kw)\n
......@@ -123,8 +127,11 @@ return context.ERP5Site_redirect(select_dialog.split()[0], keep_items={\'dialog_
<string>form_id</string>
<string>cancel_url</string>
<string>kw</string>
<string>_getattr_</string>
<string>getattr</string>
<string>context</string>
<string>None</string>
<string>Base_updateListboxSelection</string>
<string>_getattr_</string>
<string>_apply_</string>
<string>_getitem_</string>
</tuple>
......
......@@ -66,7 +66,11 @@
<item>
<key> <string>_body</string> </key>
<value> <string># prevent lose checked itens after click to print\n
context.Base_updateListboxSelection()\n
# For backward compatibility, do nothing if\n
# Base_updateListboxSelection cannot be found.\n
Base_updateListboxSelection = getattr(context, \'Base_updateListboxSelection\', None)\n
if Base_updateListboxSelection is not None:\n
Base_updateListboxSelection()\n
\n
if select_jump == \'\':\n
return\n
......@@ -124,8 +128,11 @@ return context.ERP5Site_redirect(select_jump,\n
<tuple>
<string>select_jump</string>
<string>kw</string>
<string>_getattr_</string>
<string>getattr</string>
<string>context</string>
<string>None</string>
<string>Base_updateListboxSelection</string>
<string>_getattr_</string>
<string>container</string>
<string>request</string>
<string>_apply_</string>
......
489
\ No newline at end of file
490
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment