Author: abelevich
Date: 2011-03-02 12:09:16 -0500 (Wed, 02 Mar 2011)
New Revision: 22020
Added:
branches/4.0.X/examples/output-demo/src/main/resources/
branches/4.0.X/examples/output-demo/src/main/resources/myskin.skin.properties
Modified:
branches/4.0.X/examples/output-demo/src/main/java/org/richfaces/SkinBean.java
branches/4.0.X/examples/output-demo/src/main/webapp/examples/dropDownMenu.xhtml
branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/dropdownmenu.ecss
Log:
https://issues.jboss.org/browse/RF-10631 dropDownMenu: menu label font size and weight not
mapped to skin. Reviewed by Alex Kolonitsky.
Modified: branches/4.0.X/examples/output-demo/src/main/java/org/richfaces/SkinBean.java
===================================================================
---
branches/4.0.X/examples/output-demo/src/main/java/org/richfaces/SkinBean.java 2011-03-02
15:36:59 UTC (rev 22019)
+++
branches/4.0.X/examples/output-demo/src/main/java/org/richfaces/SkinBean.java 2011-03-02
17:09:16 UTC (rev 22020)
@@ -22,10 +22,11 @@
new SelectItem("NULL"),
new SelectItem("plain"),
new SelectItem("ruby"),
- new SelectItem("wine")
+ new SelectItem("wine"),
+ new SelectItem("myskin")
};
- private String skin = "classic";
+ private String skin = "myskin";
private boolean enableElementsSkinning = true;
Added: branches/4.0.X/examples/output-demo/src/main/resources/myskin.skin.properties
===================================================================
--- branches/4.0.X/examples/output-demo/src/main/resources/myskin.skin.properties
(rev 0)
+++
branches/4.0.X/examples/output-demo/src/main/resources/myskin.skin.properties 2011-03-02
17:09:16 UTC (rev 22020)
@@ -0,0 +1,3 @@
+baseSkin=blueSky
+generalSizeFont=16
+headerWeightFont=normal
\ No newline at end of file
Modified: branches/4.0.X/examples/output-demo/src/main/webapp/examples/dropDownMenu.xhtml
===================================================================
---
branches/4.0.X/examples/output-demo/src/main/webapp/examples/dropDownMenu.xhtml 2011-03-02
15:36:59 UTC (rev 22019)
+++
branches/4.0.X/examples/output-demo/src/main/webapp/examples/dropDownMenu.xhtml 2011-03-02
17:09:16 UTC (rev 22020)
@@ -130,7 +130,7 @@
<ddm:menuItem label="Close" disabled="true"/>
<ddm:menuSeparator id="menuSeparator11" />
<ddm:menuItem label="Exit"
action="#{menuBean.doExit}"/>
- <ddm:menuItem action="#{menuBean.doExit}">
+ <ddm:menuItem >
<h:inputText />
</ddm:menuItem>
<ddm:menuItem label="Add user!" mode="client">
@@ -155,9 +155,13 @@
<f:selectItem itemValue="ajax"/>
<f:selectItem itemValue="client"/>
</h:selectOneMenu><br/>
- </h:panelGrid>
+ <h:outputText value="Set skin to 'myskin' with custom
font size and font weight:"/>
+ <h:commandButton value="myskin">
+ <f:setPropertyActionListener target="#{skinBean.skin}"
value="myskin"/>
+ </h:commandButton>
+ </h:panelGrid>
- </h:panelGrid>
+ </h:panelGrid>
</h:form>
<br/>
<br/>
@@ -246,6 +250,14 @@
<br/>
<br/>
<ddm:toolbar >
+ <ddm:dropDownMenu id="ddmenuToolbar"
horizontalOffset="10" verticalOffset="20"
jointPoint="topRight" direction="bottomRight" style="border:0px
solid #{a4jSkin.panelBorderColor}">
+ <f:facet name="label">
+ <h:panelGroup>
+ <h:graphicImage
value="/images/ddmenu/copy.gif" styleClass="pic"/>
+ <h:outputText value="File"/>
+ </h:panelGroup>
+ </f:facet>
+ </ddm:dropDownMenu>
` <ddm:menuItem id="menuItemToolbar1"/>
<ddm:menuItem id="menuItemFacet1" label="Open"
action="#{menuBean.doOpen}">
<f:facet name="icon">
Modified:
branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/dropdownmenu.ecss
===================================================================
---
branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/dropdownmenu.ecss 2011-03-02
15:36:59 UTC (rev 22019)
+++
branches/4.0.X/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/dropdownmenu.ecss 2011-03-02
17:09:16 UTC (rev 22020)
@@ -1,6 +1,7 @@
.rf-ddm-lbl, .rf-ddm-lbl-dis {
- font-family: '#{richSkin.headerFamilyFont}';
- font-size:11px;
+ font-family: '#{richSkin.generalFamilyFont}';
+ font-size:'#{richSkin.generalSizeFont}';
+ font-weight: '#{richSkin.headerWeightFont}';
position:relative;
}
.rf-ddm-unsel {
@@ -36,7 +37,7 @@
cursor: default;
}
.rf-ddm-lbl-dec {
- font-weight:bold;
+ font-weight:'#{richSkin.headerWeightFont}';
cursor : pointer;
}
.rf-ddm-lst {
@@ -97,6 +98,7 @@
color : '#{richSkin.generalTextColor}'; /*#000000;*/ /*generalTextColor*/
display:inline-block;
text-decoration : none;
+ vertical-align:middle;
z-index:2;
}
.rf-ddm-sep {