Author: sergeyhalipov
Date: 2008-04-29 08:03:04 -0400 (Tue, 29 Apr 2008)
New Revision: 8285
Modified:
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererDelegate.java
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
http://jira.jboss.com/jira/browse/RF-3289
http://jira.jboss.com/jira/browse/RF-3288
Modified:
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererDelegate.java
===================================================================
---
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererDelegate.java 2008-04-29
12:02:23 UTC (rev 8284)
+++
trunk/ui/menu-components/src/main/java/org/richfaces/renderkit/html/MenuItemRendererDelegate.java 2008-04-29
12:03:04 UTC (rev 8285)
@@ -108,9 +108,9 @@
variables.setVariable("menuGroupClass", "dr-menu-item
dr-menu-item-enabled rich-menu-group " +
itemClass + " " + styleClass);
variables.setVariable("menuItemMouseMove",
menuItem.getAttributes().get("onmousemove"));
- variables.setVariable("menuGroupItemIconClass",
"rich-menu-item-icon-enabled");
- variables.setVariable("menuGroupItemLabelClass", "rich-menu-item-label
" + labelClass);
- variables.setVariable("menuGroupItemFolderClass",
"rich-menu-item-folder");
+ variables.setVariable("menuGroupItemIconClass",
"rich-menu-item-icon-enabled rich-menu-group-icon ");
+ variables.setVariable("menuGroupItemLabelClass", "rich-menu-item-label
rich-menu-group-label " + labelClass);
+ variables.setVariable("menuGroupItemFolderClass",
"rich-menu-item-folder rich-menu-group-folder ");
variables.setVariable("onmouseoutInlineStyles", processInlineStyles(context,
menuItem, false));
variables.setVariable("onmouseoverInlineStyles",
processInlineStyles(context, menuItem, true));
Modified:
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
---
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-04-29
12:02:23 UTC (rev 8284)
+++
trunk/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2008-04-29
12:03:04 UTC (rev 8285)
@@ -1368,21 +1368,29 @@
Element.removeClassName(this.id,"dr-menu-item-enabled");
Element.addClassName(this.id,"dr-menu-item-hover");
Element.addClassName(this.id,"rich-menu-group-hover");
+ Element.addClassName(this.id,"rich-menu-item-hover");
if (this.options.selectClass) {
Element.addClassName(this.id, this.options.selectClass);
- }
+ }
Element.addClassName(this.id+":icon","rich-menu-item-icon-selected");
- Element.addClassName(this.id+":anchor","rich-menu-item-label");
- } else if (!this.mouseOver) {
- Element.removeClassName(this.id,"dr-menu-item-hover");
- Element.removeClassName(this.id,"rich-menu-group-hover");
- Element.addClassName(this.id,"dr-menu-item-enabled");
- if (this.options.selectClass) {
- Element.removeClassName(this.id, this.options.selectClass);
+ Element.addClassName(this.id+":anchor","rich-menu-item-label-selected");
+ Element.addClassName(this.id+":icon","rich-menu-group-icon-selected");
+ Element.addClassName(this.id+":anchor","rich-menu-group-label-selected");
+ } else {
+ if (!this.mouseOver) {
+ Element.removeClassName(this.id,"dr-menu-item-hover");
+ Element.removeClassName(this.id,"rich-menu-group-hover");
+ Element.removeClassName(this.id,"rich-menu-item-hover");
+ Element.addClassName(this.id,"dr-menu-item-enabled");
+ if (this.options.selectClass) {
+ Element.removeClassName(this.id, this.options.selectClass);
+ }
+ Element.removeClassName(this.id+":icon","rich-menu-item-icon-selected");
+ Element.removeClassName(this.id+":anchor","rich-menu-item-label-selected");
+ Element.removeClassName(this.id+":icon","rich-menu-group-icon-selected");
+ Element.removeClassName(this.id+":anchor","rich-menu-group-label-selected");
}
- Element.removeClassName(this.id+":icon","rich-menu-item-icon-selected");
- Element.removeClassName(this.id+":anchor","rich-menu-item-label");
}
}