Author: sergeyhalipov
Date: 2008-01-21 09:26:29 -0500 (Mon, 21 Jan 2008)
New Revision: 5490
Modified:
trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
Log:
http://jira.jboss.com/jira/browse/RF-1948
Modified:
trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
===================================================================
---
trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2008-01-21
13:12:05 UTC (rev 5489)
+++
trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2008-01-21
14:26:29 UTC (rev 5490)
@@ -50,7 +50,7 @@
this.hoveredStyles = hoveredStyles;
this.hoveredClasses = hoveredClasses;
this.tdhider = $(ids.myId);
- this.tablehider = $("tablehide"+ids.myId);
+ this.tablehider = this.tdhider.firstChild;
this.haveDynamicIcon = haveDynamicIcon;
if (this.haveDynamicIcon==true)
this.iconswitcher = $("icon"+ids.myId);
@@ -74,13 +74,13 @@
this.selected = false;
}
this.clientId = ids.myId;
- this.obj = $(ids.myId);
- this.leftIcon = $('leftIcon' + ids.myId);
- this.rightIcon = $('rightIcon' + ids.myId);
- this.labelArea = $('icon' + ids.myId);
- this.content = document.getElementsByClassName("dr-pmenu-group-self-label",
this.obj)[0];
+ this.mainRow = Element.extend(this.tablehider.firstChild.firstChild);
+ this.labelArea = this.mainRow.firstChild.nextSibling;
+ this.leftIcon = this.mainRow.firstChild.firstChild;
+ this.rightIcon = this.labelArea.nextSibling.firstChild;
+ this.content = document.getElementsByClassName("dr-pmenu-group-self-label",
this.tdhider)[0];
this.iconAlign = iconAlign;
- this.mainRow = $("row_" + ids.myId);
+
/*
if (level == 0){
this.tdhider.style.display = "";
@@ -158,7 +158,7 @@
},
hide: function(){
- this.obj.style.display = 'none';
+ this.tdhider.style.display = 'none';
// if(this.inputState){
// this.inputState.value="closed";
// }
@@ -196,11 +196,11 @@
// this.inputState.value="opened";
this.tdhider.style.display="";
this.tablehider.style.display="";
- this.obj.style.display = "";
+ this.tdhider.style.display = "";
},
preTrigger: function(e){
- //this.inputAction.setAttribute('value', this.obj.id);
+ //this.inputAction.setAttribute('value', this.tdhider.id);
this.inputAction.setAttribute('value', this.clientId);
},
@@ -387,7 +387,7 @@
else
Event.observe(this.tablehider, "click",
this.itemClicked.bindAsEventListener(this), false);
- Event.observe(this.obj, "mouseover",
this.hoverItem.bindAsEventListener(this), false);
+ Event.observe(this.tdhider, "mouseover",
this.hoverItem.bindAsEventListener(this), false);
Event.observe(this.tablehider, "mouseover",
this.addHoverStyles.bindAsEventListener(this), false);
Event.observe(this.tablehider, "mouseout",
this.removeHoverStyles.bindAsEventListener(this), false);