Commit 0180d6b6 authored by Rafael Monnerat's avatar Rafael Monnerat

Modified scripts (from context bar only) to update the selection with the last...

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
parent f8496898
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -70,6 +67,8 @@ ...@@ -70,6 +67,8 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string encoding="cdata"><![CDATA[
context.Base_updateListboxSelection()\n
\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
N_ = portal.Base_translateString\n N_ = portal.Base_translateString\n
\n \n
...@@ -201,6 +200,7 @@ return getattr(context,form_id)(request)\n ...@@ -201,6 +200,7 @@ return getattr(context,form_id)(request)\n
<string>doAction0</string> <string>doAction0</string>
<string>request</string> <string>request</string>
<string>uri</string> <string>uri</string>
<string>_inplacevar_</string>
<string>None</string> <string>None</string>
<string>new_id</string> <string>new_id</string>
<string>type_name</string> <string>type_name</string>
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -70,6 +67,8 @@ ...@@ -70,6 +67,8 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>from ZTUtils import make_query\n <value> <string>from ZTUtils import make_query\n
\n \n
context.Base_updateListboxSelection()\n
\n
Base_doAction = dialog_select.split()\n Base_doAction = dialog_select.split()\n
doAction0 = Base_doAction[0]\n doAction0 = Base_doAction[0]\n
request = context.REQUEST\n request = context.REQUEST\n
...@@ -129,10 +128,10 @@ return request.RESPONSE.redirect(doAction0 + \'?%s\' % make_query(\n ...@@ -129,10 +128,10 @@ return request.RESPONSE.redirect(doAction0 + \'?%s\' % make_query(\n
<string>ZTUtils</string> <string>ZTUtils</string>
<string>make_query</string> <string>make_query</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string>
<string>Base_doAction</string> <string>Base_doAction</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>doAction0</string> <string>doAction0</string>
<string>context</string>
<string>request</string> <string>request</string>
</tuple> </tuple>
</value> </value>
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -68,7 +65,10 @@ ...@@ -68,7 +65,10 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <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 if jump_select : \n
Base_doAction = jump_select.split()\n Base_doAction = jump_select.split()\n
doAction0 = Base_doAction[0]\n doAction0 = Base_doAction[0]\n
...@@ -119,12 +119,12 @@ if jump_select : \n ...@@ -119,12 +119,12 @@ if jump_select : \n
<tuple> <tuple>
<string>jump_select</string> <string>jump_select</string>
<string>form_id</string> <string>form_id</string>
<string>string</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string>
<string>string</string>
<string>Base_doAction</string> <string>Base_doAction</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>doAction0</string> <string>doAction0</string>
<string>context</string>
<string>request</string> <string>request</string>
</tuple> </tuple>
</value> </value>
......
...@@ -67,6 +67,8 @@ ...@@ -67,6 +67,8 @@
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""This is the action for the Base_viewPrintDialog.\n <value> <string>"""This is the action for the Base_viewPrintDialog.\n
"""\n """\n
# prevent lose checked itens after click to print\n
context.Base_updateListboxSelection()\n
\n \n
if target_language:\n if target_language:\n
container.REQUEST[\'AcceptLanguage\'].set(target_language, 10)\n container.REQUEST[\'AcceptLanguage\'].set(target_language, 10)\n
...@@ -128,9 +130,9 @@ return getattr(context, form_id)()\n ...@@ -128,9 +130,9 @@ return getattr(context, form_id)()\n
<string>target_language</string> <string>target_language</string>
<string>kw</string> <string>kw</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>container</string> <string>container</string>
<string>context</string>
<string>getattr</string> <string>getattr</string>
</tuple> </tuple>
</value> </value>
......
659 661
\ No newline at end of file \ No newline at end of file
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -73,6 +70,9 @@ N_ = portal.Base_translateString\n ...@@ -73,6 +70,9 @@ N_ = portal.Base_translateString\n
preserved_parameters={\'form_id\': form_id, \'cancel_url\': cancel_url}\n preserved_parameters={\'form_id\': form_id, \'cancel_url\': cancel_url}\n
request = context.REQUEST\n request = context.REQUEST\n
\n \n
# prevent lose checked itens after click to print\n
context.Base_updateListboxSelection()\n
\n
Base_doAction = select_action.split()\n Base_doAction = select_action.split()\n
if len(Base_doAction) == 0:\n if len(Base_doAction) == 0:\n
return\n return\n
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -68,7 +65,10 @@ ...@@ -68,7 +65,10 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <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 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> </string> </value>
</item> </item>
......
...@@ -3,11 +3,8 @@ ...@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE="> <record id="1" aka="AAAAAAAAAAE=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<string>Products.PythonScripts.PythonScript</string> <tuple/>
<string>PythonScript</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -68,7 +65,10 @@ ...@@ -68,7 +65,10 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <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 return\n
\n \n
request = container.REQUEST\n request = container.REQUEST\n
...@@ -125,10 +125,10 @@ return context.ERP5Site_redirect(select_jump,\n ...@@ -125,10 +125,10 @@ return context.ERP5Site_redirect(select_jump,\n
<string>select_jump</string> <string>select_jump</string>
<string>kw</string> <string>kw</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string>
<string>container</string> <string>container</string>
<string>request</string> <string>request</string>
<string>_apply_</string> <string>_apply_</string>
<string>context</string>
<string>dict</string> <string>dict</string>
</tuple> </tuple>
</value> </value>
......
476 479
\ No newline at end of file \ 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