Author: amarkhel
Date: 2010-12-30 15:35:22 -0500 (Thu, 30 Dec 2010)
New Revision: 20851
Modified:
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js
Log:
https://issues.jboss.org/browse/RF-10108 Drop down menu: client api
Modified: trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js
===================================================================
---
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js 2010-12-30
20:33:33 UTC (rev 20850)
+++
trunk/ui/output/ui/src/main/resources/META-INF/resources/org.richfaces/menu.js 2010-12-30
20:35:22 UTC (rev 20851)
@@ -43,7 +43,7 @@
this.selectedGroup = null;
rf.Event.bindById(this.id, this.options.showEvent, $.proxy(
this.___showHandler, this), this);
- rf.Event.bindById(this.id, "mouseover", $.proxy(this.__overHandler,
+ rf.Event.bindById(this.id, "mouseenter", $.proxy(this.__overHandler,
this), this);
rf.Event.bindById(this.id, "mouseleave", $.proxy(this.__leaveHandler,
this), this);
@@ -87,10 +87,10 @@
submitForm : function(item) {
var form = this.__getParentForm(item);
if (this.options.mode == "server") {
- // rf.submitForm(form, {selectedMenuItem: item.id});
+ rf.submitForm(form, {selectedMenuItem: item.id});
}
if (this.options.mode == "ajax") {
- // rf.ajax(item.id);
+ rf.ajax(item.id);
}
},
@@ -102,6 +102,11 @@
this.hide();
}
},
+
+ activateItem : function(menuItemId){
+ var item=$(RichFaces.getDomElement(menuItemId));
+ this.processItem(item);
+ },
selectItem : function(item) {
// if(item.attr('id') && !this.isDisabled(item)){
@@ -124,14 +129,14 @@
},
show: function() {
- this.menuManager.shutdownMenu();
+ this.menuManager.shutdownMenu();
+ this.menuManager.addMenuId(this.id);
this.__showPopup();
- this.menuManager.addMenuId(this.id);
},
hide: function() {
+ this.__hidePopup();
this.menuManager.deletedMenuId();
- this.__hidePopup();
},
__showPopup : function() {