Roo/bootstrap/TabPanel.js
authorAlan Knowles <alan@roojs.com>
Thu, 5 Feb 2015 03:05:15 +0000 (11:05 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 5 Feb 2015 03:05:15 +0000 (11:05 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

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

index f50bdd3..798f817 100644 (file)
@@ -46,6 +46,7 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
     getAutoCreate : function(){
         var cfg = {
             tag: 'div',
+            // item is needed for carousel - not sure if it has any effect otherwise
             cls: 'tab-pane item',
             html: this.html || ''
         };
index d83b7f5..90b70b7 100644 (file)
@@ -13974,7 +13974,8 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
     getAutoCreate : function(){
         var cfg = {
             tag: 'div',
-            cls: 'tab-pane',
+            // item is needed for carousel - not sure if it has any effect otherwise
+            cls: 'tab-pane item',
             html: this.html || ''
         };
         
@@ -13986,6 +13987,7 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
             cfg.tabId = this.tabId;
         }
         
+        
         return cfg;
     },
     
@@ -13999,7 +14001,7 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
         if (typeof(this.navId) != 'undefined') {
             // not really needed.. but just in case.. parent should be a NavGroup.
             var tg = Roo.bootstrap.TabGroup.get(this.navId);
-             Roo.log(['register', tg, this]);
+            Roo.log(['register', tg, this]);
             tg.register(this);
         }
     },
index db1bcb2..fe07592 100644 (file)
@@ -313,7 +313,7 @@ B.setActive(false);A.setActive(true);},showPanelNext:function(){var i=this.index
 this.showPanel(this.tabs[i+1]);},showPanelPrev:function(){var i=this.indexOfPanel(this.getActivePanel());if(i<1){return;}
 this.showPanel(this.tabs[i-1]);}});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});this.tabId=this.tabId||Roo.id();};Roo.extend(Roo.bootstrap.TabPanel,Roo.bootstrap.Component,{active:false,html:false,tabId:false,navId:false,getAutoCreate:function(){var A={tag:'div',cls:'tab-pane',html:this.html||''};if(this.active){A.cls+=' active';}if(this.tabId){A.tabId=this.tabId;}return A;},initEvents:function(){Roo.log('-------- init events on tab panel ---------');var p=this.parent();this.navId=this.navId||p.navId;if(typeof(this.navId)!='undefined'){var tg=Roo.bootstrap.TabGroup.get(this.navId);Roo.log(['register',tg,this]);tg.register(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');}
+Roo.bootstrap.TabPanel=function(A){Roo.bootstrap.TabPanel.superclass.constructor.call(this,A);this.addEvents({'changed':true});this.tabId=this.tabId||Roo.id();};Roo.extend(Roo.bootstrap.TabPanel,Roo.bootstrap.Component,{active:false,html:false,tabId:false,navId:false,getAutoCreate:function(){var A={tag:'div',cls:'tab-pane item',html:this.html||''};if(this.active){A.cls+=' active';}if(this.tabId){A.tabId=this.tabId;}return A;},initEvents:function(){Roo.log('-------- init events on tab panel ---------');var p=this.parent();this.navId=this.navId||p.navId;if(typeof(this.navId)!='undefined'){var tg=Roo.bootstrap.TabGroup.get(this.navId);Roo.log(['register',tg,this]);tg.register(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');}
 this.fireEvent('changed',this,A);}});
 //Roo/bootstrap/DateField.js
 Roo.bootstrap.DateField=function(A){Roo.bootstrap.DateField.superclass.constructor.call(this,A);this.addEvents({show:true,hide:true,select:true});};Roo.extend(Roo.bootstrap.DateField,Roo.bootstrap.Input,{format:"m/d/y",altFormats:"m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d",weekStart:0,viewMode:'',minViewMode:'',todayHighlight:false,todayBtn:false,language:'en',keyboardNavigation:true,calendarWeeks:false,startDate:-Infinity,endDate:Infinity,daysOfWeekDisabled:[],_events:[],UTCDate:function(){return new Date(Date.UTC.apply(Date,arguments));},UTCToday:function(){var A=new Date();return this.UTCDate(A.getUTCFullYear(),A.getUTCMonth(),A.getUTCDate());},getDate:function(){var d=this.getUTCDate();return new Date(d.getTime()+(d.getTimezoneOffset()*60000));},getUTCDate:function(){return this.date;},setDate:function(d){this.setUTCDate(new Date(d.getTime()-(d.getTimezoneOffset()*60000)));},setUTCDate:function(d){this.date=d;this.setValue(this.formatDate(this.date));},onRender:function(ct,A){Roo.bootstrap.DateField.superclass.onRender.call(this,ct,A);this.language=this.language||'en';this.language=this.language in Roo.bootstrap.DateField.dates?this.language:this.language.split('-')[0];this.language=this.language in Roo.bootstrap.DateField.dates?this.language:"en";this.isRTL=Roo.bootstrap.DateField.dates[this.language].rtl||false;this.format=this.format||'m/d/y';this.isInline=false;this.isInput=true;this.component=this.el.select('.add-on',true).first()||false;this.component=(this.component&&this.component.length===0)?false:this.component;this.hasInput=this.component&&this.inputEL().length;if(typeof(this.minViewMode==='string')){switch(this.minViewMode){case 'months':this.minViewMode=1;break;case 'years':this.minViewMode=2;break;default:this.minViewMode=0;break;}}if(typeof(this.viewMode==='string')){switch(this.viewMode){case 'months':this.viewMode=1;break;case 'years':this.viewMode=2;break;default:this.viewMode=0;break;}}