From 2f7271580a298c241e3070c60c0b38edc73c6261 Mon Sep 17 00:00:00 2001 From: Tristan Cavelier <tristan.cavelier@nexedi.com> Date: Tue, 25 Jul 2017 12:34:54 +0000 Subject: [PATCH] erp5_xinha_editor: allow override xinha css author: Sven Franck --- .../erp5_xinha_editor/xinha/LoadEditor.js.js | 1 + .../erp5_xinha_editor/xinha_custom.css.css | 1 + .../erp5_xinha_editor/xinha_custom.css.xml | 28 +++++++++++++++++++ .../erp5_xinha_editor/xinha_support.zpt | 2 +- 4 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 bt5/erp5_xinha_editor/SkinTemplateItem/portal_skins/erp5_xinha_editor/xinha_custom.css.css create mode 100644 bt5/erp5_xinha_editor/SkinTemplateItem/portal_skins/erp5_xinha_editor/xinha_custom.css.xml diff --git a/bt5/erp5_xinha_editor/SkinTemplateItem/portal_skins/erp5_xinha_editor/xinha/LoadEditor.js.js b/bt5/erp5_xinha_editor/SkinTemplateItem/portal_skins/erp5_xinha_editor/xinha/LoadEditor.js.js index 4a1afd65aa..f2c7f3d1a7 100644 --- a/bt5/erp5_xinha_editor/SkinTemplateItem/portal_skins/erp5_xinha_editor/xinha/LoadEditor.js.js +++ b/bt5/erp5_xinha_editor/SkinTemplateItem/portal_skins/erp5_xinha_editor/xinha/LoadEditor.js.js @@ -9,6 +9,7 @@ function xinha_init() { if(!Xinha.loadPlugins(xinha_plugins, xinha_init)) return; var xinha_config = new Xinha.Config(); + xinha_config.pageStyleSheets = ["xinha_custom.css"]; xinha_editors = Xinha.makeEditors(xinha_editors, xinha_config, xinha_plugins); Xinha.startEditors(xinha_editors); } diff --git a/bt5/erp5_xinha_editor/SkinTemplateItem/portal_skins/erp5_xinha_editor/xinha_custom.css.css b/bt5/erp5_xinha_editor/SkinTemplateItem/portal_skins/erp5_xinha_editor/xinha_custom.css.css new file mode 100644 index 0000000000..1a217b8621 --- /dev/null +++ b/bt5/erp5_xinha_editor/SkinTemplateItem/portal_skins/erp5_xinha_editor/xinha_custom.css.css @@ -0,0 +1 @@ +/* override from other portal skins */ \ No newline at end of file diff --git a/bt5/erp5_xinha_editor/SkinTemplateItem/portal_skins/erp5_xinha_editor/xinha_custom.css.xml b/bt5/erp5_xinha_editor/SkinTemplateItem/portal_skins/erp5_xinha_editor/xinha_custom.css.xml new file mode 100644 index 0000000000..d2e303c39d --- /dev/null +++ b/bt5/erp5_xinha_editor/SkinTemplateItem/portal_skins/erp5_xinha_editor/xinha_custom.css.xml @@ -0,0 +1,28 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="File" module="OFS.Image"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>__name__</string> </key> + <value> <string>xinha_custom.css</string> </value> + </item> + <item> + <key> <string>content_type</string> </key> + <value> <string>text/css</string> </value> + </item> + <item> + <key> <string>precondition</string> </key> + <value> <string></string> </value> + </item> + <item> + <key> <string>title</string> </key> + <value> <string></string> </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/bt5/erp5_xinha_editor/SkinTemplateItem/portal_skins/erp5_xinha_editor/xinha_support.zpt b/bt5/erp5_xinha_editor/SkinTemplateItem/portal_skins/erp5_xinha_editor/xinha_support.zpt index 38752927a3..1a803d661f 100644 --- a/bt5/erp5_xinha_editor/SkinTemplateItem/portal_skins/erp5_xinha_editor/xinha_support.zpt +++ b/bt5/erp5_xinha_editor/SkinTemplateItem/portal_skins/erp5_xinha_editor/xinha_support.zpt @@ -1,7 +1,7 @@ <tal:block tal:define="site_root python: here.getWebSiteValue() or here.getPortalObject(); portal_url python: site_root.absolute_url();"> <script type="text/javascript" tal:content="structure string: - _editor_url = '${portal_url}/xinha'"> + _editor_url = '${portal_url}/xinha';"> </script> <script type="text/javascript" tal:attributes="src string:${portal_url}/xinha/XinhaCore.js"></script> <script type="text/javascript" tal:attributes="src string:${portal_url}/xinha/LoadEditor.js"></script> -- 2.30.9