//>>built define("dojox/mobile/Carousel",["dojo/_base/kernel","dojo/_base/array","dojo/_base/connect","dojo/_base/declare","dojo/_base/event","dojo/_base/lang","dojo/_base/sniff","dojo/dom-class","dojo/dom-construct","dojo/dom-style","dijit/_Contained","dijit/_Container","dijit/_WidgetBase","./PageIndicator","./SwapView","require"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,_c,_d,_e,_f,_10){ _1.experimental("dojox.mobile.Carousel"); return _4("dojox.mobile.Carousel",[_d,_c,_b],{numVisible:3,title:"",pageIndicator:true,navButton:false,height:"300px",store:null,query:null,queryOptions:null,buildRendering:function(){ this.inherited(arguments); this.domNode.className="mblCarousel"; var h; if(this.height==="inherit"){ if(this.domNode.offsetParent){ h=this.domNode.offsetParent.offsetHeight+"px"; } }else{ if(this.height){ h=this.height; } } this.domNode.style.height=h; this.headerNode=_9.create("DIV",{className:"mblCarouselHeaderBar"},this.domNode); if(this.navButton){ this.btnContainerNode=_9.create("DIV",{className:"mblCarouselBtnContainer"},this.headerNode); _a.set(this.btnContainerNode,"float","right"); this.prevBtnNode=_9.create("BUTTON",{className:"mblCarouselBtn",title:"Previous",innerHTML:"<"},this.btnContainerNode); this.nextBtnNode=_9.create("BUTTON",{className:"mblCarouselBtn",title:"Next",innerHTML:">"},this.btnContainerNode); this.connect(this.prevBtnNode,"onclick","onPrevBtnClick"); this.connect(this.nextBtnNode,"onclick","onNextBtnClick"); } if(this.pageIndicator){ if(!this.title){ this.title=" "; } this.piw=new _e(); _a.set(this.piw,"float","right"); this.headerNode.appendChild(this.piw.domNode); } this.titleNode=_9.create("DIV",{className:"mblCarouselTitle"},this.headerNode); this.containerNode=_9.create("DIV",{className:"mblCarouselPages"},this.domNode); _3.subscribe("/dojox/mobile/viewChanged",this,"handleViewChanged"); },startup:function(){ if(this._started){ return; } if(this.store){ var _11=this.store; this.store=null; this.setStore(_11,this.query,this.queryOptions); } this.inherited(arguments); },setStore:function(_12,_13,_14){ if(_12===this.store){ return; } this.store=_12; this.query=_13; this.queryOptions=_14; this.refresh(); },refresh:function(){ if(!this.store){ return; } this.store.fetch({query:this.query,queryOptions:this.queryOptions,onComplete:_6.hitch(this,"generate"),onError:_6.hitch(this,"onError")}); },generate:function(_15,_16){ _2.forEach(this.getChildren(),function(_17){ if(_17 instanceof _f){ _17.destroyRecursive(); } }); this.items=_15; this.swapViews=[]; this.images=[]; var _18=Math.ceil(_15.length/this.numVisible); var h=this.domNode.offsetHeight-this.headerNode.offsetHeight; for(var i=0;i<_18;i++){ var w=new _f({height:h+"px"}); this.addChild(w); this.swapViews.push(w); w._carouselImages=[]; if(i===0&&this.piw){ this.piw.refId=w.id; } for(var j=0;j