Author: alevkovsky
Date: 2008-11-14 11:20:44 -0500 (Fri, 14 Nov 2008)
New Revision: 11173
Modified:
trunk/sandbox/ui/editor/src/main/config/component/editor.xml
trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
Log:
Editor: implement dialog type attribute
Modified: trunk/sandbox/ui/editor/src/main/config/component/editor.xml
===================================================================
--- trunk/sandbox/ui/editor/src/main/config/component/editor.xml 2008-11-14 16:15:47 UTC
(rev 11172)
+++ trunk/sandbox/ui/editor/src/main/config/component/editor.xml 2008-11-14 16:20:44 UTC
(rev 11173)
@@ -180,5 +180,13 @@
</description>
<defaultvalue>"visual"</defaultvalue>
</property>
+ <property>
+ <name>dialogType</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Attribute defines how dialogs/popups should be opened
+ </description>
+ <defaultvalue>"modal"</defaultvalue>
+ </property>
</component>
</components>
Modified: trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java
===================================================================
--- trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java 2008-11-14
16:15:47 UTC (rev 11172)
+++ trunk/sandbox/ui/editor/src/main/java/org/richfaces/component/UIEditor.java 2008-11-14
16:20:44 UTC (rev 11173)
@@ -116,7 +116,11 @@
public abstract void setViewMode(String viewMode);
public abstract String getViewMode();
+
+ public abstract void setDialogType(String dialogType);
+ public abstract String getDialogType();
+
public boolean getRendersChildren() {
return true;
}
Modified:
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java
===================================================================
---
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-11-14
16:15:47 UTC (rev 11172)
+++
trunk/sandbox/ui/editor/src/main/java/org/richfaces/renderkit/EditorRendererBase.java 2008-11-14
16:20:44 UTC (rev 11173)
@@ -262,6 +262,12 @@
writer.writeText("tinyMceParams.setup = " + component.getOnsetup()
+ ";\n", null);
}
+ if (component.getDialogType() != null
+ && component.getDialogType().length() > 0) {
+ writer.writeText("tinyMceParams.dialog_type = "
+ + ScriptUtils.toScript(component.getDialogType()) + ";\n",
+ null);
+ }
if (component.getSkin() != null && component.getSkin().length() > 0) {
writer.writeText("tinyMceParams.skin = "
+ ScriptUtils.toScript(component.getSkin()) + ";\n", null);
Show replies by date