Author: artdaw
Date: 2011-02-03 09:52:35 -0500 (Thu, 03 Feb 2011)
New Revision: 21421
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js
Log:
RF-10322: hoverClass attribute is removed and :hover pseudo-class is used in CSS
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java 2011-02-03
14:44:32 UTC (rev 21420)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/component/AbstractPanelMenuItem.java 2011-02-03
14:52:35 UTC (rev 21421)
@@ -138,9 +138,6 @@
getStateHelper().put(Properties.disabledClass, disabledClass);
}
- @Attribute
- public abstract String getHoverClass();
-
@Attribute(generate = false)
public String getLeftIcon() {
return (String) getStateHelper().eval(Properties.leftIcon,
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss 2011-02-03
14:44:32 UTC (rev 21420)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenu.ecss 2011-02-03
14:52:35 UTC (rev 21421)
@@ -61,12 +61,11 @@
margin: 0px 3px;
}
-.rf-pm-itm-hov {
+.rf-pm-itm:hover {
background-color: '#{richSkin.additionalBackgroundColor}';
}
.rf-pm-itm-sel {
- background-color: '#{richSkin.additionalBackgroundColor}';
font-style:italic;
}
@@ -76,14 +75,12 @@
border-top-color: '#{richSkin.panelBorderColor}';
}
-.rf-pm-gr-hov {
+.rf-pm-gr-hdr:hover {
background: '#{richSkin.additionalBackgroundColor}';
-
color: white; /*TODO skin?*/
}
.rf-pm-gr-sel {
- background: '#{richSkin.additionalBackgroundColor}';
font-style:italic;
}
@@ -166,12 +163,12 @@
margin: 0px 3px;
}
-.rf-pm-top-itm-hov {
+.rf-pm-top-itm:hover {
+ color: '#{richSkin.headerTextColor}';
background-color:#ffd700;
}
.rf-pm-top-itm-sel {
- background: '#{richSkin.additionalBackgroundColor}';
font-style:italic;
}
@@ -183,15 +180,11 @@
padding: 1px;
}
-.rf-pm-top-gr-hov {
- background-color: green;
- color: white; /*TODO skin?*/
+.rf-pm-top-gr-hdr:hover {
+ background-color: '#{richSkin.additionalBackgroundColor}';
}
.rf-pm-top-gr-sel {
- background-color: blue;
- color: #f5f5f5;
-
font-style:italic;
}
@@ -230,6 +223,10 @@
cursor: default;
}
+.rf-pm-itm.rf-pm-itm-dis:hover{
+ background-color: inherit;
+}
+
.rf-pm-top-gr-cnt {
}
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js 2011-02-03
14:44:32 UTC (rev 21420)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/panelMenuItem.js 2011-02-03
14:52:35 UTC (rev 21421)
@@ -29,7 +29,6 @@
disabled : false,
selectable: true,
unselectable: false,
- highlight: true,
mode: "client",
stylePrefix: "rf-pm-itm",
itemStep: 20
@@ -139,22 +138,13 @@
// todo move it
this.selectionClass = this.options.stylePrefix + "-sel";
- this.hoverClass = this.options.stylePrefix + "-hov";
-
+
if (panelMenu.__isActiveItem(this)) {
rootElt.ready($.proxy(this.__restoreSelection, this));
}
if (!this.options.disabled) {
var item = this;
- if (this.options.highlight) {
- this.__item().bind("mouseenter", function() {
- item.highlight(true);
- });
- this.__item().bind("mouseleave", function() {
- item.highlight(false);
- });
- }
if (this.options.selectable) {
this.__header().bind("click", function() {
@@ -180,13 +170,6 @@
},
/***************************** Public Methods
****************************************************************/
- highlight : function (highlight) {
- if (highlight && !this.selected()) {
- this.__header().addClass(this.hoverClass);
- } else {
- this.__header().removeClass(this.hoverClass);
- }
- },
selected : function () {
return this.__header().hasClass(this.selectionClass);
Show replies by date