[richfaces-svn-commits] JBoss Rich Faces SVN: r303 - trunk/richfaces/menu-components/src/main/templates/org/richfaces.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Fri Apr 6 09:13:19 EDT 2007
Author: F.antonov
Date: 2007-04-06 09:13:19 -0400 (Fri, 06 Apr 2007)
New Revision: 303
Modified:
trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx
Log:
MenuItem component development.
Modified: trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx
===================================================================
--- trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx 2007-04-06 13:12:20 UTC (rev 302)
+++ trunk/richfaces/menu-components/src/main/templates/org/richfaces/htmlMenuItem.jspx 2007-04-06 13:13:19 UTC (rev 303)
@@ -19,60 +19,102 @@
<f:call name="initializeResources" />
- <f:clientid var="clientId"/>
+ <f:clientid var="clientId"/>
+
+
+ <jsp:scriptlet><![CDATA[
+ if (((org.richfaces.component.UIMenuItem) component).isDisabled()) {
+ ]]></jsp:scriptlet>
+
+ <div id="#{clientId}"
+ class="dr-menu-item dr-menu-item-disabled rich-menu-item rich-menu-item-disabled #{component.attributes['styleClass']}"
+ style="#{component.attributes['style']}"
+ onclick="Event.stop(event || window.event);">
+
+ <jsp:scriptlet><![CDATA[
+ } else {
+ ]]></jsp:scriptlet>
+
<div id="#{clientId}"
- class="#{class}"
- onmouseout="#{onmouseout}"
- onmouseover="#{onmouseover}"
+ class="dr-menu-item dr-menu-item-enabled rich-menu-item rich-menu-item-enabled #{component.attributes['styleClass']}"
+ onmouseout="this.className='dr-menu-item dr-menu-item-enabled rich-menu-item rich-menu-item-enabled #{component.attributes['styleClass']}';
+ #{onmouseoutInlineStyles}
+ $('#{clientId}:icon').className='dr-menu-icon rich-menu-item-icon #{component.attributes['iconClass']}';
+ $('#{clientId}:anchor').className='dr-menu-label rich-menu-item-label';
+ #{component.attributes['onmouseout']};"
+ onmouseover="this.className='dr-menu-item dr-menu-item-hover rich-menu-item rich-menu-item-hover #{component.attributes['styleClass']} #{component.attributes['selectClass']}';
+ #{onmouseoverInlineStyles}
+ $('#{clientId}:icon').className='dr-menu-icon dr-menu-icon-selected rich-menu-item-icon rich-menu-item-icon-selected #{component.attributes['iconClass']}';
+ $('#{clientId}:anchor').className='dr-menu-label dr-menu-label-selected rich-menu-item-label rich-menu-item-label-selected';
+ #{component.attributes['onmouseover']};"
style="#{component.attributes['style']}"
- onclick="#{onclick}">
- <jsp:scriptlet><![CDATA[
- if (!((org.richfaces.component.UIMenuItem) component).isDisabled()) {
- ]]></jsp:scriptlet>
+ onclick="#{component.attributes['onselect']}; #{onclick}">
<f:call name="utils.encodeAttributes">
<f:parameter value="onmousedown,onmouseup,onmousemove" />
</f:call>
- <jsp:scriptlet><![CDATA[
- }
- ]]></jsp:scriptlet>
+ <jsp:scriptlet><![CDATA[
+ }
+ ]]></jsp:scriptlet>
+
+
<span id="#{clientId}:icon"
- class="#{iconClass}"
+ class="dr-menu-icon rich-menu-item-icon #{iconDisabledClasses} #{component.attributes['iconClass']}"
style="#{component.attributes['iconStyle']}">
+
<jsp:scriptlet><![CDATA[
UIComponent iconFacet = getIconFacet((org.richfaces.component.UIMenuItem) component);
if (null != iconFacet) {
renderChild(context, iconFacet);
} else {
]]></jsp:scriptlet>
+
<img width="16"
height="16"
src="#{icon}" />
+
<jsp:scriptlet><![CDATA[
}
]]></jsp:scriptlet>
+
</span>
<jsp:scriptlet><![CDATA[
if (((org.richfaces.component.UIMenuItem) component).isDisabled()) {
]]></jsp:scriptlet>
+
<span id="#{clientId}:disabled"
- class="#{labelClass}">
- #{value}
+ class="dr-menu-label dr-menu-label-disabled rich-menu-item-label rich-menu-item-label-disabled"
+ >
+ #{component.attributes['value']}
<f:call name="renderChildren" />
</span>
+
<jsp:scriptlet><![CDATA[
} else {
]]></jsp:scriptlet>
+
<a id="#{clientId}:anchor"
href="#"
- class="#{labelClass}">
- #{value}
+ class="dr-menu-label rich-menu-item-label">
+ #{component.attributes['value']}
<f:call name="renderChildren" />
</a>
+
<jsp:scriptlet><![CDATA[
}
- ]]></jsp:scriptlet>
+ ]]></jsp:scriptlet>
+
+ <jsp:scriptlet><![CDATA[
+ if (((org.richfaces.component.UIMenuItem) component).isDisabled()) {
+ ]]></jsp:scriptlet>
</div>
+ <jsp:scriptlet><![CDATA[
+ } else {
+ ]]></jsp:scriptlet>
+ </div>
+ <jsp:scriptlet><![CDATA[
+ }
+ ]]></jsp:scriptlet>
</f:root>
\ No newline at end of file
More information about the richfaces-svn-commits
mailing list