From 5b53d560938da10a1a3367a28e9be044aa1e6e71 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 5 Dec 2018 15:57:16 +0800 Subject: [PATCH] Roo/bootstrap/NavItem.js roojs-bootstrap.js roojs-bootstrap-debug.js --- Roo/bootstrap/NavItem.js | 2 +- roojs-bootstrap-debug.js | 2 +- roojs-bootstrap.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Roo/bootstrap/NavItem.js b/Roo/bootstrap/NavItem.js index 87571a2749..94ba75afd0 100644 --- a/Roo/bootstrap/NavItem.js +++ b/Roo/bootstrap/NavItem.js @@ -100,7 +100,7 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component, { if (this.button_weight.length) { cfg.tag = this.href ? 'a' : 'button'; cfg.html = this.html || ''; - cfg.cls += ' btn btn' + (this.btn_outline ? '-outline' : '') + '-' + this.button_weight; + cfg.cls += ' btn btn' + (this.button_outline ? '-outline' : '') + '-' + this.button_weight; if (this.href) { cfg.href = this.href; } diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index f7ac4473f1..9523db8933 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -4705,7 +4705,7 @@ Roo.extend(Roo.bootstrap.NavItem, Roo.bootstrap.Component, { if (this.button_weight.length) { cfg.tag = this.href ? 'a' : 'button'; cfg.html = this.html || ''; - cfg.cls += ' btn btn' + (this.btn_outline ? '-outline' : '') + '-' + this.button_weight; + cfg.cls += ' btn btn' + (this.button_outline ? '-outline' : '') + '-' + this.button_weight; if (this.href) { cfg.href = this.href; } diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index deceef075c..22ab9c7be3 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -187,7 +187,7 @@ return false;}return true;});return B;},setActiveNext:function(){var i=this.inde return false;}return true;});return r;}});Roo.apply(Roo.bootstrap.NavGroup,{groups:{},register:function(A){this.groups[A.navId]=A;},get:function(A){if(typeof(this.groups[A])=='undefined'){return false;}return this.groups[A];}}); // Roo/bootstrap/NavItem.js Roo.bootstrap.NavItem=function(A){Roo.bootstrap.NavItem.superclass.constructor.call(this,A);this.addEvents({"click":true,'changed':true,'scrollto':true});};Roo.extend(Roo.bootstrap.NavItem,Roo.bootstrap.Component,{href:false,html:'',badge:'',icon:false,fa:false,glyphicon:false,active:false,preventDefault:false,tabId:false,tagtype:'a',tag:'li',disabled:false,animateRef:false,was_active:false,button_weight:'',button_outline:false,navLink:false,getAutoCreate:function(){var A={tag:this.tag,cls:'nav-item'} -;if(this.active){A.cls=typeof(A.cls)=='undefined'?'active':A.cls+' active';}if(this.disabled){A.cls+=' disabled';}if(this.button_weight.length){A.tag=this.href?'a':'button';A.html=this.html||'';A.cls+=' btn btn'+(this.btn_outline?'-outline':'')+'-'+this.button_weight; +;if(this.active){A.cls=typeof(A.cls)=='undefined'?'active':A.cls+' active';}if(this.disabled){A.cls+=' disabled';}if(this.button_weight.length){A.tag=this.href?'a':'button';A.html=this.html||'';A.cls+=' btn btn'+(this.button_outline?'-outline':'')+'-'+this.button_weight; if(this.href){A.href=this.href;}if(this.fa){A.html=' '+this.html+'';}if(this.badge!==''){A.html+=' '+this.badge+'';}return A;}if(this.href||this.html||this.glyphicon||this.icon||this.fa){A.cn=[{tag:this.tagtype,href:this.href||"#",html:this.html||''} ];if(this.tagtype=='a'){A.cn[0].cls='nav-link';}if(this.icon){A.cn[0].html=' '+A.cn[0].html+'';}if(this.fa){A.cn[0].html=' '+A.cn[0].html+'';}if(this.glyphicon){A.cn[0].html=' '+A.cn[0].html; }if(this.menu){A.cn[0].html+=" ";}if(this.badge!==''){A.cn[0].html+=' '+this.badge+'';}}return A;},onRender:function(ct,A){if(Roo.bootstrap.version==4&&ct.dom.type!='ul'){this.tag='div'; -- 2.39.2