From 162c461e504567a6725da2e56932d942a1719bdc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Beno=C3=AEt=20Pin?= Date: Tue, 16 Aug 2011 13:03:55 +0200 Subject: [PATCH] =?utf8?q?On=20va=20quand=20m=C3=AAme=20mettre=20config.js?= =?utf8?q?=20en=20python,=20car=20le=20config.basePath=20de=20ckeditor=20e?= =?utf8?q?st=20foirasse.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/ckeditor/{config.js => config.js.py} | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) rename skins/ckeditor/{config.js => config.js.py} (77%) 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 -- 2.20.1