Roo/bootstrap/NavItem.js
authorAlan Knowles <alan@roojs.com>
Wed, 5 Dec 2018 07:57:16 +0000 (15:57 +0800)
committerAlan Knowles <alan@roojs.com>
Wed, 5 Dec 2018 07:57:16 +0000 (15:57 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/NavItem.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 87571a2..94ba75a 100644 (file)
@@ -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;
            }
index f7ac447..9523db8 100644 (file)
@@ -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;
            }
index deceef0..22ab9c7 100644 (file)
@@ -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='<i class="fa fas fa-'+this.fa+'"></i> <span>'+this.html+'</span>';}if(this.badge!==''){A.html+=' <span class="badge badge-secondary">'+this.badge+'</span>';}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='<i class="'+this.icon+'"></i> <span>'+A.cn[0].html+'</span>';}if(this.fa){A.cn[0].html='<i class="fa fas fa-'+this.fa+'"></i> <span>'+A.cn[0].html+'</span>';}if(this.glyphicon){A.cn[0].html='<span class="glyphicon glyphicon-'+this.glyphicon+'"></span> '+A.cn[0].html;
 }if(this.menu){A.cn[0].html+=" <span class='caret'></span>";}if(this.badge!==''){A.cn[0].html+=' <span class="badge badge-secondary">'+this.badge+'</span>';}}return A;},onRender:function(ct,A){if(Roo.bootstrap.version==4&&ct.dom.type!='ul'){this.tag='div';