[richfaces-svn-commits] JBoss Rich Faces SVN: r264 - trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts.
richfaces-svn-commits at lists.jboss.org
richfaces-svn-commits at lists.jboss.org
Wed Apr 4 06:41:04 EDT 2007
Author: d.bulahov
Date: 2007-04-04 06:41:04 -0400 (Wed, 04 Apr 2007)
New Revision: 264
Modified:
trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
add onitemselect event
Modified: trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
===================================================================
--- trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2007-04-04 10:23:27 UTC (rev 263)
+++ trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2007-04-04 10:41:04 UTC (rev 264)
@@ -786,6 +786,15 @@
var onmouseclick =
function(e){
+
+ var menuLayer = item.menu;
+ //if (menuLayer.level>0) {
+ while (menuLayer.level > 0) {
+ menuLayer = Exadel.Menu.Layers.layers[(Exadel.Menu.Layers.father[menuLayer.id])];
+ }
+ if (menuLayer && menuLayer.eventOnItemSelect) menuLayer.eventOnItemSelect();
+ //}
+
Exadel.Menu.Layers.shutdown();
}.bindAsEventListener(item);
@@ -825,7 +834,9 @@
if (this.options.ongroupactivate != ""){
this.eventOnGroupActivate = new Function("event",this.options.ongroupactivate).bindAsEventListener(this);
}
-
+ if (this.options.onitemselect != ""){
+ this.eventOnItemSelect = new Function("event",options.onitemselect).bindAsEventListener(this);
+ }
if (this.options.oncollapse != ""){
this.eventOnCollapse = new Function("event",this.options.oncollapse).bindAsEventListener(this);
}
More information about the richfaces-svn-commits
mailing list