Author: nbelaevski
Date: 2008-04-30 13:43:50 -0400 (Wed, 30 Apr 2008)
New Revision: 8390
Modified:
trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
Log:
http://jira.jboss.com/jira/browse/RF-3297
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-04-30
17:39:15 UTC (rev 8389)
+++
trunk/ui/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2008-04-30
17:43:50 UTC (rev 8390)
@@ -50,7 +50,7 @@
this.hoveredStyles = hoveredStyles;
this.hoveredClasses = hoveredClasses;
this.tdhider = $(ids.myId);
- this.tablehider = this.tdhider.firstChild;
+ this.tablehider = Richfaces.firstDescendant(this.tdhider);
this.haveDynamicIcon = haveDynamicIcon;
if (this.haveDynamicIcon==true)
this.iconswitcher = $("icon"+ids.myId);
@@ -74,10 +74,15 @@
this.selected = false;
}
this.clientId = ids.myId;
- 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.mainRow = this.tablehider.rows[0];
+ Element.extend(this.mainRow);
+
+ var mainCells = this.mainRow.cells;
+
+ this.leftIcon = Richfaces.lastDescendant(mainCells[0]);
+ this.labelArea = mainCells[1];
+ this.rightIcon = Richfaces.firstDescendant(mainCells[2]);
this.content = this.tdhider.select(".dr-pmenu-group-self-label")[0];
this.iconAlign = iconAlign;