From: Benoît Pin Date: Tue, 16 Aug 2011 11:03:55 +0000 (+0200) Subject: On va quand même mettre config.js en python, car le config.basePath de ckeditor est... X-Git-Tag: 3.6.1~25 X-Git-Url: https://svn.cri.ensmp.fr/git/ckeditor.git/commitdiff_plain/162c461e504567a6725da2e56932d942a1719bdc On va quand même mettre config.js en python, car le config.basePath de ckeditor est foirasse. --- diff --git a/skins/ckeditor/config.js b/skins/ckeditor/config.js.py similarity index 77% rename from skins/ckeditor/config.js rename to skins/ckeditor/config.js.py index 1ce2adb..3c00463 100644 --- a/skins/ckeditor/config.js +++ b/skins/ckeditor/config.js.py @@ -1,4 +1,10 @@ -/* +##parameters= +from Products.CMFCore.utils import getToolByName +context.REQUEST.RESPONSE.setHeader('content-type', 'application/javascript; charset=utf-8') +utool = getToolByName(context, 'portal_url') + +print """ +/* Copyright (c) 2003-2011, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ @@ -22,4 +28,6 @@ CKEDITOR.editorConfig = function( config ) ]; config.height = '500px'; -}; + config.filebrowserBrowseUrl = '%(portal_url)s'; +};""" % {'portal_url' : utool()} +return printed