Unterstützung für Xinha eingebaut. Läßt sich nun über waf.bebop.dhtml_editor="Xinha" aktivieren. Desweitern muß waf.bebop.dhtml_editor_src="/assets/xinha/XinhaLoader.js", gesetzt werden und Mandalay >= v0.8 RC3 (Rev. 77) benutzt werden.

git-svn-id: https://svn.libreccm.org/ccm/trunk@70 8810af33-2d31-482b-a856-94f89814c4df
master
quasi 2009-01-23 19:27:04 +00:00
parent 2b99335f5c
commit f9287812a2
5 changed files with 43 additions and 14 deletions

View File

@ -123,7 +123,7 @@ public final class ContentSectionConfig extends AbstractConfig {
private final Parameter m_deleteLifecycleWhenComplete; private final Parameter m_deleteLifecycleWhenComplete;
private final Parameter m_deleteExpiryNotificationsWhenSent; private final Parameter m_deleteExpiryNotificationsWhenSent;
private final Parameter m_deleteWorkflowNotificationsWhenSent; private final Parameter m_deleteWorkflowNotificationsWhenSent;
private final Parameter m_hasContactsAuthoringStep; private final Parameter m_hasContactsAuthoringStep;
private final Parameter m_categoryTreeOrdering; private final Parameter m_categoryTreeOrdering;
/** /**
@ -224,10 +224,10 @@ public final class ContentSectionConfig extends AbstractConfig {
Parameter.OPTIONAL, Parameter.OPTIONAL,
null); null);
m_dhtmlEditorHiddenButtons = new StringArrayParameter m_dhtmlEditorHiddenButtons = new StringArrayParameter
("com.arsdigita.cms.dhtml_editor_hidden_buttons", ("com.arsdigita.cms.dhtml_editor_hidden_buttons",
Parameter.OPTIONAL, Parameter.OPTIONAL,
null); null);
m_hideTemplatesTab = new BooleanParameter m_hideTemplatesTab = new BooleanParameter
("com.arsdigita.cms.hide_templates_tab", ("com.arsdigita.cms.hide_templates_tab",

View File

@ -51,6 +51,7 @@ public final class BebopConfig extends AbstractConfig {
private final Parameter m_dcpOnLinks; private final Parameter m_dcpOnLinks;
private final Parameter m_enableTreeSelect; private final Parameter m_enableTreeSelect;
private final EnumerationParameter m_dhtmlEditor; private final EnumerationParameter m_dhtmlEditor;
private final Parameter m_dhtmlEditorSrcFile;
private final Parameter m_showClassName; private final Parameter m_showClassName;
public BebopConfig() { public BebopConfig() {
@ -79,6 +80,11 @@ public final class BebopConfig extends AbstractConfig {
BebopConstants.BEBOP_DHTMLEDITOR); BebopConstants.BEBOP_DHTMLEDITOR);
m_dhtmlEditor.put("HTMLArea", BebopConstants.BEBOP_DHTMLEDITOR); // for compatibility with old XSL m_dhtmlEditor.put("HTMLArea", BebopConstants.BEBOP_DHTMLEDITOR); // for compatibility with old XSL
m_dhtmlEditor.put("FCKeditor", BebopConstants.BEBOP_FCKEDITOR); 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 m_dcpOnButtons = new BooleanParameter
("waf.bebop.dcp_on_buttons", Parameter.REQUIRED, Boolean.TRUE); ("waf.bebop.dcp_on_buttons", Parameter.REQUIRED, Boolean.TRUE);
@ -93,10 +99,11 @@ public final class BebopConfig extends AbstractConfig {
register(m_tidy); register(m_tidy);
register(m_fancyErrors); register(m_fancyErrors);
register(m_dhtmlEditor); register(m_dhtmlEditor);
register(m_dhtmlEditorSrcFile);
register(m_dcpOnButtons); register(m_dcpOnButtons);
register(m_dcpOnLinks); register(m_dcpOnLinks);
register(m_enableTreeSelect); register(m_enableTreeSelect);
register(m_showClassName); register(m_showClassName);
loadInfo(); loadInfo();
} }
@ -139,6 +146,10 @@ public final class BebopConfig extends AbstractConfig {
return (String) get(m_dhtmlEditor); return (String) get(m_dhtmlEditor);
} }
public final String getDHTMLEditorSrcFile() {
return (String) get(m_dhtmlEditorSrcFile);
}
public final boolean showClassName() { public final boolean showClassName() {
return ((Boolean) get(m_showClassName)).booleanValue(); return ((Boolean) get(m_showClassName)).booleanValue();
} }

View File

@ -31,7 +31,12 @@ waf.bebop.dcp_on_links.format=[boolean]
waf.bebop.dhtml_editor.title=DHTML editor implementation 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.purpose=Select which DHTML text input widget is used for DHTMLEditor Bebop component.
waf.bebop.dhtml_editor.example=FCKeditor 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.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) waf.bebop.enable_tree_select_attribute.purpose=Specify whether to turn on isSelected XML attribute on bebop.Tree nodes (performance impact)

View File

@ -148,17 +148,25 @@ public class DHTMLEditor extends TextArea {
return "DHTMLEditor"; return "DHTMLEditor";
} }
/** public String getEditorURL() {
* deprecated - use {@link setConfig(Config)} return Bebop.getConfig().getDHTMLEditorSrcFile().substring(0, Bebop.getConfig().getDHTMLEditorSrcFile().lastIndexOf("/") + 1);
* @param config }
*/
public String getEditorSrc() {
return Bebop.getConfig().getDHTMLEditorSrcFile();
}
/**
* deprecated - use {@link setConfig(Config)}
* @param config
*/
public void setConfig(String config) { public void setConfig(String config) {
setAttribute("config", config); setAttribute("config", config);
} }
public void setConfig(Config config) { public void setConfig(Config config) {
m_config = config; m_config = config;
} }
public void addPlugin(String name) { public void addPlugin(String name) {
m_plugins.add(name); m_plugins.add(name);
@ -231,6 +239,10 @@ public class DHTMLEditor extends TextArea {
editor.addAttribute("name", getName()); 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 ) { if ( value != null ) {
editor.setText(value); editor.setText(value);
} }

View File

@ -61,5 +61,6 @@ public interface BebopConstants {
String BEBOP_SEGMENT = "bebop:segment"; String BEBOP_SEGMENT = "bebop:segment";
String BEBOP_SEG_BODY = "bebop:segmentBody"; String BEBOP_SEG_BODY = "bebop:segmentBody";
String BEBOP_SEG_HEADER = "bebop:segmentHeader"; String BEBOP_SEG_HEADER = "bebop:segmentHeader";
String BEBOP_XINHAEDITOR = "bebop:xinha";
} }