// private this should really trigger on mouseup..
function onMouseDown(e){
Roo.log("on Mouse Up");
- if(lastShow.getElapsed() > 50 && active.length > 0 && !e.getTarget(".x-menu") && !e.getTarget('.user-menu')){
- Roo.log("hideAll");
+
+ if(lastShow.getElapsed() > 50 && active.length > 0 && !e.getTarget(".dropdown-menu") && !e.getTarget('.user-menu')){
+ Roo.log("MenuManager hideAll");
hideAll();
e.stopEvent();
}
* @cfg {Boolean} isContainer is it a container - just returns a drop down item..
* @cfg {Boolean} active used on sidebars to highlight active itesm
* @cfg {String} fa favicon to show on left of menu item.
+ * @cfg {Roo.bootsrap.Menu} menu the child menu.
*
*
* @constructor
return cfg;
},
- initEvents: function() {
+ initEvents: function()
+ {
if (this.parent().type == 'treeview') {
this.el.select('a').on('click', this.onClick, this);
}
+ if (this.menu) {
+ this.menu.parentType = this.xtype;
+ this.menu.triggerEl = this.el;
+ this.menu = this.addxtype(Roo.apply({}, this.menu));
+ }
},
onClick : function(e)
onClick : function(e)
{
+ if (e.getTarget('.dropdown-menu-item')) {
+ // did you click on a menu itemm.... - then don't trigger onclick..
+ return;
+ }
+
if(
this.preventDefault ||
this.href == '#'
){
-
+ Roo.log("NavItem - prevent Default?");
e.preventDefault();
}
if (ael.dom.href.split("#")[0] != document.location.toString().split("#")[0]) {
return; // ignore... - it's a 'hash' to another page.
}
-
+ Roo.log("NavItem - prevent Default?");
e.preventDefault();
this.scrollToElement(e);
}