From 0180d6b61b977849073ab275f6ed9d66552ab339 Mon Sep 17 00:00:00 2001 From: Rafael Monnerat <rafael@nexedi.com> Date: Wed, 26 Dec 2007 16:19:43 +0000 Subject: [PATCH] Modified scripts (from context bar only) to update the selection with the last (un)checked itens from listbox. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18525 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../portal_skins/erp5_core/Base_doAction.xml | 10 +++++----- .../portal_skins/erp5_core/Base_doDialog.xml | 11 +++++------ .../portal_skins/erp5_core/Base_doJump.xml | 16 ++++++++-------- .../portal_skins/erp5_core/Base_doPrint.xml | 4 +++- product/ERP5/bootstrap/erp5_core/bt/revision | 2 +- .../erp5_xhtml_style/Base_doAction.xml | 10 +++++----- .../erp5_xhtml_style/Base_doDialog.xml | 12 ++++++------ .../erp5_xhtml_style/Base_doJump.xml | 14 +++++++------- .../ERP5/bootstrap/erp5_xhtml_style/bt/revision | 2 +- 9 files changed, 41 insertions(+), 40 deletions(-) diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doAction.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doAction.xml index 3d753767d2..0871a74f48 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doAction.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doAction.xml @@ -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> @@ -70,6 +67,8 @@ <key> <string>_body</string> </key> <value> <string encoding="cdata"><![CDATA[ +context.Base_updateListboxSelection()\n +\n portal = context.getPortalObject()\n N_ = portal.Base_translateString\n \n @@ -201,6 +200,7 @@ return getattr(context,form_id)(request)\n <string>doAction0</string> <string>request</string> <string>uri</string> + <string>_inplacevar_</string> <string>None</string> <string>new_id</string> <string>type_name</string> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doDialog.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doDialog.xml index d77ab07d56..831e8e8235 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doDialog.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doDialog.xml @@ -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> @@ -70,6 +67,8 @@ <key> <string>_body</string> </key> <value> <string>from ZTUtils import make_query\n \n +context.Base_updateListboxSelection()\n +\n Base_doAction = dialog_select.split()\n doAction0 = Base_doAction[0]\n request = context.REQUEST\n @@ -129,10 +128,10 @@ return request.RESPONSE.redirect(doAction0 + \'?%s\' % make_query(\n <string>ZTUtils</string> <string>make_query</string> <string>_getattr_</string> + <string>context</string> <string>Base_doAction</string> <string>_getitem_</string> <string>doAction0</string> - <string>context</string> <string>request</string> </tuple> </value> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doJump.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doJump.xml index 7729c8d7d4..9d8064d0f7 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doJump.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doJump.xml @@ -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,7 +65,10 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>import string\n + <value> <string># prevent lose checked itens after click to print\n +context.Base_updateListboxSelection()\n +\n +import string\n if jump_select : \n Base_doAction = jump_select.split()\n doAction0 = Base_doAction[0]\n @@ -119,12 +119,12 @@ if jump_select : \n <tuple> <string>jump_select</string> <string>form_id</string> - <string>string</string> <string>_getattr_</string> + <string>context</string> + <string>string</string> <string>Base_doAction</string> <string>_getitem_</string> <string>doAction0</string> - <string>context</string> <string>request</string> </tuple> </value> diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doPrint.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doPrint.xml index 5c255f8517..8caec0db7d 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doPrint.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_doPrint.xml @@ -67,6 +67,8 @@ <key> <string>_body</string> </key> <value> <string>"""This is the action for the Base_viewPrintDialog.\n """\n +# prevent lose checked itens after click to print\n +context.Base_updateListboxSelection()\n \n if target_language:\n container.REQUEST[\'AcceptLanguage\'].set(target_language, 10)\n @@ -128,9 +130,9 @@ return getattr(context, form_id)()\n <string>target_language</string> <string>kw</string> <string>_getattr_</string> + <string>context</string> <string>_getitem_</string> <string>container</string> - <string>context</string> <string>getattr</string> </tuple> </value> diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index 5cb222c0b2..c21b7b4a7d 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -659 \ No newline at end of file +661 \ No newline at end of file diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doAction.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doAction.xml index 6a5f93c19c..3b1534c0a5 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doAction.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doAction.xml @@ -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> @@ -73,6 +70,9 @@ N_ = portal.Base_translateString\n 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 +\n Base_doAction = select_action.split()\n if len(Base_doAction) == 0:\n return\n diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doDialog.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doDialog.xml index d5a8e05962..382d62b5f1 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doDialog.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doDialog.xml @@ -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,7 +65,10 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>kw.update(context.REQUEST.form)\n + <value> <string># prevent lose checked itens at listbox after click to print\n +context.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 </string> </value> </item> diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doJump.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doJump.xml index d0655824ac..210ed0e43b 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doJump.xml +++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Base_doJump.xml @@ -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,7 +65,10 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>if select_jump == \'\':\n + <value> <string># prevent lose checked itens after click to print\n +context.Base_updateListboxSelection()\n +\n +if select_jump == \'\':\n return\n \n request = container.REQUEST\n @@ -125,10 +125,10 @@ return context.ERP5Site_redirect(select_jump,\n <string>select_jump</string> <string>kw</string> <string>_getattr_</string> + <string>context</string> <string>container</string> <string>request</string> <string>_apply_</string> - <string>context</string> <string>dict</string> </tuple> </value> diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision index d7b14a6c47..941d0e591f 100644 --- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision +++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision @@ -1 +1 @@ -476 \ No newline at end of file +479 \ No newline at end of file -- 2.30.9