X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs%2Fsymbols%2Fsrc%2FRoo_bootstrap_TabGroup.js.html;h=55c69818a8936bdbfba7c86ed91570c2803184d4;hb=613d7f9a715dce70db1b3e2e936b3921d5a9578f;hp=866d1a529235893e12f7cfab02595f3f9a0fe02b;hpb=84ceb1902ae91f91bebb5a4ddab91a429f4ba9e2;p=roojs1 diff --git a/docs/symbols/src/Roo_bootstrap_TabGroup.js.html b/docs/symbols/src/Roo_bootstrap_TabGroup.js.html index 866d1a5292..55c69818a8 100644 --- a/docs/symbols/src/Roo_bootstrap_TabGroup.js.html +++ b/docs/symbols/src/Roo_bootstrap_TabGroup.js.html @@ -15,6 +15,7 @@ * @cfg {Boolean} autoslide (true|false) auto slide .. default false * @cfg {Boolean} slideOnTouch (true|false) slide on touch .. default false * @cfg {Number} timer auto slide timer .. default 0 millisecond + * @cfg {Boolean} showarrow (true|false) show arrow default true * * @constructor * Create a new TabGroup @@ -40,6 +41,7 @@ autoslide : false, slideFn : false, slideOnTouch : false, + showarrow : true, getAutoCreate : function() { @@ -51,8 +53,9 @@ cfg.cls += ' carousel slide'; cfg.cn = [{ - cls : 'carousel-inner' - }]; + cls : 'carousel-inner', + cn : [] + }]; if(this.bullets && !Roo.isTouch){ @@ -64,19 +67,43 @@ if(this.bullets_cls){ bullets.cls = bullets.cls + ' ' + this.bullets_cls; } - /* - for (var i = 0; i < this.bullets; i++){ - bullets.cn.push({ - cls : 'bullet bullet-' + i - }); - } - */ + bullets.cn.push({ cls : 'clear' }); - cfg.cn[0].cn = bullets; + cfg.cn[0].cn.push(bullets); + } + + if(this.showarrow){ + cfg.cn[0].cn.push({ + tag : 'div', + class : 'carousel-arrow', + cn : [ + { + tag : 'div', + class : 'carousel-prev', + cn : [ + { + tag : 'i', + class : 'fa fa-chevron-left' + } + ] + }, + { + tag : 'div', + class : 'carousel-next', + cn : [ + { + tag : 'i', + class : 'fa fa-chevron-right' + } + ] + } + ] + }); } + } return cfg; @@ -84,7 +111,7 @@ initEvents: function() { - if(Roo.isTouch && this.slideOnTouch){ + if(Roo.isTouch && this.slideOnTouch && !this.showarrow){ this.el.on("touchstart", this.onTouchStart, this); } @@ -96,6 +123,12 @@ }, 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); + } + + }, onTouchStart : function(e, el, o)