//>>built require({cache:{"url:dojox/widget/Pager/Pager.html":"
\n
\n\t\t
\n\t\t
\n\t\t
    \n\t\t
    \n\t\t
    \n\t\t\t
    \"Next\"
    \n\t\t\t
    \"Previous\"
    \n\t\t
    \n
    \n\t
    \n
    "}}); define("dojox/widget/Pager",["dojo/aspect","dojo/_base/array","dojo/_base/declare","dojo/dom","dojo/dom-attr","dojo/dom-class","dojo/dom-construct","dojo/dom-geometry","dojo/dom-style","dojo/fx","dojo/_base/kernel","dojo/keys","dojo/_base/lang","dojo/on","dijit/_WidgetBase","dijit/_TemplatedMixin","./PagerItem","dojo/text!./Pager/Pager.html"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,fx,_a,_b,_c,on,_d,_e,_f,_10){ _a.experimental("dojox.widget.Pager"); return _3("dojox.widget.Pager",[_d,_e],{templateString:_10,iconPrevious:"",iconNext:"",iconPage:require.toUrl("dojox/widget/Pager/images/pageInactive.png"),iconPageActive:require.toUrl("dojox/widget/Pager/images/pageActive.png"),store:null,orientation:"horizontal",statusPos:"leading",pagerPos:"center",duration:500,itemSpace:2,resizeChildren:true,itemClass:_f,itemsPage:3,postMixInProperties:function(){ var h=(this.orientation=="horizontal"); _c.mixin(this,{_totalPages:0,_currentPage:1,dirClass:"pager"+(h?"Horizontal":"Vertical"),iconNext:require.toUrl("dojox/widget/Pager/images/"+(h?"h":"v")+"Next.png"),iconPrevious:require.toUrl("dojox/widget/Pager/images/"+(h?"h":"v")+"Previous.png")}); },postCreate:function(){ this.inherited(arguments); this.store.fetch({onComplete:_c.hitch(this,"_init")}); },_a11yStyle:function(e){ _6.toggle(e.target,"pagerFocus",(e.type=="focus")); },_handleKey:function(e){ var key=(e.charCode==_b.SPACE?_b.SPACE:e.keyCode); switch(key){ case _b.UP_ARROW: case _b.RIGHT_ARROW: case 110: case 78: e.preventDefault(); this._pagerNext(); break; case _b.DOWN_ARROW: case _b.LEFT_ARROW: case 112: case 80: e.preventDefault(); this._pagerPrevious(); break; case _b.ENTER: switch(e.target){ case this.pagerNext: this._pagerNext(); break; case this.pagerPrevious: this._pagerPrevious(); break; } break; } },_init:function(_11){ this.items=_11; this._renderPages(); this._renderStatus(); this._renderPager(); },generatePagerItem:function(_12,cnt){ var _13=this.itemClass,_14=(typeof _13=="string"?_c.getObject(_13):_13); var _15=_7.create("div",{innerHTML:_12.content}); return new _14({id:this.id+"-item-"+(cnt+1)},_15); },_renderPages:function(){ var pcv=this.pagerContainerView,_16=(this.orientation=="horizontal"); if(_16){ var _17=_8.getMarginBox(this.pagerContainerPager).h,_18=_8.getMarginBox(this.pagerContainerStatus).h; if(this.pagerPos!="center"){ var _19=_17+_18; }else{ var _19=_18; var _1a=this.pagerIconNext.width,_1b=_9.get(pcv,"width"),_1c=_1b-(2*_1a); _9.set(pcv,{width:_1c+"px",marginLeft:this.pagerIconNext.width+"px",marginRight:this.pagerIconNext.width+"px"}); } var _1d=_9.get(this.pagerContainer,"height")-_19; _9.set(this.pagerContainerView,"height",_1d+"px"); var _1e=Math.floor(_9.get(pcv,"width")/this.itemsPage); if(this.statusPos=="trailing"){ if(this.pagerPos!="center"){ _9.set(pcv,"marginTop",_17+"px"); } _9.set(pcv,"marginBottom",_18+"px"); }else{ _9.set(pcv,"marginTop",_18+"px"); if(this.pagerPos!="center"){ _9.set(pcv,"marginTop",_17+"px"); } } }else{ var _1f=_8.getMarginBox(this.pagerContainerPager).w,_20=_8.getMarginBox(this.pagerContainerStatus).w,_21=_9.get(this.pagerContainer,"width"); if(this.pagerPos!="center"){ var _22=_1f+_20; }else{ var _22=_20,_23=this.pagerIconNext.height,_24=_9.get(pcv,"height"),_25=_24-(2*_23); _9.set(pcv,{height:_25+"px",marginTop:this.pagerIconNext.height+"px",marginBottom:this.pagerIconNext.height+"px"}); } var _26=_9.get(this.pagerContainer,"width")-_22; _9.set(pcv,"width",_26+"px"); var _1e=Math.floor(_9.get(pcv,"height")/this.itemsPage); if(this.statusPos=="trailing"){ if(this.pagerPos!="center"){ _9.set(pcv,"marginLeft",_1f+"px"); } _9.set(pcv,"marginRight",_20+"px"); }else{ _9.set(pcv,"marginLeft",_20+"px"); if(this.pagerPos!="center"){ _9.set(pcv,"marginRight",_1f+"px"); } } } var _27="padding"+(_16?"Left":"Top"),_28="padding"+(_16?"Right":"Bottom"); _2.forEach(this.items,function(_29,cnt){ var _2a=this.generatePagerItem(_29,cnt),_2b={}; this.pagerItems.appendChild(_2a.domNode); _2b[(_16?"width":"height")]=(_1e-this.itemSpace)+"px"; var p=(_16?"height":"width"); _2b[p]=_9.get(pcv,p)+"px"; _9.set(_2a.containerNode,_2b); if(this.resizeChildren){ _2a.resizeChildren(); } _2a.parseChildren(); _9.set(_2a.domNode,"position","absolute"); if(cnt_38); this._toScroll=(b?_38:_39); var cmd=(b?"_pagerPrevious":"_pagerNext"),_3a=_1.after(this,"onScrollEnd",_c.hitch(this,function(){ this._toScroll--; if(this._toScroll<1){ _3a.remove(); }else{ this[cmd](); } }),true); this[cmd](); } },_pagerNext:function(){ if(this._anim){ return; } var _3b=[]; for(var i=this._currentPage*this.itemsPage;i>(this._currentPage-1)*this.itemsPage;i--){ if(!_4.byId(this.id+"-item-"+i)){ continue; } var _3c=_4.byId(this.id+"-item-"+i); var _3d=_8.getMarginBox(_3c); if(this.orientation=="horizontal"){ var _3e=_3d.l-(this.itemsPage*_3d.w); _3b.push(fx.slideTo({node:_3c,left:_3e,duration:this.duration})); }else{ var _3e=_3d.t-(this.itemsPage*_3d.h); _3b.push(fx.slideTo({node:_3c,top:_3e,duration:this.duration})); } } var _3f=this._currentPage; if(this._currentPage==this._totalPages){ this._currentPage=1; }else{ this._currentPage++; } var cnt=this.itemsPage; for(var i=this._currentPage*this.itemsPage;i>(this._currentPage-1)*this.itemsPage;i--){ if(_4.byId(this.id+"-item-"+i)){ var _3c=_4.byId(this.id+"-item-"+i); var _3d=_8.getMarginBox(_3c); if(this.orientation=="horizontal"){ var _40=(_9.get(this.pagerContainerView,"width")+((cnt-1)*_3d.w))-1; _9.set(_3c,"left",_40+"px"); _9.set(_3c,"top","0px"); var _3e=_40-(this.itemsPage*_3d.w); _3b.push(fx.slideTo({node:_3c,left:_3e,duration:this.duration})); }else{ _40=(_9.get(this.pagerContainerView,"height")+((cnt-1)*_3d.h))-1; _9.set(_3c,"top",_40+"px"); _9.set(_3c,"left","0px"); var _3e=_40-(this.itemsPage*_3d.h); _3b.push(fx.slideTo({node:_3c,top:_3e,duration:this.duration})); } } cnt--; } this._anim=fx.combine(_3b); var _41=_1.after(this._anim,"onEnd",_c.hitch(this,function(){ delete this._anim; this.onScrollEnd(); _41.remove(); }),true); this._anim.play(); _4.byId(this.id+"-status-"+_3f).src=this.iconPage; _4.byId(this.id+"-status-"+this._currentPage).src=this.iconPageActive; },_pagerPrevious:function(){ if(this._anim){ return; } var _42=[]; for(var i=this._currentPage*this.itemsPage;i>(this._currentPage-1)*this.itemsPage;i--){ if(!_4.byId(this.id+"-item-"+i)){ continue; } var _43=_4.byId(this.id+"-item-"+i); var _44=_8.getMarginBox(_43); if(this.orientation=="horizontal"){ var _45=_9.get(_43,"left")+(this.itemsPage*_44.w); _42.push(fx.slideTo({node:_43,left:_45,duration:this.duration})); }else{ var _45=_9.get(_43,"top")+(this.itemsPage*_44.h); _42.push(fx.slideTo({node:_43,top:_45,duration:this.duration})); } } var _46=this._currentPage; if(this._currentPage==1){ this._currentPage=this._totalPages; }else{ this._currentPage--; } var cnt=this.itemsPage; var j=1; for(var i=this._currentPage*this.itemsPage;i>(this._currentPage-1)*this.itemsPage;i--){ if(_4.byId(this.id+"-item-"+i)){ var _43=_4.byId(this.id+"-item-"+i),_44=_8.getMarginBox(_43); if(this.orientation=="horizontal"){ var _47=-(j*_44.w)+1; _9.set(_43,"left",_47+"px"); _9.set(_43,"top","0px"); var _45=((cnt-1)*_44.w); _42.push(fx.slideTo({node:_43,left:_45,duration:this.duration})); var _45=_47+(this.itemsPage*_44.w); _42.push(fx.slideTo({node:_43,left:_45,duration:this.duration})); }else{ _47=-((j*_44.h)+1); _9.set(_43,"top",_47+"px"); _9.set(_43,"left","0px"); var _45=((cnt-1)*_44.h); _42.push(fx.slideTo({node:_43,top:_45,duration:this.duration})); } } cnt--; j++; } this._anim=fx.combine(_42); var _48=_1.after(this._anim,"onEnd",_c.hitch(this,function(){ delete this._anim; this.onScrollEnd(); _48.remove(); }),true); this._anim.play(); _4.byId(this.id+"-status-"+_46).src=this.iconPage; _4.byId(this.id+"-status-"+this._currentPage).src=this.iconPageActive; },onScrollEnd:function(){ }}); });