You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sv...@apache.org on 2004/12/04 04:26:28 UTC
cvs commit: incubator-myfaces/src/components/org/apache/myfaces/custom/htmlEditor HtmlEditorRenderer.java HtmlEditor.java HtmlEditorTag.java
svieujot 2004/12/03 19:26:28
Modified: src/components/org/apache/myfaces/custom/htmlEditor
HtmlEditorRenderer.java HtmlEditor.java
HtmlEditorTag.java
Log:
Various bug fixes
Revision Changes Path
1.8 +7 -2 incubator-myfaces/src/components/org/apache/myfaces/custom/htmlEditor/HtmlEditorRenderer.java
Index: HtmlEditorRenderer.java
===================================================================
RCS file: /home/cvs/incubator-myfaces/src/components/org/apache/myfaces/custom/htmlEditor/HtmlEditorRenderer.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- HtmlEditorRenderer.java 4 Dec 2004 02:09:42 -0000 1.7
+++ HtmlEditorRenderer.java 4 Dec 2004 03:26:28 -0000 1.8
@@ -33,6 +33,9 @@
* @author Sylvain Vieujot (latest modification by $Author$)
* @version $Revision$ $Date$
* $Log$
+ * Revision 1.8 2004/12/04 03:26:28 svieujot
+ * Various bug fixes
+ *
* Revision 1.7 2004/12/04 02:09:42 svieujot
* Several small fixes.
*
@@ -147,7 +150,9 @@
writer.startElement(HTML.SPAN_ELEM,null);
writer.writeAttribute(HTML.CLASS_ATTR, "kupu-tb-buttongroup",null);
writer.writeAttribute(HTML.ID_ATTR, "kupu=logo",null);
- writer.writeAttribute(HTML.STYLE_ATTR, "float: right",null);
+ writer.writeAttribute(HTML.STYLE_ATTR,
+ editor.isAddKupuLogo().booleanValue() ? "float: right" : "display: none",
+ null);
writer.startElement(HTML.BUTTON_ELEM,null);
writer.writeAttribute(HTML.TYPE_ATTR, "button",null);
writer.writeAttribute(HTML.CLASS_ATTR, "kupu-logo",null);
1.5 +46 -20 incubator-myfaces/src/components/org/apache/myfaces/custom/htmlEditor/HtmlEditor.java
Index: HtmlEditor.java
===================================================================
RCS file: /home/cvs/incubator-myfaces/src/components/org/apache/myfaces/custom/htmlEditor/HtmlEditor.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- HtmlEditor.java 4 Dec 2004 00:40:25 -0000 1.4
+++ HtmlEditor.java 4 Dec 2004 03:26:28 -0000 1.5
@@ -26,6 +26,9 @@
* @author Sylvain Vieujot (latest modification by $Author$)
* @version $Revision$ $Date$
* $Log$
+ * Revision 1.5 2004/12/04 03:26:28 svieujot
+ * Various bug fixes
+ *
* Revision 1.4 2004/12/04 00:40:25 svieujot
* htmlEditor : add style and styleClass attributes.
*
@@ -49,6 +52,7 @@
private String _styleClass;
private Boolean _allowEditSource;
+ private Boolean _addKupuLogo;
private Boolean _showPropertiesToolBox;
private Boolean _showLinksToolBox;
@@ -76,8 +80,9 @@
values[1] = display;
- Boolean toolBarButtons[] = new Boolean[1];
+ Boolean toolBarButtons[] = new Boolean[2];
toolBarButtons[0] = _allowEditSource;
+ toolBarButtons[1] = _addKupuLogo;
values[2] = toolBarButtons;
@@ -108,6 +113,7 @@
Boolean[] toolBarButtons = (Boolean[]) values[2];
_allowEditSource = toolBarButtons[0];
+ _addKupuLogo = toolBarButtons[1];
Boolean[] toolBoxes = (Boolean[]) values[3];
_showPropertiesToolBox = toolBoxes[0];
@@ -121,50 +127,69 @@
}
public String getStyle(){
- if (_style != null) return _style;
- ValueBinding vb = getValueBinding("style");
+ if (_style != null)
+ return _style;
+ ValueBinding vb = getValueBinding("style");
return vb != null ? (String)vb.getValue(getFacesContext()) : null;
}
public String getStyleClass(){
- if (_styleClass != null) return _styleClass;
- ValueBinding vb = getValueBinding("styleClass");
+ if (_styleClass != null)
+ return _styleClass;
+ ValueBinding vb = getValueBinding("styleClass");
return vb != null ? (String)vb.getValue(getFacesContext()) : null;
}
public Boolean isAllowEditSource(){
- if (_allowEditSource != null) return _allowEditSource;
- ValueBinding vb = getValueBinding("allowEditSource");
+ if (_allowEditSource != null)
+ return _allowEditSource;
+ ValueBinding vb = getValueBinding("allowEditSource");
+ return vb != null ? (Boolean)vb.getValue(getFacesContext()) : Boolean.TRUE;
+ }
+
+ public Boolean isAddKupuLogo(){
+ if (_addKupuLogo != null)
+ return _addKupuLogo;
+ ValueBinding vb = getValueBinding("addKupuLogo");
return vb != null ? (Boolean)vb.getValue(getFacesContext()) : Boolean.TRUE;
}
+ public void setAddKupuLogo(boolean addKupuLogo){
+ this._addKupuLogo = Boolean.valueOf(addKupuLogo);
+ }
+
public Boolean isShowPropertiesToolBox(){
- if (_showPropertiesToolBox != null) return _showPropertiesToolBox;
- ValueBinding vb = getValueBinding("showPropertiesToolBox");
+ if (_showPropertiesToolBox != null)
+ return _showPropertiesToolBox;
+ ValueBinding vb = getValueBinding("showPropertiesToolBox");
return vb != null ? (Boolean)vb.getValue(getFacesContext()) : Boolean.FALSE;
}
public Boolean isShowLinksToolBox(){
- if (_showLinksToolBox != null) return _showLinksToolBox;
- ValueBinding vb = getValueBinding("showLinksToolBox");
+ if (_showLinksToolBox != null)
+ return _showLinksToolBox;
+ ValueBinding vb = getValueBinding("showLinksToolBox");
return vb != null ? (Boolean)vb.getValue(getFacesContext()) : Boolean.FALSE;
}
public Boolean isShowImagesToolBox(){
- if (_showImagesToolBox != null) return _showImagesToolBox;
- ValueBinding vb = getValueBinding("showImagesToolBox");
+ if (_showImagesToolBox != null)
+ return _showImagesToolBox;
+ ValueBinding vb = getValueBinding("showImagesToolBox");
return vb != null ? (Boolean)vb.getValue(getFacesContext()) : Boolean.FALSE;
}
public Boolean isShowTablesToolBox(){
- if (_showTablesToolBox != null) return _showTablesToolBox;
- ValueBinding vb = getValueBinding("showTablesToolBox");
+ if (_showTablesToolBox != null)
+ return _showTablesToolBox;
+ ValueBinding vb = getValueBinding("showTablesToolBox");
return vb != null ? (Boolean)vb.getValue(getFacesContext()) : Boolean.FALSE;
}
public Boolean isShowDebugToolBox(){
- if (_showDebugToolBox != null) return _showDebugToolBox;
- ValueBinding vb = getValueBinding("showDebugToolBox");
+ if (_showDebugToolBox != null)
+ return _showDebugToolBox;
+ ValueBinding vb = getValueBinding("showDebugToolBox");
return vb != null ? (Boolean)vb.getValue(getFacesContext()) : Boolean.FALSE;
}
@@ -177,8 +202,9 @@
}
public Boolean isEnableFlexiTools(){
- if (_enableFlexiTools != null) return _enableFlexiTools;
- ValueBinding vb = getValueBinding("formularMode");
+ if (_enableFlexiTools != null)
+ return _enableFlexiTools;
+ ValueBinding vb = getValueBinding("formularMode");
return vb != null ? (Boolean)vb.getValue(getFacesContext()) : Boolean.FALSE;
}
}
1.5 +10 -1 incubator-myfaces/src/components/org/apache/myfaces/custom/htmlEditor/HtmlEditorTag.java
Index: HtmlEditorTag.java
===================================================================
RCS file: /home/cvs/incubator-myfaces/src/components/org/apache/myfaces/custom/htmlEditor/HtmlEditorTag.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- HtmlEditorTag.java 4 Dec 2004 00:40:25 -0000 1.4
+++ HtmlEditorTag.java 4 Dec 2004 03:26:28 -0000 1.5
@@ -23,6 +23,9 @@
* @author Sylvain Vieujot (latest modification by $Author$)
* @version $Revision$ $Date$
* $Log$
+ * Revision 1.5 2004/12/04 03:26:28 svieujot
+ * Various bug fixes
+ *
* Revision 1.4 2004/12/04 00:40:25 svieujot
* htmlEditor : add style and styleClass attributes.
*
@@ -45,6 +48,7 @@
private String formularMode;
private String allowEditSource;
+ private String addKupuLogo;
private String showPropertiesToolBox;
private String showLinksToolBox;
@@ -61,6 +65,7 @@
setBooleanProperty(component, "formularMode", formularMode);
setBooleanProperty(component, "allowEditSource", allowEditSource);
+ setBooleanProperty(component, "addKupuLogo", addKupuLogo);
setBooleanProperty(component, "showPropertiesToolBox", showPropertiesToolBox);
setBooleanProperty(component, "showLinksToolBox", showLinksToolBox);
@@ -91,6 +96,10 @@
public void setAllowEditSource(String allowEditSource){
this.allowEditSource = allowEditSource;
+ }
+
+ public void setAddKupuLogo(String addKupuLogo){
+ this.addKupuLogo = addKupuLogo;
}
public void setShowPropertiesToolBox(String showPropertiesToolBox){