[richfaces-svn-commits] JBoss Rich Faces SVN: r260 - 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 05:03:06 EDT 2007
Author: d.bulahov
Date: 2007-04-04 05:03:05 -0400 (Wed, 04 Apr 2007)
New Revision: 260
Modified:
trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js
Log:
add onexpand and oncollapse on dropDownMenu
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 08:00:46 UTC (rev 259)
+++ trunk/richfaces/dropdown-menu/src/main/resources/org/richfaces/renderkit/html/scripts/menu.js 2007-04-04 09:03:05 UTC (rev 260)
@@ -103,9 +103,11 @@
if (visible && !visibleFlag) {
var menuLayer = this.layers[menu.id];
if (menuLayer && menuLayer.eventOnClose) menuLayer.eventOnClose();
+ if (menuLayer && menuLayer.eventOnCollapse) menuLayer.eventOnCollapse();
} else if (!visible && visibleFlag) {
var menuLayer = this.layers[menu.id];
if (menuLayer && menuLayer.eventOnOpen) menuLayer.eventOnOpen();
+ if (menuLayer && menuLayer.eventOnExpand) menuLayer.eventOnExpand();
}
},
@@ -813,6 +815,15 @@
},
asDropDown: function(topLevel, onEvt, offEvt, options){
this.options = options || {};
+
+
+ if (this.options.oncollapse != ""){
+ this.eventOnCollapse = new Function("event",this.options.oncollapse).bindAsEventListener(this);
+ }
+ if (this.options.onexpand != ""){
+ this.eventOnExpand = new Function("event",this.options.onexpand).bindAsEventListener(this);
+ }
+
// if($(topLevel)){ CH-1518
var onmouseover = function(e){
if (!e) {
More information about the richfaces-svn-commits
mailing list