Commit 473cfd14 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use 'id' as the relative url for embedded document.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29186 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0f69875c
...@@ -53,7 +53,12 @@ ...@@ -53,7 +53,12 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>reference = brain.getObject().getReference() or \'\'\n <value> <string># use \'id\' for embedded document, and use \'reference\' for non-embedded document.\n
# XXX the condition should be changed when we introduce Embedded Image / File portal type.\n
if brain.getValidationState() == \'embedded\':\n
reference = brain.getId()\n
else:\n
reference = brain.getReference()\n
return "javascript:SelectFile(\'%s\')" % reference.replace("\'", "\\\\\'")\n return "javascript:SelectFile(\'%s\')" % reference.replace("\'", "\\\\\'")\n
</string> </value> </string> </value>
</item> </item>
......
1036 1037
\ 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