roojs-bootstrap.js
authorEdward <edward@roojs.com>
Fri, 27 Mar 2015 04:37:17 +0000 (12:37 +0800)
committerEdward <edward@roojs.com>
Fri, 27 Mar 2015 04:37:17 +0000 (12:37 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index c434ae5..a3f52b1 100644 (file)
@@ -1710,7 +1710,7 @@ Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component,  {
             
         }
         */
-       
+       Roo.log(t);
        if(t.isContainer){
            return;
        }
index 77d6111..83d5915 100644 (file)
@@ -45,7 +45,7 @@ C[g].push(F);F.on("beforecheckchange",onBeforeCheck);}},unregisterCheckable:func
 //Roo/bootstrap/Menu.js
 Roo.bootstrap.Menu=function(A){Roo.bootstrap.Menu.superclass.constructor.call(this,A);if(this.registerMenu){Roo.bootstrap.MenuMgr.register(this);}
 this.addEvents({beforeshow:true,beforehide:true,show:true,hide:true,click:true,mouseover:true,mouseout:true,itemclick:true});this.menuitems=new Roo.util.MixedCollection(false,function(o){return o.el.id;});};Roo.extend(Roo.bootstrap.Menu,Roo.bootstrap.Component,{triggerEl:false,type:false,registerMenu:true,menuItems:false,hidden:true,parentMenu:false,getChildContainer:function(){return this.el;},getAutoCreate:function(){var A={tag:'ul',cls:'dropdown-menu',style:'z-index:1000'};if(this.type==='submenu'){A.cls='submenu active';}if(this.type==='treeview'){A.cls='treeview-menu';}return A;},initEvents:function(){this.triggerEl.on('click',this.onTriggerPress,this);this.triggerEl.addClass('dropdown-toggle');this.el.on(Roo.isTouch?'touchstart':'click',this.onClick,this);this.el.on("mouseover",this.onMouseOver,this);this.el.on("mouseout",this.onMouseOut,this);},findTargetItem:function(e){var t=e.getTarget(".dropdown-menu-item",this.el,true);if(!t){return false;}if(t&&t.id){return this.menuitems.get(t.id);}return false;},onClick:function(e){Roo.log("menu.onClick");var t=this.findTargetItem(e);if(!t){return;}
-Roo.log(e);if(t.isContainer){return;}
+Roo.log(e);Roo.log(t);if(t.isContainer){return;}
 Roo.log('pass click event');t.onClick(e);this.fireEvent("click",this,t,e);this.hide();},onMouseOver:function(e){var t=this.findTargetItem(e);this.fireEvent("mouseover",this,e,t);},isVisible:function(){return !this.hidden;},onMouseOut:function(e){var t=this.findTargetItem(e);this.fireEvent("mouseout",this,e,t);},show:function(el,A,B){this.parentMenu=B;if(!this.el){this.render();}
 this.fireEvent("beforeshow",this);this.showAt(this.el.getAlignToXY(el,A||this.defaultAlign),B,false);},showAt:function(xy,A,_e){this.parentMenu=A;if(!this.el){this.render();}if(_e!==false){this.fireEvent("beforeshow",this);}
 this.hideMenuItems();this.hidden=false;this.triggerEl.addClass('open');this.focus();this.fireEvent("show",this);},focus:function(){return;if(!this.hidden){this.doFocus.defer(50,this);}},doFocus:function(){if(!this.hidden){this.focusEl.focus();}},hide:function(A){this.hideMenuItems();if(this.el&&this.isVisible()){this.fireEvent("beforehide",this);if(this.activeItem){this.activeItem.deactivate();this.activeItem=null;}