"); if(!t){q.each(u,function(){this._render(r.get_buffer()); }); }r.append("

"); },_renderColumns:function(t,u,w,y){t.append("

    "); var s=this.get_groupSettings(); var v=s.get_repeatColumns(); var A=y?0:Math.min(v,u.length); var r=s.get_repeatDirection(); for(var z=0; z"); var x=r==m.MenuRepeatDirection.Vertical?this._getRowItems(z,v,u):this._getColumnItems(z,v,u); this._renderChildGroup(t,x,w); t.append(""); }t.append("

"); },_renderChildGroup:function(r,u,s,t){r.append("

    "); if(!t){q.each(u,function(){this._render(r.get_buffer()); }); }r.append("
"); },_getGroupLevelCssClass:function(){return k+(this.get_level()+1); },_getGroupCssClass:function(){var r=new b(); r.append(this._getFlowCssClass()); if(!this._getShouldRenderScrollWrap()){r.append(" ",n," ",this._getGroupLevelCssClass()); }return r.toString(); },_getRowItems:function(w,t,r){var v=[]; for(var s=0; s0; A--){var z=v[A]; var y=v[A-1]; if(z.length==y.length){return; }y.push(z.shift()); }}; var u=v[t-1]; q.each(r,function(){u.push(this); x(); }); return v[w]; },_getColumnItems:function(s,v,t){var r=[]; var w=0; for(var u=0; u .rmGroupColumn",s); var r=this.get_groupSettings(); var u=r.get_repeatColumns(); if(t.length .rmGroupColumn",s); for(var r=t.length-1; r>0; r--){var v=t[r]; var u=t[r-1]; if(this._getColumnItemCount(u)==this._getColumnItemCount(v)){return; }q("> .rmGroup",u).append(q("> .rmGroup > .rmItem:first",v)); }},_getColumnItemCount:function(r){return q("> .rmGroup > .rmItem",r).length; },_createEmptyColumn:function(){var s=this._getGroupCssClass(); var r=new b(); r.append("
  • "); this._renderChildGroup(r,[],s); r.append("
  • "); var t=q(r.toString()); q(this.get_childListElement()).append(t); return t; },_hasMultipleColumns:function(){var r=this.get_groupSettings(); var s=r.get_repeatColumns(); if(s==1){s=this.get_menu().get_defaultGroupSettings().get_repeatColumns(); }return s>1; },_getShouldRenderScrollWrap:function(){if(this._hasMultipleColumns()){return false; }var r=this.get_groupSettings(); var t=this.get_menu().get_defaultGroupSettings(); var s=r.get_width(); if(!s){s=t.get_width(); }var u=r.get_height(); if(!u){u=t.get_height(); }return su; },_getChildElements:function(){var r=q(this.get_childListElement()); if(r.is(".rmMultiColumn")){return q("> .rmGroupColumn > ul > .rmItem",r); }else{return r.children(".rmItem"); }},_updateColumnWrapSize:function(){var t=q(this.get_childListElement()); if(!t.is(".rmMultiColumn")){return; }var s=0; var r=0; q("> .rmGroupColumn > .rmGroup",t).each(function(){s+=this.offsetWidth; r=Math.max(this.offsetHeight,r); }); if(s==0r==0){return; }t.css("width",s+"px").css("height",r+"px"); },_createItemCollection:function(){var r=new m.RadMenuItemCollection(this); m.RadMenu._createChildControls(this,r); return r; },_getSlideWrapElement:function(){if(!this._slideWrapElement){var r=$telerik.getFirstChildByTagName(this.get_element(),"div",1); if(r&&Sys.UI.DomElement.containsCssClass(r,"rmSlide")){this._slideWrapElement=r; }}return this._slideWrapElement; },_getScrollWrapElement:function(){if(!this._scrollWrapElement){var r=this._getSlideWrapElement(); if(r){this._scrollWrapElement=$telerik.getFirstChildByTagName(r,"div",0); }}return this._scrollWrapElement; },_getAnimationContainer:function(){if(!this._animationContainer){var r=this.get_templated()?1:0; this._animationContainer=$telerik.getFirstChildByTagName(this.get_element(),"div",r); }return this._animationContainer; },_getAnimatedElement:function(){if(!this._animatedElement){this._animatedElement=this._getScrollWrapElement()this.get_childListElement(); }return this._animatedElement; },_determineExpandDirection:function(){var r=this.get_groupSettings(); if(r.get_expandDirection()!=m.ExpandDirection.Auto){return; }var s=this._getParentFlow(); if(s==m.ItemFlow.Vertical){if(this.get_menu().get_rightToLeft()){r.set_expandDirection(m.ExpandDirection.Left); }else{r.set_expandDirection(m.ExpandDirection.Right); }}else{r.set_expandDirection(m.ExpandDirection.Down); }},_getSlideDirection:function(){var r=this.get_groupSettings().get_expandDirection(); if(r==m.ExpandDirection.Auto){return null; }return r; },_getParentFlow:function(){var r=this.get_parent(); if(!r){return null; }if(r==this.get_menu()){return r._flow; }else{return r.get_groupSettings().get_flow(); }},_initializeAnimation:function(){this._determineExpandDirection(); var s=this._getAnimatedElement(); if(s){var r=this.get_menu(); this._slide=new m.jSlide(s,r.get_expandAnimation(),r.get_collapseAnimation(),r.get_enableOverlay()); this._slide.initialize(); this._slide.set_direction(this._getSlideDirection()); this._collapseAnimationEndedDelegate=Function.createDelegate(this,this._onCollapseAnimationEnded); this._slide.add_collapseAnimationEnded(this._collapseAnimationEndedDelegate); }},_getHasItems:function(){if(this._hasItems===null){this._hasItems=this.get_itemData()&&this.get_itemData().length>0; }return this._hasItems; },_setHasItems:function(r){this._hasItems=r; },_clearNavigateUrl:function(){var r=this.get_linkElement(); if(!r){return; }if(!this.get_enabled()&&r.href){q(r).data("href",this._getNavigateUrl()); q(r).removeAttr("href"); }},_restoreNavigateUrl:function(){var r=this.get_linkElement(); if(!r){return; }var s=q(r).data("href"); if(this.get_enabled()&&s){r.href=s; }},_updateTextElementClass:function(){var s=this.get_textElement(); if(!s){return; }var r="rmText"; if(this._getHasItems()this.get_expandMode()==m.MenuItemExpandMode.WebService){r+=" "+this._getExpandClassName(); }s.className=r; },_onCollapseAnimationEnded:function(){var r=this.get_menu(); this.get_element().style.zIndex=0; r._restoreZIndex(); if(this.get_level()==0&&r.get_rightToLeft()){var s=r.get_element(); s.style.cssText=s.style.cssText; }},_initializeScroller:function(){var r=this._getScrollWrapElement(); if(r){this._scroller=new m.MenuItemScroller(this.get_childListElement(),this.get_groupSettings().get_flow()); this._scroller.initialize(); }},_isAutoScrollPossible:function(){var t=this.get_menu(); var r=this._getMaximumExpandSize(); var s=this._getAnimationContainer(); if(this.get_groupSettings().get_flow()==m.ItemFlow.Vertical){return(t._autoScrollMinimumHeightB)){H=m.ExpandDirection.Down; E=J; }break; case m.ExpandDirection.Down:if($telerik.elementOverflowsBottom(v,G,K)){if(L.y>G.offsetHeight){H=m.ExpandDirection.Up; E=-F; }}break; case m.ExpandDirection.Left:if(K.xt){H=m.ExpandDirection.Right; u=C; }}break; case m.ExpandDirection.Right:if($telerik.elementOverflowsRight(v,G,K)){if(t>z){H=m.ExpandDirection.Left; u=-A; }}break; }switch(H){case m.ExpandDirection.Down:case m.ExpandDirection.Up:if($telerik.elementOverflowsRight(v,G)){var y=v.width-(K.x+A); var w=this.get_menu(); if(w.get_rightToLeft()&&this.get_level()==0){u+=y; }else{u=y; }}break; case m.ExpandDirection.Left:case m.ExpandDirection.Right:if($telerik.elementOverflowsBottom(v,G)){var r=Math.min(F,v.height); E=v.height-(K.y+r)-this._defaultScrollSize; }break; }this._setChildContainerPosition(u,E); this._slide.set_direction(H); return{adjustedLeft:u,adjustedTop:E}; },_closeChildren:function(u){var r=this.get_items(); for(var t=0; t0&&r.get_expandDirection()==m.ExpandDirection.Left){this.focusFirstChild(x); return; }var t=this.get_parent(); var u=null; if(t.get_groupSettings){u=t.get_groupSettings(); }if(u&&u.get_expandDirection()==m.ExpandDirection.Right){t._focus(x); return; }var w=this.get_menu().get_openedItem(); if(w){w.focusPreviousItem(x); }},_onKeyboardRight:function(x){var s=this._getParentFlow(); if(s==m.ItemFlow.Horizontal){this.focusNextItem(x); return; }var v=this.get_items(); var r=this.get_groupSettings(); if(v.get_count()>0&&r.get_expandDirection()==m.ExpandDirection.Right){this.focusFirstChild(x); return; }var t=this.get_parent(); var u=null; if(t.get_groupSettings){u=t.get_groupSettings(); }if(u&&u.get_expandDirection()==m.ExpandDirection.Left){t.focus(); return; }var w=this.get_menu().get_openedItem(); if(w){w.focusNextItem(x); }},_onKeyboardEsc:function(t){var r=this.get_parent(); var s=this.get_menu(); if(r==s){this._blur(t); }else{r._close(t); r._focus(t); }},_render:function(r){var s=this.get_parent().get_items().get_count()==1; r[r.length]=""; },_renderAccessKey:function(){if(this.get_isSeparator()this.get_templated()){return; }var t=this.get_linkElement(); if(!t){return; }var r=this.get_linkElement().accessKey.toLowerCase(); if(!r){return; }var u=this.get_textElement(); var v=u.innerHTML; var s=v.toLowerCase().indexOf(r); if(v.toLowerCase().indexOf("")!=-1){return; }if(s==-1){return; }u.innerHTML=v.substr(0,s)+""+v.substr(s,1)+""+v.substr(s+1,v.length); },_getIsImageOnly:function(){if(this._isImageOnly===null){this._isImageOnly=this.get_imageElement()!=null; }return this._isImageOnly; },_getFlowCssClass:function(){if(this.get_groupSettings().get_flow()==m.ItemFlow.Vertical){return o; }else{return d; }},_isWebServiceCallNeeded:function(){if(this._itemsLoading){return false; }return(!this._itemsLoaded&&this.get_expandMode()==m.MenuItemExpandMode.WebService); },_createLoadingItem:function(){var s=this.get_menu().get_loadingTemplate(); if(s===""){return; }var r=new m.RadMenuItem(); this.get_items().add(r); r.set_text(s); },_removeLoadingItem:function(){if(this.get_menu().get_loadingTemplate()===""){return; }var r=this.get_items().getItem(0); this.get_items().remove(r); },_loadChildrenFromWebService:function(){this.get_menu()._loadChildrenFromWebService(this); },_onChildrenLoading:function(){this._itemsLoading=true; this._createLoadingItem(); this._doOpen(null); },_onChildrenLoaded:function(){this._removeLoadingItem(); this._itemsLoaded=true; this._itemsLoading=false; if(this.get_items().get_count()>0){this._updateColumnWrapSize(); this._slide.updateSize(); if(this._hovered){this._doOpen(null); }}},_onChildrenLoadingError:function(){this._close(null); this._removeLoadingItem(); this._itemsLoaded=false; this._itemsLoading=false; },_adjustSiblingsWidth:function(s){var r=this.get_parent(); if(r){this._clearSiblingsWidth(); m.RadMenu._adjustChildrenWidth(r,s); }}}; m.RadMenuItem.registerClass("Telerik.Web.UI.RadMenuItem",m.ControlItem); })($telerik.$); Type.registerNamespace("Telerik.Web.UI"); Telerik.Web.UI.RadMenuItemCollection=function(a){Telerik.Web.UI.RadMenuItemCollection.initializeBase(this,[a]); }; Telerik.Web.UI.RadMenuItemCollection.prototype={}; Telerik.Web.UI.RadMenuItemCollection.registerClass("Telerik.Web.UI.RadMenuItemCollection",Telerik.Web.UI.ControlItemCollection); Type.registerNamespace("Telerik.Web.UI"); (function(){var b=$telerik.$,a=Telerik.Web.UI; b.registerEnum(a,"ItemFlow",{Vertical:0,Horizontal:1}); b.registerEnum(a,"ExpandDirection",{Auto:0,Up:1,Down:2,Left:3,Right:4}); b.registerEnum(a,"MenuRepeatDirection",{Vertical:0,Horizontal:1}); a.RadMenuItemGroupSettings=function(c,e){if(e){for(var f in e){this[f]=e[f]; }}for(var f in c){var d=this["set_"+f]; if(d){d.call(this,c[f]); }}}; b.registerControlProperties(a.RadMenuItemGroupSettings,{flow:a.ItemFlow.Vertical,expandDirection:a.ExpandDirection.Auto,offsetX:0,offsetY:0,width:null,height:null,repeatDirection:a.MenuRepeatDirection.Vertical,repeatColumns:1}); a.RadMenuItemGroupSettings.registerClass("Telerik.Web.UI.RadMenuItemGroupSettings"); })(); (function(){var b=$telerik.$; var a=Telerik.Web.UI; a.MenuItemScroller=function(c,d){this._leftArrowCssClass="rmLeftArrow"; this._rightArrowCssClass="rmRightArrow"; this._topArrowCssClass="rmTopArrow"; this._bottomArrowCssClass="rmBottomArrow"; this._leftArrowDisabledCssClass="rmLeftArrowDisabled"; this._rightArrowDisabledCssClass="rmRightArrowDisabled"; this._topArrowDisabledCssClass="rmTopArrowDisabled"; this._bottomArrowDisabledCssClass="rmBottomArrowDisabled"; this._arrowsZIndex=2000; this._scroller=null; this._childListElement=c; this._scrollElement=null; this._orientation=null; this._minScrollPosition=null; this._itemFlow=d; this._scrollerPositionChangedDelegate=null; this._decArrow=null; this._incArrow=null; this._rtl=a.RadMenu._requiresRightToLeft(c); }; a.MenuItemScroller.prototype={initialize:function(){this._childListElement.style.position="relative"; this._scrollElement=this._childListElement.parentNode; this._orientation=a.ScrollerOrientation.Horizontal; if(this._itemFlow==a.ItemFlow.Vertical){this._orientation=a.ScrollerOrientation.Vertical; }this._scroller=new a.Scroller(this._childListElement,this._scrollElement,this._orientation); this._scroller.initialize(); this._createArrows(); this._scroller.resetState(); this._scrollerPositionChangedDelegate=Function.createDelegate(this,this._onScrollerPositionChanged); this._scroller.add_positionChanged(this._scrollerPositionChangedDelegate); },dispose:function(){if(this._scroller){this._scroller.dispose(); this._scroller=null; var c=b(this._decArrow).add(b(this._incArrow)); if($telerik.isIE){c.unbind(".menuScroller"); }c.remove(); }this._scrollerPositionChangedDelegate=null; },updateState:function(){this._updateScrollingLimits(); this._updateArrows(); },resetState:function(){this._scroller.resetState(); },startScroll:function(d,c){this._scroller.startScroll(d,c); },changeScrollSpeed:function(c){this._scroller.changeScrollSpeed(c); },stopScroll:function(){this._scroller.stopScroll(); },scrollToMaxPosition:function(){this._scroller.scrollToMaxPosition(); },get_currentPosition:function(){return this._scroller._currentPosition; },set_currentPosition:function(c){this._scroller._scrollTo(Math.max(Math.min(this._scroller._maxPosition,c),this._scroller._minPosition)); },_createArrows:function(){this._decArrow=this._createArrowDomElement(); this._incArrow=this._createArrowDomElement(); if(this._orientation==a.ScrollerOrientation.Vertical){this._decArrow.style.left="0px"; this._decArrow.style.top="0px"; this._incArrow.style.left="0px"; this._incArrow.style.bottom="0px"; }else{this._decArrow.style.top="0px"; this._decArrow.style.left="-1px"; this._incArrow.style.top="0px"; this._incArrow.style.right="-1px"; }},_createArrowDomElement:function(){var c=document.createElement("a"); c.href="#"; c.style.zIndex=this._arrowsZIndex; c.appendChild(document.createTextNode(" ")); if($telerik.isIE){b(c).bind("dragstart.menuScroller",function(){return false; }); }this._scrollElement.appendChild(c); return c; },_updateArrows:function(){var d=this._scroller.isAtMinPosition(); var c=this._scroller.isAtMaxPosition(); if(d){this._decArrow.disabled="disabled"; this._setElementCssClass(this._decArrow,this._getDecArrowCssClass(false)); }else{this._decArrow.disabled=""; this._setElementCssClass(this._decArrow,this._getDecArrowCssClass(true)); }if(c){this._incArrow.disabled="disabled"; this._setElementCssClass(this._incArrow,this._getIncArrowCssClass(false)); }else{this._incArrow.disabled=""; this._setElementCssClass(this._incArrow,this._getIncArrowCssClass(true)); }},_updateScrollingLimits:function(){var g=0; var f=0; var e=0; if(this._orientation==a.ScrollerOrientation.Vertical){g=this._childListElement.offsetHeight-this._scrollElement.offsetHeight; f=this._decArrow.offsetHeight; e=this._incArrow.offsetHeight; }else{g=this._childListElement.offsetWidth-this._scrollElement.offsetWidth; f=this._decArrow.offsetWidth; e=this._incArrow.offsetWidth; }var d=0; var c=g; if(this._rtl&&$telerik.isIE8){d=-g; c=0; }this._scroller.setScrollingLimits(d,c); },_getDecArrowCssClass:function(c){if(this._orientation==a.ScrollerOrientation.Vertical){return c?this._topArrowCssClass:this._topArrowDisabledCssClass; }else{return c?this._leftArrowCssClass:this._leftArrowDisabledCssClass; }},_getIncArrowCssClass:function(c){if(this._orientation==a.ScrollerOrientation.Vertical){return c?this._bottomArrowCssClass:this._bottomArrowDisabledCssClass; }else{return c?this._rightArrowCssClass:this._rightArrowDisabledCssClass; }},_setElementCssClass:function(e,d){var c=e.className; if(c!=d){e.className=d; }},_onScrollerPositionChanged:function(c,d){this._updateArrows(); }}; a.MenuItemScroller.registerClass("Telerik.Web.UI.MenuItemScroller",null,Sys.IDisposable); })(); if(typeof(Sys)!==''undefined'')Sys.Application.notifyScriptLoaded();