[richfaces-svn-commits] JBoss Rich Faces SVN: r4852 - branches/3.1.x/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Fri Dec 14 09:20:51 EST 2007
Author: maksimkaszynski
Date: 2007-12-14 09:20:51 -0500 (Fri, 14 Dec 2007)
New Revision: 4852
Modified:
branches/3.1.x/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
http://jira.jboss.com/jira/browse/RF-1626
Modified: branches/3.1.x/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
--- branches/3.1.x/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2007-12-14 14:20:46 UTC (rev 4851)
+++ branches/3.1.x/ui/menu-components/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2007-12-14 14:20:51 UTC (rev 4852)
@@ -133,7 +133,7 @@
} while (menuLayer.level > 0);
if (menuLayer && menuLayer.eventOnGroupActivate) {
- menuLayer.eventOnGroupActivate();
+ menuLayer.eventOnGroupActivate(event);
}
}
}
@@ -400,6 +400,9 @@
RichFaces.Menu.Layers.LMPopUp(this.layer.id, false, this.event);
RichFaces.Menu.Layers.clearLMTO();
+ this.layer = null;
+ this.element = null;
+ this.event = null;
}.bind(this);
}
@@ -553,6 +556,9 @@
RichFaces.Menu.Layers.LMPopUp(this.layer.id, false, this.event);
RichFaces.Menu.Layers.clearLMTO();
+ this.layer = null;
+ this.element = null;
+ this.event = null;
}.bind(this);
}
@@ -574,6 +580,9 @@
this.reposition();
RichFaces.Menu.Layers.LMPopUp(this.layer, false, this.event);
}
+ this.layer = null;
+ this.element = null;
+ this.event = null;
}.bind(this);
}
@@ -698,7 +707,7 @@
initialize: function(id,delay, hideDelay){
RichFaces.Menu.Layers.listl.push(id);
this.id = id;
- this.layer = $(id);
+ //this.layer = $(id);
this.level = 0;
this.delay = delay;
if (hideDelay){
@@ -707,7 +716,8 @@
else{
this.hideDelay=hideDelay;
}
- RichFaces.Menu.fitLayerToContent(this.layer);
+ var layer = $(id);
+ RichFaces.Menu.fitLayerToContent(layer);
this.items = new Array();
RichFaces.Menu.Layers.layers[id] = this;
this.bindings = new Array();
@@ -755,7 +765,7 @@
this.bindings.push(binding);
binding.refresh();
- arrayinp=$A(this.layer.getElementsByTagName("select"));
+ arrayinp=$A(layer.getElementsByTagName("select"));
for(i=0; i<arrayinp.length; i++){
var openSelectb = this.openSelect.bindAsEventListener(this);
var closeSelectb = this.closeSelect.bindAsEventListener(this);
@@ -773,7 +783,7 @@
Event.observe(arrayinp[i], "keypress", OnKeyPressb);
}
- arrayinp=$A(this.layer.getElementsByTagName("input"));
+ arrayinp=$A(layer.getElementsByTagName("input"));
for(i=0; i<arrayinp.length; i++){
var openSelectb = this.openSelect.bindAsEventListener(this);
var closeSelectb = this.closeSelect.bindAsEventListener(this);
@@ -789,7 +799,7 @@
Event.observe(arrayinp[i], "keypress", OnKeyPressb);
}
- arrayinp=$A(this.layer.getElementsByTagName("textarea"));
+ arrayinp=$A(layer.getElementsByTagName("textarea"));
for(i=0; i<arrayinp.length; i++){
var openSelectb = this.openSelect.bindAsEventListener(this);
var closeSelectb = this.closeSelect.bindAsEventListener(this);
@@ -809,8 +819,12 @@
} */
},
+ getLayer: function() {
+ return $(this.id);
+ },
+
getLabel : function() {
- return RichFaces.Menu.Layers.layers[this.layer.id].layer.parentNode.parentNode;
+ return RichFaces.Menu.Layers.layers[this.id].getLayer().parentNode.parentNode;
},
highlightLabel: function() {
@@ -1286,22 +1300,23 @@
RichFaces.Menu.Items.onmouseout(this);
},
highLightGroup: function(light) {
+ var layer = $(this.id);
if (light) {
- Element.removeClassName(this.id,"dr-menu-item-enabled");
- Element.addClassName(this.id,"dr-menu-item-hover");
- Element.addClassName(this.id,"rich-menu-group-hover");
+ layer.removeClassName("dr-menu-item-enabled");
+ layer.addClassName("dr-menu-item-hover");
+ layer.addClassName("rich-menu-group-hover");
if (this.options.selectClass) {
- Element.addClassName(this.id, this.options.selectClass);
+ layer.addClassName(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");
+ layer.removeClassName("dr-menu-item-hover");
+ layer.removeClassName("rich-menu-group-hover");
+ layer.addClassName("dr-menu-item-enabled");
if (this.options.selectClass) {
- Element.removeClassName(this.id, this.options.selectClass);
+ layer.removeClassName(this.options.selectClass);
}
Element.removeClassName(this.id+":icon","rich-menu-item-icon-selected");
Element.removeClassName(this.id+":anchor","rich-menu-item-label");
More information about the richfaces-svn-commits
mailing list