Author: a.izobov
Date: 2007-04-04 05:42:21 -0400 (Wed, 04 Apr 2007)
New Revision: 262
Modified:
trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
ongroupactivate event support for dropdownmenu added
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
09:28:33 UTC (rev 261)
+++
trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2007-04-04
09:42:21 UTC (rev 262)
@@ -108,6 +108,13 @@
var menuLayer = this.layers[menu.id];
if (menuLayer && menuLayer.eventOnOpen) menuLayer.eventOnOpen();
if (menuLayer && menuLayer.eventOnExpand) menuLayer.eventOnExpand();
+
+ if (menuLayer.level>0) {
+ do {
+ menuLayer = this.layers[(this.father[menuLayer.id])];
+ } while (menuLayer.level > 0)
+ if (menuLayer && menuLayer.eventOnGroupActivate)
menuLayer.eventOnGroupActivate();
+ }
}
},
@@ -815,7 +822,9 @@
},
asDropDown: function(topLevel, onEvt, offEvt, options){
this.options = options || {};
-
+ if (this.options.ongroupactivate != ""){
+ this.eventOnGroupActivate = new
Function("event",this.options.ongroupactivate).bindAsEventListener(this);
+ }
if (this.options.oncollapse != ""){
this.eventOnCollapse = new
Function("event",this.options.oncollapse).bindAsEventListener(this);
@@ -823,7 +832,7 @@
if (this.options.onexpand != ""){
this.eventOnExpand = new
Function("event",this.options.onexpand).bindAsEventListener(this);
}
-
+
// if($(topLevel)){ CH-1518
var onmouseover = function(e){
if (!e) {
Show replies by date