Merge branch 'master' of http://git.roojs.com/roojs1
authorjohn <john@roojs.com>
Fri, 7 Dec 2018 04:05:27 +0000 (12:05 +0800)
committerjohn <john@roojs.com>
Fri, 7 Dec 2018 04:05:27 +0000 (12:05 +0800)
1  2 
roojs-bootstrap-debug.js
roojs-bootstrap.js

diff --combined roojs-bootstrap-debug.js
@@@ -4020,7 -4020,7 +4020,7 @@@ Roo.extend(Roo.bootstrap.NavSimplebar, 
          
          var cfg = {
              tag : this.tag || 'div',
-             cls : 'navbar navbar-expand-lg'
+             cls : 'navbar navbar-expand-lg roo-navbar-simple'
          };
        if (['light','white'].indexOf(this.weight) > -1) {
            cfg.cls += ['light','white'].indexOf(this.weight) > -1 ? ' navbar-light' : ' navbar-dark';
        
        // i'm not actually sure these are really used - normally we add a navGroup to a navbar
        
-       if (Roo.bootstrap.version == 4) {
-           return cfg;
-       }
+       //if (Roo.bootstrap.version == 4) {
+       //    return cfg;
+       //}
        
          cfg.cn = [
              {
          
           
          this.type = this.type || 'nav';
-         if (['tabs','pills'].indexOf(this.type)!==-1) {
+         if (['tabs','pills'].indexOf(this.type) != -1) {
              cfg.cn[0].cls += ' nav-' + this.type
          
          
          
          
          
-         if (['stacked','justified'].indexOf(this.arrangement)!==-1) {
+         if (['stacked','justified'].indexOf(this.arrangement) != -1) {
              cfg.cn[0].cls += ' nav-' + this.arrangement;
          }
          
@@@ -4188,6 -4188,12 +4188,12 @@@ Roo.extend(Roo.bootstrap.NavHeaderbar, 
          
          cfg.cls += this.inverse ? ' navbar-inverse navbar-dark bg-dark' : ' navbar-default';
          
+         if (['light','white'].indexOf(this.weight) > -1) {
+           cfg.cls += ['light','white'].indexOf(this.weight) > -1 ? ' navbar-light' : ' navbar-dark';
+       }
+       cfg.cls += ' bg-' + this.weight;
+         
+         
          if (['fixed-top','fixed-bottom','static-top'].indexOf(this.position)>-1) {
              cfg.cls += ' navbar-' + this.position + ' ' + this.position ;
              
@@@ -4365,11 -4371,13 +4371,13 @@@ Roo.extend(Roo.bootstrap.NavGroup, Roo.
              cls: 'nav' 
          };
          if (Roo.bootstrap.version == 4) {
-           if (this.type == 'pills') {
-               cfg.cls = ' nav-pills';
+           if (['tabs','pills'].indexOf(this.type) != -1) {
+               cfg.cls += ' nav-' + this.type; 
+           } else {
+               cfg.cls += ' navbar-nav';
            }
        } else {
-           if (['tabs','pills'].indexOf(this.type)!==-1) {
+           if (['tabs','pills'].indexOf(this.type) != -1) {
                cfg.cls += ' nav-' + this.type
            } else {
                if (this.type !== 'nav') {
@@@ -4607,6 -4615,8 +4615,8 @@@ Roo.apply(Roo.bootstrap.NavGroup, 
   * @extends Roo.bootstrap.Component
   * Bootstrap Navbar.NavItem class
   * @cfg {String} href  link to
+  * @cfg {String} button_weight (default | primary | secondary | success | info | warning | danger | link ) default none
   * @cfg {String} html content of button
   * @cfg {String} badge text inside badge
   * @cfg {String} badgecls (bg-green|bg-red|bg-yellow)the extra classes for the badge
@@@ -4672,13 -4682,16 +4682,16 @@@ Roo.extend(Roo.bootstrap.NavItem, Roo.b
      disabled : false,
      animateRef : false,
      was_active : false,
+     button_weight : '',
+     button_outline : false,
+     
+     navLink: false,
      
      getAutoCreate : function(){
           
          var cfg = {
              tag: this.tag,
              cls: 'nav-item'
-             
          };
          
          if (this.active) {
          if (this.disabled) {
              cfg.cls += ' disabled';
          }
+       
+       // BS4 only?
+       if (this.button_weight.length) {
+           cfg.tag = this.href ? 'a' : 'button';
+           cfg.html = this.html || '';
+           cfg.cls += ' btn btn' + (this.button_outline ? '-outline' : '') + '-' + this.button_weight;
+           if (this.href) {
+               cfg.href = this.href;
+           }
+           if (this.fa) {
+                 cfg.html = '<i class="fa fas fa-'+this.fa+'"></i> <span>' + this.html + '</span>';
+             }
+           
+           // menu .. should add dropdown-menu class - so no need for carat..
+           
+           if (this.badge !== '') {
+                  
+                 cfg.html += ' <span class="badge badge-secondary">' + this.badge + '</span>';
+             }
+           return cfg;
+       }
          
          if (this.href || this.html || this.glyphicon || this.icon || this.fa) {
              cfg.cn = [
                cfg.cn[0].cls = 'nav-link';
            }
              if (this.icon) {
-                 cfg.cn[0].html = '<i class="'+this.icon+'"></i> <span>' + cfg.cn[0].html + '</span>'
+                 cfg.cn[0].html = '<i class="'+this.icon+'"></i> <span>' + cfg.cn[0].html + '</span>';
              }
            if (this.fa) {
-                 cfg.cn[0].html = '<i class="fa fas fa-'+this.fa+'"></i> <span>' + cfg.cn[0].html + '</span>'
+                 cfg.cn[0].html = '<i class="fa fas fa-'+this.fa+'"></i> <span>' + cfg.cn[0].html + '</span>';
              }
              if(this.glyphicon) {
                  cfg.cn[0].html = '<span class="glyphicon glyphicon-' + this.glyphicon + '"></span> '  + cfg.cn[0].html;
            this.tag = 'div';
        }
        
-         return Roo.bootstrap.NavItem.superclass.onRender.call(this, ct, position);
+         var ret = Roo.bootstrap.NavItem.superclass.onRender.call(this, ct, position);
+       this.navLink = this.el.select('.nav-link',true).first();
+       return ret;
      },
        
      
          
          if (!state ) {
              this.el.removeClass('active');
+           this.navLink ? this.navLink.removeClass('active') : false;
          } else if (!this.el.hasClass('active')) {
+           
              this.el.addClass('active');
+           if (Roo.bootstrap.version == 4 && this.navLink ) {
+               this.navLink.addClass('active');
+           }
+           
          }
          if (fire) {
              this.fireEvent('changed', this, state);
@@@ -18317,7 -18359,7 +18359,7 @@@ Roo.extend(Roo.bootstrap.TabGroup, Roo.
      {
          if(this.transition || typeof(pan) == 'undefined'){
              Roo.log("waiting for the transitionend");
-             return;
+             return false;
          }
          
          if (typeof(pan) == 'number') {
          
          if (this.carousel && typeof(Roo.get(document.body).dom.style.transition) != 'undefined') {
              
+             //class="carousel-item carousel-item-next carousel-item-left"
+             
              this.transition = true;
              var dir = this.indexOfPanel(pan) > this.indexOfPanel(cur)  ? 'next' : 'prev';
              var lr = dir == 'next' ? 'left' : 'right';
              pan.el.addClass(dir); // or prev
+             pan.el.addClass('carousel-item-' + dir); // or prev
              pan.el.dom.offsetWidth; // find the offset with - causing a reflow?
              cur.el.addClass(lr); // or right
              pan.el.addClass(lr);
+             cur.el.addClass('carousel-item-' +lr); // or right
+             pan.el.addClass('carousel-item-' +lr);
+             
              
              var _this = this;
              cur.el.on('transitionend', function() {
                  Roo.log("trans end?");
                  
-                 pan.el.removeClass([lr,dir]);
+                 pan.el.removeClass([lr,dir, 'carousel-item-' + lr, 'carousel-item-' + dir]);
                  pan.setActive(true);
                  
-                 cur.el.removeClass([lr]);
+                 cur.el.removeClass([lr, 'carousel-item-' + lr]);
                  cur.setActive(false);
                  
                  _this.transition = false;
@@@ -18556,10 -18604,12 +18604,12 @@@ Roo.extend(Roo.bootstrap.TabPanel, Roo.
      href : '',
      
      getAutoCreate : function(){
-         var cfg = {
+         
+       
+       var cfg = {
              tag: 'div',
              // item is needed for carousel - not sure if it has any effect otherwise
-             cls: 'tab-pane item' + ((this.href.length) ? ' clickable ' : ''),
+             cls: 'carousel-item tab-pane item' + ((this.href.length) ? ' clickable ' : ''),
              html: this.html || ''
          };
          
              cfg.tabId = this.tabId;
          }
          
+       
          
          return cfg;
      },
@@@ -35331,7 -35382,7 +35382,7 @@@ layout.addxtype(
              case 'Content':  // ContentPanel (el, cfg)
              case 'Scroll':  // ContentPanel (el, cfg)
              case 'View': 
 -                cfg.autoCreate = true;
 +                cfg.autoCreate = cfg.autoCreate || true;
                  ret = new cfg.xns[cfg.xtype](cfg); // new panel!!!!!
                  //} else {
                  //    var el = this.el.createChild();
diff --combined roojs-bootstrap.js
@@@ -159,45 -159,48 +159,48 @@@ ce.addClass('show');var h=ce.getHeight(
  }}},this);var A={tag:"div",cls:"x-dlg-mask"};this.maskEl=Roo.DomHelper.append(this.el,A,true);var B=this.el.getSize();this.maskEl.setSize(B.width,B.height);this.maskEl.enableDisplayMode("block");this.maskEl.hide();if(this.loadMask){this.maskEl.show();}},getChildContainer:function(){if(this.el.select('.collapse').getCount()){return this.el.select('.collapse',true).first();
  }return this.el;},mask:function(){this.maskEl.show();},unmask:function(){this.maskEl.hide();}});
  // Roo/bootstrap/NavSimplebar.js
- Roo.bootstrap.NavSimplebar=function(A){Roo.bootstrap.NavSimplebar.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.NavSimplebar,Roo.bootstrap.Navbar,{inverse:false,type:false,arrangement:'',align:false,weight:'light',main:false,tag:false,getAutoCreate:function(){var A={tag:this.tag||'div',cls:'navbar navbar-expand-lg'}
- ;if(['light','white'].indexOf(this.weight)>-1){A.cls+=['light','white'].indexOf(this.weight)>-1?' navbar-light':' navbar-dark';}A.cls+=' bg-'+this.weight;if(this.inverse){A.cls+=' navbar-inverse';}if(Roo.bootstrap.version==4){return A;}A.cn=[{cls:'nav',tag:'ul'}
];this.type=this.type||'nav';if(['tabs','pills'].indexOf(this.type)!==-1){A.cn[0].cls+=' nav-'+this.type}else{if(this.type!=='nav'){Roo.log('nav type must be nav/tabs/pills')}A.cn[0].cls+=' navbar-nav'}if(['stacked','justified'].indexOf(this.arrangement)!==-1){A.cn[0].cls+=' nav-'+this.arrangement;
- }if(this.align==='right'){A.cn[0].cls+=' navbar-right';}return A;}});
+ Roo.bootstrap.NavSimplebar=function(A){Roo.bootstrap.NavSimplebar.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.NavSimplebar,Roo.bootstrap.Navbar,{inverse:false,type:false,arrangement:'',align:false,weight:'light',main:false,tag:false,getAutoCreate:function(){var A={tag:this.tag||'div',cls:'navbar navbar-expand-lg roo-navbar-simple'}
+ ;if(['light','white'].indexOf(this.weight)>-1){A.cls+=['light','white'].indexOf(this.weight)>-1?' navbar-light':' navbar-dark';}A.cls+=' bg-'+this.weight;if(this.inverse){A.cls+=' navbar-inverse';}A.cn=[{cls:'nav',tag:'ul'}];this.type=this.type||'nav';if(['tabs','pills'].indexOf(this.type)!=-1){A.cn[0].cls+=' nav-'+this.type}
else{if(this.type!=='nav'){Roo.log('nav type must be nav/tabs/pills')}A.cn[0].cls+=' navbar-nav'}if(['stacked','justified'].indexOf(this.arrangement)!=-1){A.cn[0].cls+=' nav-'+this.arrangement;}if(this.align==='right'){A.cn[0].cls+=' navbar-right';}return A;
+ }});
  // Roo/bootstrap/NavHeaderbar.js
  Roo.bootstrap.NavHeaderbar=function(A){Roo.bootstrap.NavHeaderbar.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.NavHeaderbar,Roo.bootstrap.NavSimplebar,{position:'',brand:'',brand_href:false,srButton:true,autohide:false,desktopCenter:false,getAutoCreate:function(){var A={tag:this.nav||'nav',cls:'navbar navbar-expand-md',role:'navigation',cn:[]}
  ;var cn=A.cn;if(this.desktopCenter){cn.push({cls:'container',cn:[]});cn=cn[0].cn;}if(this.srButton){var B={tag:'button',type:'button',cls:'navbar-toggle navbar-toggler','data-toggle':'collapse',cn:[{tag:'span',cls:'sr-only',html:'Toggle navigation'},{tag:'span',cls:'icon-bar navbar-toggler-icon'}
  ,{tag:'span',cls:'icon-bar'},{tag:'span',cls:'icon-bar'}]};cn.push(Roo.bootstrap.version==4?B:{tag:'div',cls:'navbar-header',cn:[B]});}cn.push({tag:'div',cls:'collapse navbar-collapse',cn:[]});A.cls+=this.inverse?' navbar-inverse navbar-dark bg-dark':' navbar-default';
- if(['fixed-top','fixed-bottom','static-top'].indexOf(this.position)>-1){A.cls+=' navbar-'+this.position+' '+this.position;A.tag=this.tag||(this.position=='fixed-bottom'?'footer':'header');}if(this.brand!==''){var cp=Roo.bootstrap.version==4?cn:cn[0].cn;cp.unshift({tag:'a',href:this.brand_href?this.brand_href:'#',cls:'navbar-brand',cn:[this.brand]}
- );}if(this.main){A.cls+=' main-nav';}return A;},getHeaderChildContainer:function(){if(this.srButton&&this.el.select('.navbar-header').getCount()){return this.el.select('.navbar-header',true).first();}return this.getChildContainer();},initEvents:function(){Roo.bootstrap.NavHeaderbar.superclass.initEvents.call(this);
+ if(['light','white'].indexOf(this.weight)>-1){A.cls+=['light','white'].indexOf(this.weight)>-1?' navbar-light':' navbar-dark';}A.cls+=' bg-'+this.weight;if(['fixed-top','fixed-bottom','static-top'].indexOf(this.position)>-1){A.cls+=' navbar-'+this.position+' '+this.position;
+ A.tag=this.tag||(this.position=='fixed-bottom'?'footer':'header');}if(this.brand!==''){var cp=Roo.bootstrap.version==4?cn:cn[0].cn;cp.unshift({tag:'a',href:this.brand_href?this.brand_href:'#',cls:'navbar-brand',cn:[this.brand]});}if(this.main){A.cls+=' main-nav';
+ }return A;},getHeaderChildContainer:function(){if(this.srButton&&this.el.select('.navbar-header').getCount()){return this.el.select('.navbar-header',true).first();}return this.getChildContainer();},initEvents:function(){Roo.bootstrap.NavHeaderbar.superclass.initEvents.call(this);
  if(this.autohide){var A=0;var ft=this.el;Roo.get(document).on('scroll',function(e){var ns=Roo.get(document).getScroll().top;var os=A;A=ns;if(ns>os){ft.removeClass('slideDown');ft.addClass('slideUp');return;}ft.removeClass('slideUp');ft.addClass('slideDown');
  },this);}}});
  // Roo/bootstrap/NavSidebar.js
  Roo.bootstrap.NavSidebar=function(A){Roo.bootstrap.NavSidebar.superclass.constructor.call(this,A);};Roo.extend(Roo.bootstrap.NavSidebar,Roo.bootstrap.Navbar,{sidebar:true,getAutoCreate:function(){return {tag:'div',cls:'sidebar sidebar-nav'};}});
  // Roo/bootstrap/NavGroup.js
  Roo.bootstrap.NavGroup=function(A){Roo.bootstrap.NavGroup.superclass.constructor.call(this,A);this.navItems=[];Roo.bootstrap.NavGroup.register(this);this.addEvents({'changed':true});};Roo.extend(Roo.bootstrap.NavGroup,Roo.bootstrap.Component,{align:'',inverse:false,form:false,type:'nav',navId:'',navItems:false,getAutoCreate:function(){var A=Roo.apply({}
- ,Roo.bootstrap.NavGroup.superclass.getAutoCreate.call(this));A={tag:'ul',cls:'nav'};if(Roo.bootstrap.version==4){if(this.type=='pills'){A.cls=' nav-pills';}}else{if(['tabs','pills'].indexOf(this.type)!==-1){A.cls+=' nav-'+this.type}else{if(this.type!=='nav'){Roo.log('nav type must be nav/tabs/pills')}
- A.cls+=' navbar-nav'}}if(this.parent()&&this.parent().sidebar){A={tag:'ul',cls:'dashboard-menu sidebar-menu'};return A;}if(this.form===true){A={tag:'form',cls:'navbar-form form-inline'};if(this.align==='right'){A.cls+=' navbar-right ml-md-auto';}else{A.cls+=' navbar-left';
}}if(this.align==='right'){A.cls+=' navbar-right ml-md-auto';}else{A.cls+=' mr-auto';}if(this.inverse){A.cls+=' navbar-inverse';}return A;},setActiveItem:function(A){var B=false;Roo.each(this.navItems,function(v){if(v==A){return;}if(v.isActive()){v.setActive(false,true);
B=v;}});A.setActive(true,true);this.fireEvent('changed',this,A,B);},getActive:function(){var A=false;Roo.each(this.navItems,function(v){if(v.isActive()){A=v;}});return A;},indexOfNav:function(){var A=false;Roo.each(this.navItems,function(v,i){if(v.isActive()){A=i;
- }});return A;},addItem:function(A){if(this.form&&Roo.bootstrap.version==4){A.tag='div';}var cn=new Roo.bootstrap.NavItem(A);this.register(cn);cn.parentId=this.id;cn.onRender(this.el,null);return cn;},register:function(A){this.navItems.push(A);A.navId=this.navId;
},clearAll:function(){this.navItems=[];this.el.dom.innerHTML='';},getNavItem:function(A){var B=false;Roo.each(this.navItems,function(e){if(e.tabId==A){B=e;return false;}return true;});return B;},setActiveNext:function(){var i=this.indexOfNav(this.getActive());
if(i>this.navItems.length){return;}this.setActiveItem(this.navItems[i+1]);},setActivePrev:function(){var i=this.indexOfNav(this.getActive());if(i<1){return;}this.setActiveItem(this.navItems[i-1]);},clearWasActive:function(A){Roo.each(this.navItems,function(e){if(e.tabId!=A.tabId&&e.was_active){e.was_active=false;
return false;}return true;});},getWasActive:function(){var r=false;Roo.each(this.navItems,function(e){if(e.was_active){r=e;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.NavGroup.superclass.getAutoCreate.call(this));A={tag:'ul',cls:'nav'};if(Roo.bootstrap.version==4){if(['tabs','pills'].indexOf(this.type)!=-1){A.cls+=' nav-'+this.type;}else{A.cls+=' navbar-nav';}}else{if(['tabs','pills'].indexOf(this.type)!=-1){A.cls+=' nav-'+this.type}
+ else{if(this.type!=='nav'){Roo.log('nav type must be nav/tabs/pills')}A.cls+=' navbar-nav'}}if(this.parent()&&this.parent().sidebar){A={tag:'ul',cls:'dashboard-menu sidebar-menu'};return A;}if(this.form===true){A={tag:'form',cls:'navbar-form form-inline'}
;if(this.align==='right'){A.cls+=' navbar-right ml-md-auto';}else{A.cls+=' navbar-left';}}if(this.align==='right'){A.cls+=' navbar-right ml-md-auto';}else{A.cls+=' mr-auto';}if(this.inverse){A.cls+=' navbar-inverse';}return A;},setActiveItem:function(A){var B=false;
Roo.each(this.navItems,function(v){if(v==A){return;}if(v.isActive()){v.setActive(false,true);B=v;}});A.setActive(true,true);this.fireEvent('changed',this,A,B);},getActive:function(){var A=false;Roo.each(this.navItems,function(v){if(v.isActive()){A=v;}});return A;
+ },indexOfNav:function(){var A=false;Roo.each(this.navItems,function(v,i){if(v.isActive()){A=i;}});return A;},addItem:function(A){if(this.form&&Roo.bootstrap.version==4){A.tag='div';}var cn=new Roo.bootstrap.NavItem(A);this.register(cn);cn.parentId=this.id;
cn.onRender(this.el,null);return cn;},register:function(A){this.navItems.push(A);A.navId=this.navId;},clearAll:function(){this.navItems=[];this.el.dom.innerHTML='';},getNavItem:function(A){var B=false;Roo.each(this.navItems,function(e){if(e.tabId==A){B=e;
return false;}return true;});return B;},setActiveNext:function(){var i=this.indexOfNav(this.getActive());if(i>this.navItems.length){return;}this.setActiveItem(this.navItems[i+1]);},setActivePrev:function(){var i=this.indexOfNav(this.getActive());if(i<1){return;
}this.setActiveItem(this.navItems[i-1]);},clearWasActive:function(A){Roo.each(this.navItems,function(e){if(e.tabId!=A.tabId&&e.was_active){e.was_active=false;return false;}return true;});},getWasActive:function(){var r=false;Roo.each(this.navItems,function(e){if(e.was_active){r=e;
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,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.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;
+ 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.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';
- }return Roo.bootstrap.NavItem.superclass.onRender.call(this,ct,A);},initEvents:function(){if(typeof(this.menu)!='undefined'){this.menu.parentType=this.xtype;this.menu.triggerEl=this.el;this.menu=this.addxtype(Roo.apply({},this.menu));}this.el.select('a',true).on('click',this.onClick,this);
- if(this.tagtype=='span'){this.el.select('span',true).on('click',this.onClick,this);}this.parent().register(this);},onClick:function(e){if(e.getTarget('.dropdown-menu-item')){return;}if(this.preventDefault||this.href=='#'){Roo.log("NavItem - prevent Default?");
+ }var B=Roo.bootstrap.NavItem.superclass.onRender.call(this,ct,A);this.navLink=this.el.select('.nav-link',true).first();return B;},initEvents:function(){if(typeof(this.menu)!='undefined'){this.menu.parentType=this.xtype;this.menu.triggerEl=this.el;this.menu=this.addxtype(Roo.apply({}
,this.menu));}this.el.select('a',true).on('click',this.onClick,this);if(this.tagtype=='span'){this.el.select('span',true).on('click',this.onClick,this);}this.parent().register(this);},onClick:function(e){if(e.getTarget('.dropdown-menu-item')){return;}if(this.preventDefault||this.href=='#'){Roo.log("NavItem - prevent Default?");
  e.preventDefault();}if(this.disabled){return;}var tg=Roo.bootstrap.TabGroup.get(this.navId);if(tg&&tg.transition){Roo.log("waiting for the transitionend");return;}if(this.fireEvent('click',this,e)===false){return;};if(this.tagtype=='span'){return;}var A=this.el.select('a',true).first();
  if(A&&this.animateRef&&this.href.indexOf('#')>-1){if(A.dom.href.split("#")[0]!=document.location.toString().split("#")[0]){return;}Roo.log("NavItem - prevent Default?");e.preventDefault();this.scrollToElement(e);}var p=this.parent();if(['tabs','pills'].indexOf(p.type)!==-1){if(typeof(p.setActiveItem)!=='undefined'){p.setActiveItem(this);
  }}if(p.parentType=='NavHeaderbar'&&!this.menu){p.parent().el.select('.navbar-collapse',true).removeClass('in');}},isActive:function(){return this.active},setActive:function(A,B,C){if(this.active&&!A&&this.navId){this.was_active=true;var nv=Roo.bootstrap.NavGroup.get(this.navId);
- if(nv){nv.clearWasActive(this);}}this.active=A;if(!A){this.el.removeClass('active');}else if(!this.el.hasClass('active')){this.el.addClass('active');}if(B){this.fireEvent('changed',this,A);}if(!this.navId||!this.tabId||!A||C){return;}var tg=Roo.bootstrap.TabGroup.get(this.navId);
- if(!tg){return;}var D=tg.getPanelByName(this.tabId);if(!D){return;}if(false==tg.showPanel(D)){var nv=Roo.bootstrap.NavGroup.get(this.navId);if(nv){var E=nv.getWasActive();if(E){E.setActive(true,false,true);}}}},setDisabled:function(A){this.disabled=A;if(!A){this.el.removeClass('disabled');
- }else if(!this.el.hasClass('disabled')){this.el.addClass('disabled');}},tooltipEl:function(){return this.el.select(''+this.tagtype+'',true).first();},scrollToElement:function(e){var c=document.body;if(Roo.isFirefox||Roo.isIE||Roo.isIE11){c=document.documentElement;
- }var A=Roo.get(c).select('a[name='+this.href.split('#')[1]+']',true).first();if(!A){return;}var o=A.calcOffsetsTo(c);var B={target:A,value:o[1]};this.fireEvent('scrollto',this,B,e);Roo.get(c).scrollTo('top',B.value,true);return;}});
+ if(nv){nv.clearWasActive(this);}}this.active=A;if(!A){this.el.removeClass('active');this.navLink?this.navLink.removeClass('active'):false;}else if(!this.el.hasClass('active')){this.el.addClass('active');if(Roo.bootstrap.version==4&&this.navLink){this.navLink.addClass('active');
+ }}if(B){this.fireEvent('changed',this,A);}if(!this.navId||!this.tabId||!A||C){return;}var tg=Roo.bootstrap.TabGroup.get(this.navId);if(!tg){return;}var D=tg.getPanelByName(this.tabId);if(!D){return;}if(false==tg.showPanel(D)){var nv=Roo.bootstrap.NavGroup.get(this.navId);
+ if(nv){var E=nv.getWasActive();if(E){E.setActive(true,false,true);}}}},setDisabled:function(A){this.disabled=A;if(!A){this.el.removeClass('disabled');}else if(!this.el.hasClass('disabled')){this.el.addClass('disabled');}},tooltipEl:function(){return this.el.select(''+this.tagtype+'',true).first();
+ },scrollToElement:function(e){var c=document.body;if(Roo.isFirefox||Roo.isIE||Roo.isIE11){c=document.documentElement;}var A=Roo.get(c).select('a[name='+this.href.split('#')[1]+']',true).first();if(!A){return;}var o=A.calcOffsetsTo(c);var B={target:A,value:o[1]}
+ ;this.fireEvent('scrollto',this,B,e);Roo.get(c).scrollTo('top',B.value,true);return;}});
  // Roo/bootstrap/NavSidebarItem.js
  Roo.bootstrap.NavSidebarItem=function(A){Roo.bootstrap.NavSidebarItem.superclass.constructor.call(this,A);this.addEvents({"click":true,'changed':true});};Roo.extend(Roo.bootstrap.NavSidebarItem,Roo.bootstrap.NavItem,{badgeWeight:'default',open:false,buttonView:false,buttonWeight:'default',buttonSize:'md',showArrow:true,getAutoCreate:function(){var a={tag:'a',href:this.href||'#',cls:'',html:'',cn:[]}
  ;if(this.buttonView){a={tag:'button',href:this.href||'#',cls:'btn btn-'+this.buttonWeight+' btn-'+this.buttonSize+'roo-button-dropdown-toggle',html:this.html,cn:[]};}var A={tag:'li',cls:'',cn:[a]};if(this.active){A.cls+=' active';}if(this.disabled){A.cls+=' disabled';
@@@ -753,17 -756,18 +756,18 @@@ Roo.bootstrap.TabGroup=function(A){Roo.
  ]}]});}}return A;},initEvents:function(){if(this.autoslide){var A=this;this.slideFn=window.setInterval(function(){A.showPanelNext();},this.timer);}if(this.showarrow){this.el.select('.carousel-prev',true).first().on('click',this.showPanelPrev,this);this.el.select('.carousel-next',true).first().on('click',this.showPanelNext,this);
  }},getChildContainer:function(){return this.carousel?this.el.select('.carousel-inner',true).first():this.el;},register:function(A){this.tabs.push(A);A.navId=this.navId;this.addBullet();},getActivePanel:function(){var r=false;Roo.each(this.tabs,function(t){if(t.active){r=t;
  return false;}return null;});return r;},getPanelByName:function(n){var r=false;Roo.each(this.tabs,function(t){if(t.tabId==n){r=t;return false;}return null;});return r;},indexOfPanel:function(p){var r=false;Roo.each(this.tabs,function(t,i){if(t.tabId==p.tabId){r=i;
- return false;}return null;});return r;},showPanel:function(A){if(this.transition||typeof(A)=='undefined'){Roo.log("waiting for the transitionend");return;}if(typeof(A)=='number'){A=this.tabs[A];}if(typeof(A)=='string'){A=this.getPanelByName(A);}var B=this.getActivePanel();
+ return false;}return null;});return r;},showPanel:function(A){if(this.transition||typeof(A)=='undefined'){Roo.log("waiting for the transitionend");return false;}if(typeof(A)=='number'){A=this.tabs[A];}if(typeof(A)=='string'){A=this.getPanelByName(A);}var B=this.getActivePanel();
  if(!A||!B){Roo.log('pan or acitve pan is undefined');return false;}if(A.tabId==this.getActivePanel().tabId){return true;}if(false===B.fireEvent('beforedeactivate')){return false;}if(this.bullets>0&&!Roo.isTouch){this.setActiveBullet(this.indexOfPanel(A));
- }if(this.carousel&&typeof(Roo.get(document.body).dom.style.transition)!='undefined'){this.transition=true;var C=this.indexOfPanel(A)>this.indexOfPanel(B)?'next':'prev';var lr=C=='next'?'left':'right';A.el.addClass(C);A.el.dom.offsetWidth;B.el.addClass(lr);
- A.el.addClass(lr);var D=this;B.el.on('transitionend',function(){Roo.log("trans end?");A.el.removeClass([lr,C]);A.setActive(true);B.el.removeClass([lr]);B.setActive(false);D.transition=false;},this,{single:true});return true;}B.setActive(false);A.setActive(true);
- return true;},showPanelNext:function(){var i=this.indexOfPanel(this.getActivePanel());if(i>=this.tabs.length-1&&!this.autoslide){return;}if(i>=this.tabs.length-1&&this.autoslide){i=-1;}this.showPanel(this.tabs[i+1]);},showPanelPrev:function(){var i=this.indexOfPanel(this.getActivePanel());
- if(i<1&&!this.autoslide){return;}if(i<1&&this.autoslide){i=this.tabs.length;}this.showPanel(this.tabs[i-1]);},addBullet:function(){if(!this.bullets||Roo.isTouch){return;}var A=this.el.select('.carousel-bullets',true).first();var i=this.el.select('.carousel-bullets .bullet',true).getCount();
- var B=A.createChild({cls:'bullet bullet-'+i},A.dom.lastChild);var C=this;B.on('click',(function(e,el,o,ii,t){e.preventDefault();this.showPanel(ii);if(this.autoslide&&this.slideFn){clearInterval(this.slideFn);this.slideFn=window.setInterval(function(){C.showPanelNext();
- },this.timer);}}).createDelegate(this,[i,B],true));},setActiveBullet:function(i){if(Roo.isTouch){return;}Roo.each(this.el.select('.bullet',true).elements,function(el){el.removeClass('selected');});var A=this.el.select('.bullet-'+i,true).first();if(!A){return;
- }A.addClass('selected');}});Roo.apply(Roo.bootstrap.TabGroup,{groups:{},register:function(A){this.groups[A.navId]=A;},get:function(A){if(typeof(this.groups[A])=='undefined'){this.register(new Roo.bootstrap.TabGroup({navId:A}));}return this.groups[A];}});
+ }if(this.carousel&&typeof(Roo.get(document.body).dom.style.transition)!='undefined'){this.transition=true;var C=this.indexOfPanel(A)>this.indexOfPanel(B)?'next':'prev';var lr=C=='next'?'left':'right';A.el.addClass(C);A.el.addClass('carousel-item-'+C);A.el.dom.offsetWidth;
+ B.el.addClass(lr);A.el.addClass(lr);B.el.addClass('carousel-item-'+lr);A.el.addClass('carousel-item-'+lr);var D=this;B.el.on('transitionend',function(){Roo.log("trans end?");A.el.removeClass([lr,C,'carousel-item-'+lr,'carousel-item-'+C]);A.setActive(true);
+ B.el.removeClass([lr,'carousel-item-'+lr]);B.setActive(false);D.transition=false;},this,{single:true});return true;}B.setActive(false);A.setActive(true);return true;},showPanelNext:function(){var i=this.indexOfPanel(this.getActivePanel());if(i>=this.tabs.length-1&&!this.autoslide){return;
+ }if(i>=this.tabs.length-1&&this.autoslide){i=-1;}this.showPanel(this.tabs[i+1]);},showPanelPrev:function(){var i=this.indexOfPanel(this.getActivePanel());if(i<1&&!this.autoslide){return;}if(i<1&&this.autoslide){i=this.tabs.length;}this.showPanel(this.tabs[i-1]);
+ },addBullet:function(){if(!this.bullets||Roo.isTouch){return;}var A=this.el.select('.carousel-bullets',true).first();var i=this.el.select('.carousel-bullets .bullet',true).getCount();var B=A.createChild({cls:'bullet bullet-'+i},A.dom.lastChild);var C=this;
+ B.on('click',(function(e,el,o,ii,t){e.preventDefault();this.showPanel(ii);if(this.autoslide&&this.slideFn){clearInterval(this.slideFn);this.slideFn=window.setInterval(function(){C.showPanelNext();},this.timer);}}).createDelegate(this,[i,B],true));},setActiveBullet:function(i){if(Roo.isTouch){return;
+ }Roo.each(this.el.select('.bullet',true).elements,function(el){el.removeClass('selected');});var A=this.el.select('.bullet-'+i,true).first();if(!A){return;}A.addClass('selected');}});Roo.apply(Roo.bootstrap.TabGroup,{groups:{},register:function(A){this.groups[A.navId]=A;
+ },get:function(A){if(typeof(this.groups[A])=='undefined'){this.register(new Roo.bootstrap.TabGroup({navId:A}));}return this.groups[A];}});
  // Roo/bootstrap/TabPanel.js
- Roo.bootstrap.TabPanel=function(A){Roo.bootstrap.TabPanel.superclass.constructor.call(this,A);this.addEvents({'changed':true,'beforedeactivate':true});this.tabId=this.tabId||Roo.id();};Roo.extend(Roo.bootstrap.TabPanel,Roo.bootstrap.Component,{active:false,html:false,tabId:false,navId:false,href:'',getAutoCreate:function(){var A={tag:'div',cls:'tab-pane item'+((this.href.length)?' clickable ':''),html:this.html||''}
+ Roo.bootstrap.TabPanel=function(A){Roo.bootstrap.TabPanel.superclass.constructor.call(this,A);this.addEvents({'changed':true,'beforedeactivate':true});this.tabId=this.tabId||Roo.id();};Roo.extend(Roo.bootstrap.TabPanel,Roo.bootstrap.Component,{active:false,html:false,tabId:false,navId:false,href:'',getAutoCreate:function(){var A={tag:'div',cls:'carousel-item tab-pane item'+((this.href.length)?' clickable ':''),html:this.html||''}
  ;if(this.active){A.cls+=' active';}if(this.tabId){A.tabId=this.tabId;}return A;},initEvents:function(){var p=this.parent();this.navId=this.navId||p.navId;if(typeof(this.navId)!='undefined'){var tg=Roo.bootstrap.TabGroup.get(this.navId);tg.register(this);var i=tg.tabs.length-1;
  if(this.active&&tg.bullets>0&&i<tg.bullets){tg.setActiveBullet(i);}}this.el.on('click',this.onClick,this);if(Roo.isTouch){this.el.on("touchstart",this.onTouchStart,this);this.el.on("touchmove",this.onTouchMove,this);this.el.on("touchend",this.onTouchEnd,this);
  }},onRender:function(ct,A){Roo.bootstrap.TabPanel.superclass.onRender.call(this,ct,A);},setActive:function(A){Roo.log("panel - set active "+this.tabId+"="+A);this.active=A;if(!A){this.el.removeClass('active');}else if(!this.el.hasClass('active')){this.el.addClass('active');
@@@ -1499,7 -1503,7 +1503,7 @@@ var m=G.getMargins();b.width=w-(m.left+
  E+=L;B-=L;H.updateBox(this.safeBox(b));}if(I&&I.isVisible()){var b=I.getBox();var m=I.getMargins();b.height=C-(m.top+m.bottom);var L=(b.width+m.left+m.right);b.x=w-L+m.left;b.y=D+m.top;B-=L;I.updateBox(this.safeBox(b));}if(J){var m=J.getMargins();var M={x:E+m.left,y:D+m.top,width:B-(m.left+m.right),height:C-(m.top+m.bottom)}
  ;J.updateBox(this.safeBox(M));}this.el.repaint();this.fireEvent("layout",this);},safeBox:function(A){A.width=Math.max(0,A.width);A.height=Math.max(0,A.height);return A;},add:function(A,B){A=A.toLowerCase();return this.regions[A].add(B);},remove:function(A,B){A=A.toLowerCase();
  return this.regions[A].remove(B);},findPanel:function(A){var rs=this.regions;for(var B in rs){if(typeof rs[B]!="function"){var p=rs[B].getPanel(A);if(p){return p;}}}return null;},showPanel:function(A){var rs=this.regions;for(var B in rs){var r=rs[B];if(typeof r!="function"){if(r.hasPanel(A)){return r.showPanel(A);
 -}}}return null;},addxtype:function(A){var B=false;if(typeof(A.region)=='undefined'){Roo.log("Failed to add Panel, region was not set");Roo.log(A);return false;}var C=A.region;delete A.region;var D=[];if(A.items){D=A.items;delete A.items;}var nb=false;switch(A.xtype){case 'Content':case 'Scroll':case 'View':A.autoCreate=true;
 +}}}return null;},addxtype:function(A){var B=false;if(typeof(A.region)=='undefined'){Roo.log("Failed to add Panel, region was not set");Roo.log(A);return false;}var C=A.region;delete A.region;var D=[];if(A.items){D=A.items;delete A.items;}var nb=false;switch(A.xtype){case 'Content':case 'Scroll':case 'View':A.autoCreate=A.autoCreate||true;
  B=new A.xns[A.xtype](A);this.add(C,B);break;case 'Nest':var E=A.layout;E.el=this.el.createChild();E.items=E.items||[];delete A.layout;D=E.items;if(C=='center'&&this.active&&this.getRegion('center').panels.length<1){A.background=false;}A.layout=new Roo.bootstrap.layout.Border(E);
  B=new A.xns[A.xtype](A);this.add(C,B);nb={};break;case 'Grid':if(C=='center'&&this.active){A.background=false;}B=new A.xns[A.xtype](A);this.add(C,B);break;case 'Border':B=this;break;default:Roo.log(A);throw "Can not add '"+A.xtype+"' to Border";return null;
  }this.beginUpdate();var C='';var F={};Roo.each(D,function(i){C=nb&&i.region?i.region:false;var G=B.addxtype(i);if(C){nb[C]=nb[C]==undefined?0:nb[C]+1;if(!i.background){F[C]=nb[C];}}});this.endUpdate();if(nb){for(var r in F){C=this.getRegion(r);if(C){C.showPanel(F[r]);