From: Alan Knowles Date: Thu, 3 Jun 2021 08:01:43 +0000 (+0800) Subject: sync X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=c599552a4a22c8632325f15b2fed11252243ad4a sync --- diff --git a/docs/src/Roo_bootstrap_Menu.js.html b/docs/src/Roo_bootstrap_Menu.js.html index 211a7c98b8..69fbb6aa4e 100644 --- a/docs/src/Roo_bootstrap_Menu.js.html +++ b/docs/src/Roo_bootstrap_Menu.js.html @@ -127,7 +127,7 @@ var cfg = { tag : 'ul', - cls : 'dropdown-menu' , + cls : 'dropdown-menu shadow' , style : 'z-index:1000' }; diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 6bb9cd0c09..d9da97d245 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -3690,7 +3690,7 @@ Roo.extend(Roo.bootstrap.Menu, Roo.bootstrap.Component, { var cfg = { tag : 'ul', - cls : 'dropdown-menu' , + cls : 'dropdown-menu shadow' , style : 'z-index:1000' }; diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 25fe19734e..8453074353 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -153,7 +153,7 @@ if(g){C[g].remove(F);F.un("beforecheckchange",onBeforeCheck);}}};}(); // Roo/bootstrap/Menu.js Roo.bootstrap.Menu=function(A){Roo.bootstrap.Menu.superclass.constructor.call(this,A);if(this.registerMenu&&this.type!='treeview'){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,stopEvent:true,isLink:false,container_method:'getDocumentBody',hideTrigger: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.onTriggerClick,this); +},getAutoCreate:function(){var A={tag:'ul',cls:'dropdown-menu shadow',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.onTriggerClick,this); this.triggerEl.on(Roo.isTouch?'touchstart':'mouseup',this.onTriggerPress,this);if(!this.hideTrigger){if(this.triggerEl.hasClass('nav-item')&&this.triggerEl.select('.nav-link',true).length){this.triggerEl.select('.nav-link',true).first().addClass('dropdown-toggle'); }else{this.triggerEl.addClass('dropdown-toggle');}}if(Roo.isTouch){this.el.on('touchstart',this.onTouch,this);}this.el.on('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;},onTouch:function(e){Roo.log("menu.onTouch");this.onClick(e);},onClick:function(e){Roo.log("menu.onClick");var t=this.findTargetItem(e);if(!t||t.isContainer){return;}Roo.log(e);