allow string based values for comboboxarray
[roojs1] / Roo / bootstrap / TabPanel.js
index a150b13..c92294b 100644 (file)
@@ -55,10 +55,12 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
     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 || ''
         };
         
@@ -70,6 +72,7 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
             cfg.tabId = this.tabId;
         }
         
+       
         
         return cfg;
     },
@@ -142,7 +145,7 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
     
     onTouchStart : function(e)
     {
-        e.preventDefault();
+        this.swiping = false;
         
         this.startX = e.browserEvent.touches[0].clientX;
         this.startY = e.browserEvent.touches[0].clientY;
@@ -150,8 +153,6 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
     
     onTouchMove : function(e)
     {
-        e.preventDefault();
-        
         this.swiping = true;
         
         this.endX = e.browserEvent.touches[0].clientX;
@@ -160,31 +161,22 @@ Roo.extend(Roo.bootstrap.TabPanel, Roo.bootstrap.Component,  {
     
     onTouchEnd : function(e)
     {
-        e.preventDefault();
-        
         if(!this.swiping){
             this.onClick(e);
+            return;
         }
         
         var tabGroup = this.parent();
         
-        if(this.endX - this.startX > 20 ){ // swiping right
+        if(this.endX > this.startX){ // swiping right
             tabGroup.showPanelPrev();
             return;
         }
         
-        Roo.log('this.startX - this.endX');
-        Roo.log(this.startX - this.endX);
-        
-        if(this.startX - this.endX > 20){ // swiping left
+        if(this.startX > this.endX){ // swiping left
             tabGroup.showPanelNext();
             return;
         }
-        
-        if(){
-            this.onClick(e);
-        }
-        
     }