From f9287812a2ce7772ca7573433b88091eaf8fce6d Mon Sep 17 00:00:00 2001 From: quasi Date: Fri, 23 Jan 2009 19:27:04 +0000 Subject: [PATCH] =?UTF-8?q?Unterst=C3=BCtzung=20f=C3=BCr=20Xinha=20eingeba?= =?UTF-8?q?ut.=20L=C3=A4=C3=9Ft=20sich=20nun=20=C3=BCber=20waf.bebop.dhtml?= =?UTF-8?q?=5Feditor=3D"Xinha"=20aktivieren.=20Desweitern=20mu=C3=9F=20waf?= =?UTF-8?q?.bebop.dhtml=5Feditor=5Fsrc=3D"/assets/xinha/XinhaLoader.js",?= =?UTF-8?q?=20gesetzt=20werden=20und=20Mandalay=20>=3D=20v0.8=20RC3=20(Rev?= =?UTF-8?q?.=2077)=20benutzt=20werden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://svn.libreccm.org/ccm/trunk@70 8810af33-2d31-482b-a856-94f89814c4df --- .../arsdigita/cms/ContentSectionConfig.java | 10 +++---- .../src/com/arsdigita/bebop/BebopConfig.java | 13 +++++++++- .../bebop/BebopConfig_parameter.properties | 7 ++++- .../com/arsdigita/bebop/form/DHTMLEditor.java | 26 ++++++++++++++----- .../arsdigita/bebop/util/BebopConstants.java | 1 + 5 files changed, 43 insertions(+), 14 deletions(-) diff --git a/ccm-cms/src/com/arsdigita/cms/ContentSectionConfig.java b/ccm-cms/src/com/arsdigita/cms/ContentSectionConfig.java index 492ec736d..4b93cfca1 100755 --- a/ccm-cms/src/com/arsdigita/cms/ContentSectionConfig.java +++ b/ccm-cms/src/com/arsdigita/cms/ContentSectionConfig.java @@ -123,7 +123,7 @@ public final class ContentSectionConfig extends AbstractConfig { private final Parameter m_deleteLifecycleWhenComplete; private final Parameter m_deleteExpiryNotificationsWhenSent; private final Parameter m_deleteWorkflowNotificationsWhenSent; - private final Parameter m_hasContactsAuthoringStep; + private final Parameter m_hasContactsAuthoringStep; private final Parameter m_categoryTreeOrdering; /** @@ -224,10 +224,10 @@ public final class ContentSectionConfig extends AbstractConfig { Parameter.OPTIONAL, null); - m_dhtmlEditorHiddenButtons = new StringArrayParameter - ("com.arsdigita.cms.dhtml_editor_hidden_buttons", - Parameter.OPTIONAL, - null); + m_dhtmlEditorHiddenButtons = new StringArrayParameter + ("com.arsdigita.cms.dhtml_editor_hidden_buttons", + Parameter.OPTIONAL, + null); m_hideTemplatesTab = new BooleanParameter ("com.arsdigita.cms.hide_templates_tab", diff --git a/ccm-core/src/com/arsdigita/bebop/BebopConfig.java b/ccm-core/src/com/arsdigita/bebop/BebopConfig.java index fcb7fbaad..79a9b85b5 100755 --- a/ccm-core/src/com/arsdigita/bebop/BebopConfig.java +++ b/ccm-core/src/com/arsdigita/bebop/BebopConfig.java @@ -51,6 +51,7 @@ public final class BebopConfig extends AbstractConfig { private final Parameter m_dcpOnLinks; private final Parameter m_enableTreeSelect; private final EnumerationParameter m_dhtmlEditor; + private final Parameter m_dhtmlEditorSrcFile; private final Parameter m_showClassName; public BebopConfig() { @@ -79,7 +80,12 @@ public final class BebopConfig extends AbstractConfig { BebopConstants.BEBOP_DHTMLEDITOR); m_dhtmlEditor.put("HTMLArea", BebopConstants.BEBOP_DHTMLEDITOR); // for compatibility with old XSL m_dhtmlEditor.put("FCKeditor", BebopConstants.BEBOP_FCKEDITOR); + m_dhtmlEditor.put("Xinha", BebopConstants.BEBOP_XINHAEDITOR); + m_dhtmlEditorSrcFile = new StringParameter + ("waf.bebop.dhtml_editor_src", Parameter.REQUIRED, + "/assets/xinha/XinhaLoader.js"); + m_dcpOnButtons = new BooleanParameter ("waf.bebop.dcp_on_buttons", Parameter.REQUIRED, Boolean.TRUE); m_dcpOnLinks = new BooleanParameter @@ -93,10 +99,11 @@ public final class BebopConfig extends AbstractConfig { register(m_tidy); register(m_fancyErrors); register(m_dhtmlEditor); + register(m_dhtmlEditorSrcFile); register(m_dcpOnButtons); register(m_dcpOnLinks); register(m_enableTreeSelect); - register(m_showClassName); + register(m_showClassName); loadInfo(); } @@ -139,6 +146,10 @@ public final class BebopConfig extends AbstractConfig { return (String) get(m_dhtmlEditor); } + public final String getDHTMLEditorSrcFile() { + return (String) get(m_dhtmlEditorSrcFile); + } + public final boolean showClassName() { return ((Boolean) get(m_showClassName)).booleanValue(); } diff --git a/ccm-core/src/com/arsdigita/bebop/BebopConfig_parameter.properties b/ccm-core/src/com/arsdigita/bebop/BebopConfig_parameter.properties index 112690188..35087582a 100755 --- a/ccm-core/src/com/arsdigita/bebop/BebopConfig_parameter.properties +++ b/ccm-core/src/com/arsdigita/bebop/BebopConfig_parameter.properties @@ -31,7 +31,12 @@ waf.bebop.dcp_on_links.format=[boolean] waf.bebop.dhtml_editor.title=DHTML editor implementation waf.bebop.dhtml_editor.purpose=Select which DHTML text input widget is used for DHTMLEditor Bebop component. waf.bebop.dhtml_editor.example=FCKeditor -waf.bebop.dhtml_editor.format=HTMLArea|FCKeditor +waf.bebop.dhtml_editor.format=HTMLArea|FCKeditor|Xinha + +waf.bebop.dhtml_editor_src.title=Relative path to the source javascript file +waf.bebop.dhtml_editor_src.purpose=Relative path to the source javascript file +waf.bebop.dhtml_editor_src.example=/assets/xinha/XinhaLoader.js +waf.bebop.dhtml_editor_src.format=[String] waf.bebop.enable_tree_select_attribute.title=isSelected attribute for bebop.Tree nodes waf.bebop.enable_tree_select_attribute.purpose=Specify whether to turn on isSelected XML attribute on bebop.Tree nodes (performance impact) diff --git a/ccm-core/src/com/arsdigita/bebop/form/DHTMLEditor.java b/ccm-core/src/com/arsdigita/bebop/form/DHTMLEditor.java index 406a989c4..722b97103 100755 --- a/ccm-core/src/com/arsdigita/bebop/form/DHTMLEditor.java +++ b/ccm-core/src/com/arsdigita/bebop/form/DHTMLEditor.java @@ -148,17 +148,25 @@ public class DHTMLEditor extends TextArea { return "DHTMLEditor"; } - /** - * deprecated - use {@link setConfig(Config)} - * @param config - */ + public String getEditorURL() { + return Bebop.getConfig().getDHTMLEditorSrcFile().substring(0, Bebop.getConfig().getDHTMLEditorSrcFile().lastIndexOf("/") + 1); + } + + public String getEditorSrc() { + return Bebop.getConfig().getDHTMLEditorSrcFile(); + } + + /** + * deprecated - use {@link setConfig(Config)} + * @param config + */ public void setConfig(String config) { setAttribute("config", config); } - public void setConfig(Config config) { - m_config = config; - } + public void setConfig(Config config) { + m_config = config; + } public void addPlugin(String name) { m_plugins.add(name); @@ -231,6 +239,10 @@ public class DHTMLEditor extends TextArea { editor.addAttribute("name", getName()); + // Set the needed config params so they don't have to be hardcoded in the theme + editor.addAttribute("editor_url", getEditorURL()); + editor.addAttribute("editor_src", getEditorSrc()); + if ( value != null ) { editor.setText(value); } diff --git a/ccm-core/src/com/arsdigita/bebop/util/BebopConstants.java b/ccm-core/src/com/arsdigita/bebop/util/BebopConstants.java index 40544c216..ce74f6c18 100755 --- a/ccm-core/src/com/arsdigita/bebop/util/BebopConstants.java +++ b/ccm-core/src/com/arsdigita/bebop/util/BebopConstants.java @@ -61,5 +61,6 @@ public interface BebopConstants { String BEBOP_SEGMENT = "bebop:segment"; String BEBOP_SEG_BODY = "bebop:segmentBody"; String BEBOP_SEG_HEADER = "bebop:segmentHeader"; + String BEBOP_XINHAEDITOR = "bebop:xinha"; }