roojs-bootstrap.js
authorAlan Knowles <alan@roojs.com>
Tue, 19 Apr 2016 09:11:22 +0000 (17:11 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 19 Apr 2016 09:11:22 +0000 (17:11 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index 77e52e8..8df3bba 100644 (file)
@@ -16102,7 +16102,7 @@ Roo.extend(Roo.bootstrap.TabGroup, Roo.bootstrap.Column,  {
             return;
         }
         var ctr = this.el.select('.carousel-bullets',true).first();
-        var i = this.el.select('.carousel-bullets .bullet',true).length + 1;
+        var i = this.el.select('.carousel-bullets .bullet',true).getCount() ;
         var bullet = ctr.createChild({
             cls : 'bullet bullet-' + i
         },ctr.dom.lastChild);
@@ -16111,13 +16111,13 @@ Roo.extend(Roo.bootstrap.TabGroup, Roo.bootstrap.Column,  {
 
             e.preventDefault();
 
-            _this.showPanel(ii);
+            this.showPanel(ii);
 
-            if(_this.autoslide && _this.slideFn){
-                clearInterval(_this.slideFn);
-                _this.slideFn = window.setInterval(function() {
-                    _this.showPanelNext();
-                }, _this.timer);
+            if(this.autoslide && this.slideFn){
+                clearInterval(this.slideFn);
+                this.slideFn = window.setInterval(function() {
+                    this.showPanelNext();
+                }, this.timer);
             }
 
         }).createDelegate(this, [i, bullet], true));
index 550abdf..e4ad035 100644 (file)
@@ -652,10 +652,10 @@ return false;}return null;});return r;},showPanel:function(A){if(this.transition
 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).length+1;var B=A.createChild({cls:'bullet bullet-'+i},A.dom.lastChild);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(){_this.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];}});
+},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);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(){this.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,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);