3 dashboard3.slidetest = function (tbb)
7 this.tba = Roo.bootstrap.NavGroup.get(tbb.navId).getActive();
10 alert("could not get active tab");
13 if (this.tba.tabId == this.tbb.tabId) {
14 return; // same tab...
21 // we can work out the direction based on the sequence..
22 this.pel = this.el.findParent('.tab-content', 3, true);
23 var cn = this.pel.select('.tab-pane',true);
24 this.dir = cn.indexOf(this.nel) - cn.indexOf(this.el);
29 Roo.apply(dashboard3.slidetest.prototype, {
32 nel : false, // next el.
33 pel : false, // parent el.
38 // first tabcontent - needs overflow hidden..
41 this.pel.setStyle('overflow', 'hidden');
42 var obox = this.pel.getBox(true,true);
45 var box = this.el.getBox();
51 width : box.width + 'px',
52 height: box.height+ 'px',
55 // need to fix the left/right....
57 var nbox = this.nel.getBox();
58 // if dir = 1 - then put on right..
60 var start = this.dir > 0 ? (box.width + obox.x + 50 ) : (-1 * (box.width + 50)) + obox.x;
62 var end = this.dir > 0 ? -1 * (box.width + 50 ) : (box.width + obox.x + 50 );
68 width : box.width + 'px',
69 height: nbox.height+ 'px',
71 this.nel.addClass('active');
73 // now we need to animate the both boxes moving from box.width + obox.x + 50 --> obox.x
80 }, 0.5,function() { _t.completeSlide(); }, 'easeOut', 'run');
87 }, 0.5, false, 'easeOut', 'run');
92 completeSlide : function()
94 // remove styles + classes.. that we have added..
95 this.nel.removeClass('active');
96 this.pel.setStyle('overflow', '');
117 this.tba.setActive(false);
118 this.tbb.setActive(true);