From d067cb6878ea4e2ef59f9d602f872d356654e1d8 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Thu, 29 Nov 2018 16:32:27 +0800 Subject: [PATCH] roojs-bootstrap.js roojs-bootstrap-debug.js --- roojs-bootstrap-debug.js | 5 +++-- roojs-bootstrap.js | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index 3e2ccc0b3d..0782053474 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -2513,7 +2513,7 @@ Roo.extend(Roo.bootstrap.MenuItem, Roo.bootstrap.Component, { if(this.isContainer){ return { tag: 'li', - cls: 'dropdown-menu-item dropdown-item' + cls: 'dropdown-menu-item ' }; } var ctag = { @@ -2523,6 +2523,7 @@ Roo.extend(Roo.bootstrap.MenuItem, Roo.bootstrap.Component, { var anc = { tag : 'a', + cls : 'dropdown-item', href : '#', cn : [ ] }; @@ -2539,7 +2540,7 @@ Roo.extend(Roo.bootstrap.MenuItem, Roo.bootstrap.Component, { var cfg= { tag: 'li', - cls: 'dropdown-menu-item dropdown-item', + cls: 'dropdown-menu-item', cn: [ anc ] }; if (this.parent().type == 'treeview') { diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index 44ceef3d0b..b4f5234344 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -101,8 +101,8 @@ return;}if(e.getTarget().nodeName.toLowerCase()!=='i'&&this.isLink){return;}if(t }},hideMenuItems:function(){Roo.log("hide Menu Items");if(!this.el){return;}this.el.select('.open',true).each(function(aa){aa.removeClass('open');});},addxtypeChild:function(A,B){var C=Roo.bootstrap.Menu.superclass.addxtypeChild.call(this,A,B);this.menuitems.add(C); return C;},getEl:function(){Roo.log(this.el);return this.el;},clear:function(){this.getEl().dom.innerHTML='';this.menuitems.clear();}}); // Roo/bootstrap/MenuItem.js -Roo.bootstrap.MenuItem=function(A){Roo.bootstrap.MenuItem.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.MenuItem,Roo.bootstrap.Component,{href:false,html:false,preventDefault:false,isContainer:false,active:false,fa:false,getAutoCreate:function(){if(this.isContainer){return {tag:'li',cls:'dropdown-menu-item dropdown-item'} -;}var A={tag:'span',html:'Link'};var B={tag:'a',href:'#',cn:[]};if(this.fa!==false){B.cn.push({tag:'i',cls:'fa fa-'+this.fa});}B.cn.push(A);var C={tag:'li',cls:'dropdown-menu-item dropdown-item',cn:[B]};if(this.parent().type=='treeview'){C.cls='treeview-menu'; +Roo.bootstrap.MenuItem=function(A){Roo.bootstrap.MenuItem.superclass.constructor.call(this,A);this.addEvents({"click":true});};Roo.extend(Roo.bootstrap.MenuItem,Roo.bootstrap.Component,{href:false,html:false,preventDefault:false,isContainer:false,active:false,fa:false,getAutoCreate:function(){if(this.isContainer){return {tag:'li',cls:'dropdown-menu-item '} +;}var A={tag:'span',html:'Link'};var B={tag:'a',cls:'dropdown-item',href:'#',cn:[]};if(this.fa!==false){B.cn.push({tag:'i',cls:'fa fa-'+this.fa});}B.cn.push(A);var C={tag:'li',cls:'dropdown-menu-item',cn:[B]};if(this.parent().type=='treeview'){C.cls='treeview-menu'; }if(this.active){C.cls+=' active';}B.href=this.href||C.cn[0].href;A.html=this.html||C.cn[0].html;return C;},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){Roo.log('item on click ');if(this.preventDefault){e.preventDefault();}this.fireEvent('click',this,e);},getEl:function(){return this.el;}}); // Roo/bootstrap/MenuSeparator.js -- 2.39.2