Commit 60fc8810 authored by Jérome Perrin's avatar Jérome Perrin

don't iterate in all actions, only object_view

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37384 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f2418548
...@@ -53,20 +53,12 @@ ...@@ -53,20 +53,12 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[ <value> <string># Return the current action to know which tab is selected\n
# Return the current action to know which tab we should select\n
# Christophe Dumez <christophe@nexedi.com>\n
\n \n
for action_list in actions.values():\n for action in actions[\'object_view\']:\n
for action in action_list:\n if current_url == action[\'url\'].split(\'?\')[0]:\n
if action[\'category\'] in (\'object_view\', \'object_button\') and \\\n return action\n
current_url == action[\'url\'].split(\'?\')[0]:\n </string> </value>
return action\n
return None\n
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
...@@ -105,11 +97,9 @@ return None\n ...@@ -105,11 +97,9 @@ return None\n
<string>current_url</string> <string>current_url</string>
<string>actions</string> <string>actions</string>
<string>_getiter_</string> <string>_getiter_</string>
<string>_getattr_</string>
<string>action_list</string>
<string>action</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>None</string> <string>action</string>
<string>_getattr_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
1641 1642
\ 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