From 4302220a45d0c9f725c7edf5fc6c30b548e91b6c Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Tue, 9 Nov 2010 15:59:02 +0000 Subject: [PATCH] When generating an image URLfor FCKEditor include its format (use preferences) which is mandatory in order to produce an image output. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@40124 20353a03-c40f-0410-a6d1-a30d3c3de9de --- .../erp5_dms/FCKeditor_getSetReferenceUrl.xml | 10 +++++----- bt5/erp5_dms/bt/revision | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/FCKeditor_getSetReferenceUrl.xml b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/FCKeditor_getSetReferenceUrl.xml index 4a5d4ad819..7f5465a933 100644 --- a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/FCKeditor_getSetReferenceUrl.xml +++ b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/FCKeditor_getSetReferenceUrl.xml @@ -2,10 +2,7 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <tuple> - <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> - <tuple/> - </tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> </pickle> <pickle> <dictionary> @@ -59,7 +56,8 @@ if brain.getValidationState() == \'embedded\':\n reference = brain.getId()\n else:\n reference = brain.getReference()\n -return "javascript:SelectFile(\'%s\')" % reference.replace("\'", "\\\\\'")\n +format = context.getPortalObject().portal_preferences.getPreferredImageFormat()\n +return "javascript:SelectFile(\'%s?format=%s\')" % (reference.replace("\'", "\\\\\'"), format)\n </string> </value> </item> <item> @@ -100,6 +98,8 @@ return "javascript:SelectFile(\'%s\')" % reference.replace("\'", "\\\\\'")\n <string>kw</string> <string>_getattr_</string> <string>reference</string> + <string>context</string> + <string>format</string> </tuple> </value> </item> diff --git a/bt5/erp5_dms/bt/revision b/bt5/erp5_dms/bt/revision index 29001eb5b1..b5811ff883 100644 --- a/bt5/erp5_dms/bt/revision +++ b/bt5/erp5_dms/bt/revision @@ -1 +1 @@ -1206 \ No newline at end of file +1207 \ No newline at end of file -- 2.30.9