(function(a,k){Type.registerNamespace("Telerik.Web.UI"); var b=Telerik.Web.UI,j="rmLink",d="rmDisabled",e="rmExpanded",f="rmFocused",h="rmSelected",c="rmClicked",g="",i="."; a.registerEnum(b,"RadMenuItemState",{Closed:0,Open:1,AboutToClose:2,AboutToOpen:3}); a.registerEnum(b,"MenuItemExpandMode",{ClientSide:0,WebService:1}); b.BaseMenuItem=function(){b.BaseMenuItem.initializeBase(this); this._zIndexStep=1000; this._defaultScrollSize=16; this._menu=null; this._groupSettings=new b.RadMenuItemGroupSettings({}); this._imageUrl=null; this._enableImageSprite=null; this._flow=null; this._openedItem=null; this._timeoutRef=null; this._focused=false; this._clicked=false; this._hovered=false; this._isImageOnly=null; this._itemsLoaded=false; this._itemsLoading=false; this._adjustSiblingsWidthOnShow=false; this._state=b.RadMenuItemState.Closed; this._linkElement=null; this._templateElement=null; this._imageElement=null; this._childListElement=null; this._scrollWrapElement=null; this._slideWrapElement=null; this._animatedElement=null; this._animationContainer=null; this._childrenDetached=false; this._autoScrollActive=false; this._animationContainerOriginalSize=null; this._collapseAnimationEndedDelegate=null; this._expandAnimationEndedDelegate=null; this._slide=null; this._scroller=null; this._styleCssText=null; this._hasItems=null; this._view=null; }; b.BaseMenuItem.prototype={_disposeDomElement:function(){var l=this._slideWrapElement,m=this._parentItemElement; if(l){l._item=null; l._itemTypeName=null; }if(m){m._item=null; m._itemTypeName=null; }this._childListElement=null; this._contentTemplateContainer=null; this._linkElement=null; this._imageElement=null; this._textElement=null; this._toggleButtonElement=null; this._slideWrapElement=null; this._parentItemElement=null; this._scrollWrapElement=null; this._animatedElement=null; },get_linkElement:function(){if(!this._linkElement){this._linkElement=a(this.get_element()).children(i+j).get(0); }return this._linkElement; },get_templateElement:function(){return null; },get_imageElement:function(){return null; },get_menu:function(){return this._getControl(); },get_items:function(){return this._getChildren(); },get_navigateUrl:function(){var l=this.get_linkElement(); if(!this.get_enabled()&&l){return a(l).data("href"); }else{return this._getNavigateUrl(); }},get_target:function(){return this._properties.getValue("target",null); },set_target:function(l){this._properties.setValue("target",l); if(this.get_linkElement()){this.get_linkElement().target=l; }},get_groupSettings:function(){return null; },set_groupSettings:function(l){},get_isOpen:function(){if(this.get_parent()){return this.get_parent().get_openedItem()==this; }return false; },get_nextItem:function(){return this.get_nextSibling(); },get_previousItem:function(){return this.get_previousSibling(); },get_focusedItem:function(){return this._focusedItem; },get_isSeparator:function(){return this._properties.getValue("isSeparator",false); },set_isSeparator:function(l){this._properties.setValue("isSeparator",l,true); },get_openedItem:function(){return this._openedItem; },get_templated:function(){return this._properties.getValue("templated",false)==true; },get_hasContentTemplate:function(){return this._properties.getValue("hasContentTemplate",false)==true; },get_focused:function(){return this._focused; },set_focused:function(l){this._setFocused(l); },get_selected:function(){return this._properties.getValue("selected",false)==true; },set_selected:function(m){if(!this.get_enabled()&&m){return; }if(this.get_selected()==m){return; }this._properties.setValue("selected",m); var l=this.get_menu(); if(!l){return; }if(m){l._clearSelectedItem(); l._registerSelectedItem(this); }else{l._unregisterSelectedItem(this); }this._updateImageSrc(); this._updateLinkClass(); },get_hoveredImageUrl:function(){return this._properties.getValue("hoveredImageUrl",null); },set_hoveredImageUrl:function(l){this._properties.setValue("hoveredImageUrl",l,true); },get_clickedImageUrl:function(){return this._properties.getValue("clickedImageUrl",null); },set_clickedImageUrl:function(l){this._properties.setValue("clickedImageUrl",l,true); },get_selectedImageUrl:function(){return this._properties.getValue("selectedImageUrl",null); },set_selectedImageUrl:function(l){this._properties.setValue("selectedImageUrl",l,true); },get_imageUrl:function(){return this._properties.getValue("imageUrl",null); },set_imageUrl:function(l){this._properties.setValue("imageUrl",l,true); },get_expandedImageUrl:function(){return this._properties.getValue("expandedImageUrl",null); },set_expandedImageUrl:function(l){this._properties.setValue("expandedImageUrl",l,true); },get_disabledImageUrl:function(){return this._properties.getValue("disabledImageUrl",null); },set_disabledImageUrl:function(l){this._properties.setValue("disabledImageUrl",l,true); },get_disabledCssClass:function(){return this._properties.getValue("disabledCssClass",d); },set_disabledCssClass:function(l){this._properties.setValue("disabledCssClass",l,true); this._updateLinkClass(); },get_expandedCssClass:function(){return this._properties.getValue("expandedCssClass",e); },set_expandedCssClass:function(l){this._properties.setValue("expandedCssClass",l,true); this._updateLinkClass(); },get_focusedCssClass:function(){return this._properties.getValue("focusedCssClass",f); },set_focusedCssClass:function(l){this._properties.setValue("focusedCssClass",l,true); this._updateLinkClass(); },get_selectedCssClass:function(){return this._properties.getValue("selectedCssClass",h); },set_selectedCssClass:function(l){this._properties.setValue("selectedCssClass",l,true); this._updateLinkClass(); },get_clickedCssClass:function(){return this._properties.getValue("clickedCssClass",c); },set_clickedCssClass:function(l){this._properties.setValue("clickedCssClass",l,true); this._updateLinkClass(); },get_outerCssClass:function(){return this._properties.getValue("outerCssClass",g); },set_outerCssClass:function(m){var l=this.get_outerCssClass(); this._properties.setValue("outerCssClass",m,true); this._updateItemClass(l,m); },get_postBack:function(){return this._properties.getValue("postBack",true)==true; },set_postBack:function(l){this._properties.setValue("postBack",l); },get_expandMode:function(){return this._properties.getValue("expandMode",b.MenuItemExpandMode.ClientSide); },set_expandMode:function(l){this._properties.setValue("expandMode",l,true); },set_enabled:function(l){b.BaseMenuItem.callBaseMethod(this,"set_enabled",[l]); this._updateLinkClass(); this._updateImageSrc(); if(l){this._restoreNavigateUrl(); }else{this._clearNavigateUrl(); }},set_enableImageSprite:function(l){this._properties.setValue("enableImageSprite",l); this._enableImageSprite=l; },get_enableImageSprite:function(){if(this._enableImageSprite===null){var m=this.get_menu(),l=this._properties.getValue("enableImageSprite",null); if(m!=null&&l===null){this._enableImageSprite=m._enableImageSprites; }else{this._enableImageSprite=l||false; }}return this._enableImageSprite; },get_level:function(){var m=this.get_parent(); var l=0; while(m){if(b.ControlItemContainer.isInstanceOfType(m)||b.RadMenu.isInstanceOfType(m)){return l; }l++; m=m.get_parent(); }return l; },get_clientTemplate:function(){if(this._clientTemplate){return this._clientTemplate; }else{if(this.get_menu()){return this.get_menu().get_clientTemplate(); }else{return null; }}},set_clientTemplate:function(l){this._clientTemplate=l; },open:function(){this._open(null); },close:function(){this._close(null); },hide:function(){this.set_visible(false); },show:function(){this.set_visible(true); },focus:function(){this._setFocused(true,null); },blur:function(){this._setFocused(false,null); },focusFirstChild:function(l){},focusLastChild:function(l){},focusNextItem:function(l){},focusPreviousItem:function(l){},select:function(){this.set_selected(true); this.click(); },unselect:function(){this.set_selected(false); },disable:function(){this.set_enabled(false); },enable:function(){this.set_enabled(true); },click:function(){this._click(null); },bindTemplate:function(l){if(!l){l=this._extractDataItem(); }this._renderedClientTemplate=b.TemplateRenderer.renderTemplate(l,this.get_menu(),this); if(this.get_element()){this._applyTemplate(); }},_extractDataItem:function(){return{Text:this.get_text(),Value:this.get_value(),ImageUrl:this.get_imageUrl(),SelectedImageUrl:this.get_selectedImageUrl(),ClickedImageUrl:this.get_clickedImageUrl(),DisabledImageUrl:this.get_disabledImageUrl(),ExpandedImageUrl:this.get_expandedImageUrl(),HoveredImageUrl:this.get_hoveredImageUrl(),Attributes:this.get_attributes()._data}; },_applyTemplate:function(){if(!this._renderedClientTemplate){return; }var l="
"+this._renderedClientTemplate+"
"; a("a.rmLink",this._element).replaceWith(l); a(this._element).addClass("rmTemplate"); },_shouldInitializeChild:function(){return true; },_removeToggleButton:function(){var m=this._getToggleButtonElement(),l=m.parentNode; l.removeChild(m); this._toggleButtonElement=null; },_createItemCollection:function(){var l=new b.RadMenuItemCollection(this); b.RadMenu._createChildControls(this,l); return l; },_getHasItems:function(){if(this._hasItems===null){this._hasItems=this.get_itemData()&&this.get_itemData().length>0; }return this._hasItems; },_setHasItems:function(l){this._hasItems=l; },_hasMultipleColumns:function(){return false; },_clearNavigateUrl:function(){var l=this.get_linkElement(); if(!l){return; }if(!this.get_enabled()&&l.href){a(l).data("href",this._getNavigateUrl()); a(l).removeAttr("href"); }},_restoreNavigateUrl:function(){var m=this.get_linkElement(); if(!m){return; }var l=a(m).data("href"); if(this.get_enabled()&&l){m.href=l; }},_getData:function(){var l=b.BaseMenuItem.callBaseMethod(this,"_getData"); var m=this.get_navigateUrl(); if(m&&m!="#"&&(location.href+"#"!==m)){l.navigateUrl=m; }if(this.get_imageUrl()!==null){l.imageUrl=this.get_imageUrl(); }return l; },_loadFromDictionary:function(l,q){var o={}; for(var m in l){if(m==="__type"||m==="Attributes"){continue; }var n=m.charAt(0).toLowerCase()+m.substr(1); var p=l[m]; if(p===null||p===""){continue; }o[n]=p; }this._properties.load(o); if(l.Attributes){this.get_attributes()._load(l.Attributes,q); }},_replaceCssClass:function(l,n,m){l.className=l.className.replace(n,m); },_cacheDomProperties:function(){this.get_disabledImageUrl(); this.get_expandedImageUrl(); this.get_hoveredImageUrl(); this.get_selectedImageUrl(); this.get_imageUrl(); this.get_text(); this.get_navigateUrl(); this.get_target(); for(var l=0; l0||this.get_hasContentTemplate()||this._isWebServiceCallNeeded()); },_shouldPostBack:function(){if(!this.get_menu()){return false; }return this.get_postBack()&&this.get_menu()._postBackReference; },_canFocus:function(){return(!this.get_isSeparator())&&this.get_enabled()&&this.get_visible(); },_isWebServiceCallNeeded:function(){if(this._itemsLoading){return false; }return(!this._itemsLoaded&&this.get_expandMode()==b.MenuItemExpandMode.WebService); },_loadChildrenFromWebService:function(){var l=this.get_menu(); if(l._clientDataSourceID){l._loadChildrenFromClientDataSource(this); }else{l._loadChildrenFromWebService(this); }}}; b.BaseMenuItem.registerClass("Telerik.Web.UI.BaseMenuItem",b.ControlItem); })($telerik.$); (function(a,b){a.RadMenuItemCollection=function(c){a.RadMenuItemCollection.initializeBase(this,[c]); }; a.RadMenuItemCollection.prototype={}; a.RadMenuItemCollection.registerClass("Telerik.Web.UI.RadMenuItemCollection",a.ControlItemCollection); })(Telerik.Web.UI); (function(a){a.RadMenuItemEventArgs=function(c,b){a.RadMenuItemEventArgs.initializeBase(this); this._item=c; this._domEvent=b||null; }; a.RadMenuItemEventArgs.prototype={get_item:function(){return this._item; },get_domEvent:function(){return this._domEvent; }}; a.RadMenuItemEventArgs.registerClass("Telerik.Web.UI.RadMenuItemEventArgs",Sys.EventArgs); a.RadMenuItemCancelEventArgs=function(c,b){a.RadMenuItemCancelEventArgs.initializeBase(this); this._item=c; this._domEvent=b||null; }; a.RadMenuItemCancelEventArgs.prototype={get_item:function(){return this._item; },get_domEvent:function(){return this._domEvent; }}; a.RadMenuItemCancelEventArgs.registerClass("Telerik.Web.UI.RadMenuItemCancelEventArgs",Sys.CancelEventArgs); a.RadMenuMouseOverEventArgs=function(c,b){a.RadMenuMouseOverEventArgs.initializeBase(this,[c,b||null]); }; a.RadMenuMouseOverEventArgs.registerClass("Telerik.Web.UI.RadMenuMouseOverEventArgs",a.RadMenuItemEventArgs); a.RadMenuMouseOutEventArgs=function(c,b){a.RadMenuMouseOutEventArgs.initializeBase(this,[c,b||null]); }; a.RadMenuMouseOutEventArgs.registerClass("Telerik.Web.UI.RadMenuMouseOutEventArgs",a.RadMenuItemEventArgs); a.RadMenuItemFocusEventArgs=function(c,b){a.RadMenuItemFocusEventArgs.initializeBase(this,[c,b||null]); }; a.RadMenuItemFocusEventArgs.registerClass("Telerik.Web.UI.RadMenuItemFocusEventArgs",a.RadMenuItemEventArgs); a.RadMenuItemBlurEventArgs=function(c,b){a.RadMenuItemBlurEventArgs.initializeBase(this,[c,b||null]); }; a.RadMenuItemBlurEventArgs.registerClass("Telerik.Web.UI.RadMenuItemBlurEventArgs",a.RadMenuItemEventArgs); a.RadMenuItemClickingEventArgs=function(c,b){a.RadMenuItemClickingEventArgs.initializeBase(this,[c,b||null]); }; a.RadMenuItemClickingEventArgs.registerClass("Telerik.Web.UI.RadMenuItemClickingEventArgs",a.RadMenuItemCancelEventArgs); a.RadMenuItemClickedEventArgs=function(c,b){a.RadMenuItemClickedEventArgs.initializeBase(this,[c,b||null]); }; a.RadMenuItemClickedEventArgs.registerClass("Telerik.Web.UI.RadMenuItemClickedEventArgs",a.RadMenuItemEventArgs); a.RadMenuItemOpeningEventArgs=function(c,b){a.RadMenuItemOpeningEventArgs.initializeBase(this,[c,b||null]); }; a.RadMenuItemOpeningEventArgs.registerClass("Telerik.Web.UI.RadMenuItemOpeningEventArgs",a.RadMenuItemCancelEventArgs); a.RadMenuItemOpenedEventArgs=function(c,b){a.RadMenuItemOpenedEventArgs.initializeBase(this,[c,b||null]); }; a.RadMenuItemOpenedEventArgs.registerClass("Telerik.Web.UI.RadMenuItemOpenedEventArgs",a.RadMenuItemEventArgs); a.RadMenuItemClosingEventArgs=function(c,b){a.RadMenuItemClosingEventArgs.initializeBase(this,[c,b||null]); }; a.RadMenuItemClosingEventArgs.registerClass("Telerik.Web.UI.RadMenuItemClosingEventArgs",a.RadMenuItemCancelEventArgs); a.RadMenuItemClosedEventArgs=function(c,b){a.RadMenuItemClosedEventArgs.initializeBase(this,[c,b||null]); }; a.RadMenuItemClosedEventArgs.registerClass("Telerik.Web.UI.RadMenuItemClosedEventArgs",a.RadMenuItemEventArgs); a.RadMenuItemPopulatingEventArgs=function(c,b){a.RadMenuItemPopulatingEventArgs.initializeBase(this,[c]); this._context=b; }; a.RadMenuItemPopulatingEventArgs.prototype={get_context:function(){return this._context; }}; a.RadMenuItemPopulatingEventArgs.registerClass("Telerik.Web.UI.RadMenuItemPopulatingEventArgs",a.RadMenuItemCancelEventArgs); a.RadMenuItemPopulatedEventArgs=function(b){a.RadMenuItemPopulatedEventArgs.initializeBase(this,[b]); }; a.RadMenuItemPopulatedEventArgs.registerClass("Telerik.Web.UI.RadMenuItemPopulatedEventArgs",a.RadMenuItemEventArgs); a.RadMenuItemPopulationFailedEventArgs=function(c,b){a.RadMenuItemPopulationFailedEventArgs.initializeBase(this,[c]); this._errorMessage=b; }; a.RadMenuItemPopulationFailedEventArgs.prototype={get_errorMessage:function(){return this._errorMessage; }}; a.RadMenuItemPopulationFailedEventArgs.registerClass("Telerik.Web.UI.RadMenuItemPopulationFailedEventArgs",a.RadMenuItemCancelEventArgs); })(Telerik.Web.UI); Type.registerNamespace("Telerik.Web.UI"); $telerik.findMenu=$find; $telerik.toMenu=function(a){return a; }; (function(a,b,I){var g=".",v="RadMenu_rtl",r="RadMenuPopup",s="RadMenuPopup_rtl",j="rmDisabled",h="rmSlide",n="rmItem",p="rmLink",w="rmToggle",u="rmRootToggle",q="rmParentItem",t="rmRootGroup",l="rmGroup",m="rmHiddenPointer",o="rmLeft",k="rmExpanded",i=".rmTopArrow, .rmBottomArrow, .rmLeftArrow, .rmRightArrow",d="click",D="mouseup",x=$telerik.isTouchDevice?"touchend":"click",A=$telerik.isTouchDevice?"touchstart":"mousedown",z=$telerik.isTouchDevice?"touchend":"mouseup",y=$telerik.isTouchDevice?"mouseup":"click",C=$telerik.isTouchDevice?"touchstart":"mouseover",B=$telerik.isTouchDevice?"touchend":"mouseout",E="mousewheel",f="DOMMouseScroll",e=14,F="(orientation: portrait)",c={left:"100%",opacity:0},G={left:0,opacity:1},H="matchMedia" in window; b.RadMenu=function(J){b.RadMenu.initializeBase(this,[J]); this._childTypeName=""; this._selectedValue=""; this._itemData=null; this._expandAnimation=new b.AnimationSettings({}); this._collapseAnimation=new b.AnimationSettings({}); this._flow=b.ItemFlow.Horizontal; this._defaultGroupSettings=new b.RadMenuItemGroupSettings({}); this._childListElement=null; this._popUpElement=null; this._postBackReference=null; this._onClickDelegate=null; this._webServiceSettings=new b.WebServiceSettings({}); this._persistLoadOnDemandItems=true; this._enableOverlay=true; this._childListElementCssClass=""; this._selectedItemIndex=null; this._enabled=true; this._visible=true; this._openedItem=null; this._childrenDetached=false; this._originalZIndex=null; this._defaultZIndex=7000; this._zIndexIncrementDepth=0; this._fireEvents=true; this._webServiceLoader=null; this._onMouseOutDelegate=null; this._onClickDelegate=null; this._isUsedOnTouchDevices=false; this._cachedClickedIndex=null; this._rightToLeft=null; this._skin=null; this._enableItemImagesPreloading=false; this._keyboardNavigator=null; this._isMobile=false; this._opened=false; this._maintainState=false; this._clientDataSource=null; this._dataFieldParentID=""; this._dataFieldID=""; this._dataNavigateUrlField=""; this._animatedHeight=200; this._popUpHeight=""; }; b.RadMenu.prototype={initialize:function(){this._isMobile=this._renderMode===b.RenderMode.Mobile; this._childTypeName=this._isMobile?"Telerik.Web.UI.MobileMenuItem":"Telerik.Web.UI.RadMenuItem"; b.RadMenu.callBaseMethod(this,"initialize"); if(this._isMobile){this._initializeMobile(); }else{this._initialize(); }if(!this.get_enabled()){this.set_enabled(false); }if(this.get_webServiceSettings().get_isOData()){this._initializeWebServiceLoader(); if(this.get_items().get_count()==0){var J=a.raiseCancellableControlEvent(this,"menuPopulating",{}); if(!J){this._webServiceLoader.loadData({isRootLevel:true},this); }}}this._raiseEvent("load",null); this._initializeExpandState(); this._initializeClientDataSource(); },_initialize:function(){b.RadMenu.ExtendWithView(this,this,"ExtendMenuWithView"); var L=this,K=L.get_element(),J=a(L._getMainElement()); this._isUsedOnTouchDevices=$telerik.isTouchDevice; K.value=this._selectedValue; if(this.get_rightToLeft()){this._initRightToLeft(); }if(this._flow==b.ItemFlow.Vertical&&this.get_childListElement()){this._adjustRootItemWidth(); }this._originalZIndex=parseInt($telerik.getCurrentStyle(K,"zIndex")); if(!this._originalZIndex){K.style.zIndex=this._defaultZIndex; this._originalZIndex=this._defaultZIndex; }this._keyboardNavigator=new b.RadMenu.KeyboardNavigator(this); this._onClickDelegate=Function.createDelegate(this,this._onClick); $telerik.addHandler(document,d,this._onClickDelegate); if(!this.get_clickToOpen()){if($telerik.isIE){this._onMouseOutDelegate=Function.createDelegate(this,this._onMouseOut); $telerik.addExternalHandler(document.documentElement,"mouseout",this._onMouseOutDelegate); }}if(this._isUsedOnTouchDevices){J.on(d,g+n,function(M){L._onItemTouchEnd(M); }); }else{this._eventMap.addHandlerForClassName("mouseover",n,this._onItemMouseOver); this._eventMap.addHandlerForClassName("mouseout",n,this._onItemMouseOut,true); this._eventMap.addHandlerForClassName("dragstart",n,this._onItemDragStart); this._eventMap.addHandlerForClassName(d,p,this._onItemClick); this._eventMap.addHandlerForClassName(d,n,this._onItemClick); }this._eventMap.addHandlerForClassName("mouseover",p,this._onLinkMouseOver); this._eventMap.addHandlerForClassName("mouseout",p,this._onLinkMouseOut,true); this._eventMap.addHandlerForClassName(A,p,this._onLinkMouseDown); this._eventMap.addHandlerForClassName(z,p,this._onLinkMouseUp); this._eventMap.addHandlerForClassName("blur",p,this._onLinkBlur); this._eventMap.addHandlerForClassName("deactivate",p,this._onLinkBlur); this._eventMap.addHandlerForClassName("focus",p,this._onLinkFocus); this._eventMap.addHandlerForClassName("activate",p,this._onLinkFocus); this._eventMap.addHandlerForClassName("keydown",p,this._onLinkKeyDown); if($telerik.isFirefox){J.on(f,function(M){L._onItemMousewheel(M); }); }J.on(A,i,function(M){L._onArrowMouseDown(M.target); }).on(z,i,function(M){L._onArrowMouseUp(M.target); }).on(C,i,function(M){L._onArrowMouseOver(M.target,b.RadMenu._resolveDirectionFromClass(this.className)); }).on(B,i,function(M){L._onArrowMouseOut(M.target); }).on(E,g+n,function(M){L._onItemMousewheel(M); }).on(d,i,function(M){M.preventDefault(); M.stopPropagation(); }); this._initializeScroller(); },_initializeMobile:function(){var L=this,J=a(L._getPopUpElement()),K=a(L._element).find(g+u); this._detachPopUpContainer(); this._sizeAnimationContainer(); if(this.get_rightToLeft()){J.addClass(s).attr("dir","rtl"); }J.on(x,g+n,function(M){M.stopPropagation(); }).on(x,g+p,function(M){M.stopPropagation(); L._onLinkClick(M); }).on(x,g+w,function(M){M.stopPropagation(); M.preventDefault(); setTimeout(function(){L._onToggleClick(M); },150); }).on(x,g+q,function(M){M.stopPropagation(); M.preventDefault(); setTimeout(function(){L._onParentItemClick(M); },150); }).on(x,g+l,function(M){M.stopPropagation(); }); K.on(x,function(M){M.stopPropagation(); if(!L._opened){L._positionPopUpContainer(); }L._animatePopUp(); }); a(document).on(y+g+L.get_id(),function(M){if(M.button&&M.button!=0){return; }if(L._opened){L._animatePopUp(); }}); if($telerik.isTouchDevice){J.on(D,g+n,function(M){M.stopPropagation(); }).on(D,g+p,function(M){M.stopPropagation(); }).on(D,g+l,function(M){M.stopPropagation(); }); K.on(D,function(M){M.stopPropagation(); }); }if(H){L._mediaListenerDelegate=Function.createDelegate(L,L._onOrientationChange); L._mediaQuery=window.matchMedia(F); L._mediaQuery.addListener(L._mediaListenerDelegate); }},dispose:function(){if(this._isMobile){this._disposeMobile(); }else{this._diposeDesktop(); }b.RadMenu.callBaseMethod(this,"dispose"); },_diposeDesktop:function(){if(this._keyboardNavigator){this._keyboardNavigator._dispose(); this._keyboardNavigator=null; }if(this._onClickDelegate){$telerik.removeHandler(document,d,this._onClickDelegate); this._onClickDelegate=null; }if(this._onMouseOutDelegate){$telerik.removeExternalHandler(document.documentElement,"mouseout",this._onMouseOutDelegate); this._onMouseOutDelegate=null; }if(this._isUsedOnTouchDevices){a(this.get_childListElement()).off(); }if(this._eventMap){this._eventMap.dispose(); this._eventMap=null; }a(this._element).off(); if(this._scroller){this._scroller.dispose(); this._scroller=null; }},_disposeMobile:function(){this._popUpElement=null; this._animationContainer=null; a(this._getPopUpElement()).off(); a(this._element).find(g+u).off(); a(document).off(y+g+this.get_id()); if(this._mediaQuery&&this._mediaListenerDelegate){this._mediaQuery.removeListener(this._mediaListenerDelegate); this._mediaListenerDelegate=null; }},get_maintainState:function(){return this._maintainState; },set_maintainState:function(J){this._maintainState=!!J; },get_items:function(){return this._getChildren(); },set_items:function(J){this._children=J; },get_childListElement:function(){var J,L,K; if(!this._childListElement){K=this._getPopUpElement(); if(K){this._childListElement=a(K).find(g+t).get(0); }else{J=this.get_element(); L=this._getScrollWrapElement(); if(L){J=L; }this._childListElement=$telerik.getFirstChildByTagName(J,"ul",0); }}return this._childListElement; },get_expandAnimation:function(){return this._expandAnimation; },set_expandAnimation:function(K){var J=Sys.Serialization.JavaScriptSerializer.deserialize(K); this._expandAnimation=new b.AnimationSettings(J); },get_collapseAnimation:function(){return this._collapseAnimation; },set_collapseAnimation:function(K){var J=Sys.Serialization.JavaScriptSerializer.deserialize(K); this._collapseAnimation=new b.AnimationSettings(J); },get_defaultGroupSettings:function(){return this._defaultGroupSettings; },set_defaultGroupSettings:function(K){var J=Sys.Serialization.JavaScriptSerializer.deserialize(K); this._defaultGroupSettings=new b.RadMenuItemGroupSettings(J); },get_itemData:function(){return this._itemData; },set_itemData:function(J){if(this._enableItemImagesPreloading){b.RadMenu._preloadItemImages(J); }this._itemData=J; },set_enabled:function(O){b.RadMenu.callBaseMethod(this,"set_enabled",[O]); if(!this.get_isInitialized()){return; }this.get_element().disabled=!O; var N=this.get_items(),J=a(this._getRootToggleElement()),M=N.get_count(),K=O?"enable":"disable"; J.toggleClass(j,!O); this[K+"Events"](); for(var L=0; LMath.round(L/2)){M.right=L-(N.left+K.outerWidth()); J.removeClass(o); }else{M.left=N.left; J.addClass(o); }M.top=N.top+K.height()+e; J.css(M); },_initializeExpandState:function(){var J=this._cachedClickedIndex; if(this._isUsedOnTouchDevices&&J){var K=this._findItemByHierarchicalIndex(J); if(K&&K.get_items().get_count()>0){b.RadMenu._expandItemsRecursively(this,J); }}},_isMainElementDescendant:function(J){return $telerik.isDescendant(this.get_element(),J); },_createChildControls:function(){this._children=new b.RadMenuItemCollection(this); b.RadMenu._createChildControls(this,this._children); },_createChildListElement:function(){if(!this._childListElementCssClass){return; }var L=this._getPopUpElement()||this.get_element(),J=a(""),K=a(L).find("div.rmScrollWrap, div.rmSlide"); if(K.length==1){J.appendTo(K); }else{J.appendTo(L); }},_getChildElements:function(){return a(this.get_childListElement()).children(".rmItem"); },_getRootToggleElement:function(){if(!this._rootToggleElement){this._rootToggleElement=a(this._element).find(g+u).get(0); }return this._rootToggleElement; },_getPopUpElement:function(){if(!this._popUpElement){this._popUpElement=a(this._element).find(g+r).get(0); }return this._popUpElement; },_getAnimationContainerElement:function(){if(!this._animationContainer){this._animationContainer=a(this._popUpElement).find(g+h).get(0); }return this._animationContainer; },_getScrollWrapElement:function(){if(!this._scrollWrapElement){var J=$telerik.getFirstChildByTagName(this.get_element(),"div",0); if(J&&Sys.UI.DomElement.containsCssClass(J,"rmScrollWrap")){this._scrollWrapElement=J; }}return this._scrollWrapElement; },_clearSelectedItem:function(){var J=this.get_selectedItem(); if(J){J.set_selected(false); }},_registerSelectedItem:function(J){this._selectedItemIndex=J._getHierarchicalIndex(); this.updateClientState(); this._updateValidationField(J); },_unregisterSelectedItem:function(J){if(J._getHierarchicalIndex()!=this._selectedItemIndex){return; }this._selectedItemIndex=null; this.updateClientState(); this._updateValidationField(this.get_selectedItem()); },_updateValidationField:function(J){var K=""; if(J){K=J.get_value(); if(K===null){K=J.get_text(); }}this.get_element().value=K; },_onMouseOut:function(J){var L=J.relatedTarget?J.relatedTarget:J.toElement,M=this; if(!L&&!this._isMainElementDescendant(J.target)){try{setTimeout(function(){M.close(); },this.get_collapseDelay()); }catch(K){}}},_onClick:function(K){if(!this._isMainElementDescendant(K.target)){var J=this.get_clickToOpen(); if(this._focusedItem||J){this.close(); }}},_onItemMouseOver:function(J){var K=this._extractItemFromDomElement(J.eventMapTarget),M,L,N=J.target; if(!K.get_enabled()){return true; }if(b.RadMenu._isTargetToggleButton(N)){if(J.preventDefault){J.preventDefault(); }return false; }K._preventClose(); if(this.get_clickToOpen()&&!this.get_clicked()){return true; }if(K._state==b.RadMenuItemState.Open||K._state==b.RadMenuItemState.AboutToOpen){return true; }M=K.get_parent(); L=M.get_openedItem(); if(L&&L!=K){L._clearTimeout(); L._state=b.RadMenuItemState.AboutToClose; L._setTimeout(function(){L.close(); L._timeoutRef=null; },this.get_expandDelay()); }if(!K._shouldOpen()){return true; }K._state=b.RadMenuItemState.AboutToOpen; K._setTimeout(function(){K.open(); K._timeoutRef=null; },this.get_expandDelay()); return true; },_onItemMouseOut:function(J){var L=this._extractItemFromDomElement(J.eventMapTarget),N,K; if(L!=null){if(!L.get_enabled()){return true; }N=J.eventMapRelatedTarget; K=L.get_element(); if(!N||K==N||$telerik.isDescendant(K,N)){return true; }if(L.get_hasContentTemplate()&&$telerik.isDescendant(L._getContentTemplateContainer(),N)){return true; }if(this._childrenDetached&&$telerik.isDescendant(L.get_parent()._getAnimationContainer(),N)){return true; }if(this._scroller&&L.get_level()>0&&!$telerik.isDescendant(this.get_element(),N)){var M=L; while(M.get_level()>0){M=M.get_parent(); if(typeof M.get_level=="undefined"){break; }}this._onItemMouseOut({eventMapTarget:M.get_element(),eventMapRelatedTarget:N}); }if(L._state==b.RadMenuItemState.Closed||L._state==b.RadMenuItemState.AboutToClose){return true; }if(L._state==b.RadMenuItemState.AboutToOpen){L._clearTimeout(); L._state=b.RadMenuItemState.Closed; L.get_parent()._openedItem=null; return true; }if(this.get_clickToOpen()){return true; }L._state=b.RadMenuItemState.AboutToClose; L._setTimeout(function(){L.close(); L._timeoutRef=null; },this.get_collapseDelay()); return true; }},_onItemDragStart:function(J){J.preventDefault(); return false; },_onItemClick:function(K){if(!this.get_enabled()){$telerik.cancelRawEvent(K); return false; }var L=this._extractItemFromDomElement(K.eventMapTarget),M=K.target,J; if(L.get_isSeparator()){return false; }if(b.RadMenu._isTargetToggleButton(M)){if(K.preventDefault){K.preventDefault(); }L._toggleState(K); return false; }J=b.RadMenu._getFirstClickableParent(K.target,L.get_element()); if(J&&!a(J).hasClass(p)){return false; }if(a(K.eventMapTarget).is(g+n)&&L.get_linkElement()){return false; }L._transferFocus(); L._click(K); if(!L._shouldNavigate()){$telerik.cancelRawEvent(K); }return false; },_onItemTouchEnd:function(J){if(!this.get_enabled()){J.preventDefault(); J.stopPropagation(); return; }var N=$telerik.getTouchTarget(J),K=this._extractItemFromDomElement(N),L=K.get_parent(),M=L?L._scroller:null; if(K.get_isSeparator()||(M&&M._touchScrollInAction)){return; }K._transferFocus(); J.stopPropagation(); if(b.RadMenu._isTargetToggleButton(N)){J.preventDefault(); K._toggleState(J); return; }K._click(J); },_onLinkMouseOver:function(J){var M=J.eventMapRelatedTarget,K=this._extractItemFromDomElement(J.eventMapTarget),L; if(!K.get_enabled()){return true; }L=K.get_linkElement(); if(!M||L==M||$telerik.isDescendant(L,M)){return true; }K._hovered=true; K._updateImageSrc(); this._raiseEvent("mouseOver",new b.RadMenuMouseOverEventArgs(K,J)); return true; },_onLinkMouseOut:function(J){var M=J.eventMapRelatedTarget,K=this._extractItemFromDomElement(J.eventMapTarget),L; if(!K.get_enabled()){return true; }L=K.get_linkElement(); if(!M||!L){return; }if(L==M||$telerik.isDescendant(L,M)){return true; }K._hovered=false; K._updateImageSrc(); this._raiseEvent("mouseOut",new b.RadMenuMouseOutEventArgs(K,J)); return true; },_onLinkMouseDown:function(J){var K=this._extractItemFromDomElement(J.eventMapTarget); if(!K.get_enabled()){return true; }K._clicked=true; K._updateLinkClass(); K._updateImageSrc(); return true; },_onLinkMouseUp:function(J){var K=this._extractItemFromDomElement(J.eventMapTarget); if(!K.get_enabled()){return true; }K._clicked=false; K._updateLinkClass(); K._updateImageSrc(); return true; },_onLinkBlur:function(J){var K=this._extractItemFromDomElement(J.eventMapTarget); if(!K.get_enabled()){return true; }K._focused=false; K.blur(); return true; },_onLinkFocus:function(J){var K=this._extractItemFromDomElement(J.eventMapTarget); if(!K.get_enabled()){return true; }K._focused=true; K.focus(); return true; },_onLinkKeyDown:function(J){var K=this._extractItemFromDomElement(J.eventMapTarget); if(!K.get_enabled()){return true; }return this._keyboardNavigator._onKeyDown(J,K); },_onLinkClick:function(J){var L=J.target,K=this._extractItemFromDomElement(L); K._click(J); },_onToggleClick:function(J){var L=J.target,K=this._extractItemFromDomElement(L); K._open(J); },_onParentItemClick:function(J){var L=J.target,K=this._extractItemFromDomElement(L); K._close(J); },_onOrientationChange:function(){if(this._opened){this._positionPopUpContainer(); }this.repaint(); },_animatePopUp:function(){var R=this,J=a(this._getPopUpElement()),K=a(this._getRootToggleElement()),L=a(this._getAnimationContainerElement()),Q,M=this._opened?this.get_collapseAnimation():this.get_expandAnimation(),P={height:this._opened?0:this._animatedHeight},N=M.get_duration(),O=b.AnimationType.toEasing(M.get_type()); if(!this.get_enabled()){return; }if(this._opened){J.addClass(m); Q=function(){J.hide(); R._restoreState(); }; }else{J.removeClass(m); J.show(); }this._opened=!this._opened; K.toggleClass(k,this._opened); L.stopTransition(); if(O!=="easeNone"){L.transition(P,N,O,Q); }else{L.css(P); if(Q){Q(); }}},_sizeAnimationContainer:function(){var L=a(this._getPopUpElement()),K=a(this.get_childListElement()),J=a(this._getAnimationContainerElement()),O=parseInt(this._popUpHeight),M,N={"max-height":Math.round(document.documentElement.clientHeight*0.6)}; if(!this._opened){L.show(); }J.css(N); J.height("auto"); K.height("auto"); M=J.height(); if(M>0){this._animatedHeight=M; }if(!isNaN(O)){J.css("max-height",O); this._animatedHeight=O; }if(K.length>0){K.height(this._animatedHeight); if(J.get(0).style.width===""&&K[0].scrollHeight>K.height()){J.width(J.width()+Telerik.Web.Browser.scrollBarWidth); }}if(this._opened){J.height(this._animatedHeight); }else{J.height(0); L.hide(); }},_purgeEmptyGroup:function(K){if(K==this&&K.hide){K.hide(); }else{K.close(); }if(this._isMobile){this._purgeEmptyGroupMobile(K); return; }b.RadMenu._removeChildListCorners(K); b.RadMenu._removeScrollWrapContainer(K); var J=$telerik.getFirstChildByTagName(K.get_element(),"div",0); if(this!==K&&this.get_showToggleHandle()){K._removeToggleButton(); }if(K._originalExpandMode){K.set_expandMode(K._originalExpandMode); }if(K._slideWrapElement){if($telerik.isIE&&!$telerik.isIE10Mode){K._slideWrapElement.outerHTML=""; }K._slideWrapElement=null; K._scrollWrapElement=null; }K._linkElement=null; K._childListElement=null; K._animatedElement=null; K._animationContainer=null; K._itemsLoaded=false; K._hasItems=false; if(K._updateTextElementClass){K._updateTextElementClass(); }if(this._enableRootItemScroll){K._childrenDetached=false; }if(K==this){return; }if(K._slide){K._slide.dispose(); K._slide=null; }if($telerik.isIE&&J){J.outerHTML=""; }if(J&&J.parentNode){J.parentNode.removeChild(J); }J=null; },_purgeEmptyGroupMobile:function(J){a(J.get_childListElement()).remove(); if(this!==J){J._removeToggleButton(); }J._childListElement=null; J._parentItemElement=null; J._childrenDetached=false; J._itemsLoaded=false; J._hasItems=false; },_childrenCleared:function(J){if(J!=this&&!J._getHasItems()){return; }this._purgeEmptyGroup(J); b.RadMenu.callBaseMethod(this,"_childrenCleared",[J]); },_childInserting:function(J,K,L){if(L!=this&&L.get_hasContentTemplate()){throw new Error("Cannot add items to an RadMenuItem, which has ContentTemplate."); }if(!L._childControlsCreated){return; }this._backupClientState(); },_childInserted:function(J,K,L){this._restoreClientState(); if(L._setHasItems){L._setHasItems(true); }b.RadMenu.callBaseMethod(this,"_childInserted",[J,K,L]); if(!this._isMobile){if(L._updateTextElementClass){L._updateTextElementClass(); }if(L._state&&L._state===b.RadMenuItemState.Open&&this._renderMode===b.RenderMode.Classic){if(K._getWidth()>0){b.RadMenu._adjustChildrenWidth(L); }L._updateColumnWrapSize(); }if(L==this&&this._enableRootItemScroll){this._initializeScroller(); }if(this.get_showToggleHandle()&&L!==this){L._ensureToggleButton(); }}else{if(L!==this){L._ensureToggleButton(); L._ensureChildrenParent(); }}},_attachChildItem:function(K,L,O){if(O==this||!O._hasMultipleColumns()){b.RadMenu.callBaseMethod(this,"_attachChildItem",[K,L,O]); return; }if(!O.get_childListElement()){O._createChildListElement(); }var M=K.get_nextSibling(),N,J; if(M){N=M.get_element(); N.parentNode.insertBefore(L,N); }else{J=O._getColumnForItem(K); a(J).children(".rmGroup").append(L); O._recalculateColumns(); }},_childRemoving:function(J){J.set_selected(false); J._cacheDomProperties(); this._backupClientState(); b.RadMenu.callBaseMethod(this,"_childRemoving",[J]); },_childRemoved:function(K,L){this._restoreClientState(); K.get_text(); var J=K.get_element(); if(L.get_items().get_count()==0){this._purgeEmptyGroup(L); }else{if($telerik.isIE){J.outerHTML=""; }if(J.parentNode){J.parentNode.removeChild(J); }J=null; }b.RadMenu.callBaseMethod(this,"_childRemoved",[K,L]); if(!this._isMobile){if(L._state&&L._state===b.RadMenuItemState.Open&&this._renderMode===b.RenderMode.Classic){b.RadMenu._adjustChildrenWidth(L,true); L._updateColumnWrapSize(); }if(L==this&&this._enableRootItemScroll){this._initializeScroller(); }b.RadMenu._updateChildrenPositionClass(L); }},_backupClientState:function(){this._backupSelectedItem=this.get_selectedItem(); },_restoreClientState:function(){if(this._backupSelectedItem){this._registerSelectedItem(this._backupSelectedItem); }},_getExtendedItemClickingEventArgs:function(J){return J; },_getExtendedItemClickedEventArgs:function(J){return J; },_incrementZIndex:function(K){if(this._zIndexIncrementDepth==0){var J=this.get_element(); J.style.zIndex=this._originalZIndex+K; }this._zIndexIncrementDepth++; },_restoreZIndex:function(){if(this._zIndexIncrementDepth>0){this._zIndexIncrementDepth--; }if(this._zIndexIncrementDepth==0){var J=this.get_element(); J.style.zIndex=this._originalZIndex; }},_restoreState:function(){if(!this.get_maintainState()){var J=function(K){if(K._openedItem){J(K._openedItem); K._openedItem=null; }}; J(this); a(this.get_childListElement()).stopTransition().css(G); a(this._getPopUpElement()).find(".rmGroup:not(.rmRootGroup)").css(c); }},_getMainElement:function(){return this.get_element(); },_initRightToLeft:function(){var J=this._getMainElement(); J.dir="ltr"; this._applyRtlStyles(); for(var K=0; K0){if($telerik.quirksMode){i+=(f.css("border-left-style")!="none"?parseInt(f.css("border-left-width"),10):0)+(f.css("border-right-style")!="none"?parseInt(f.css("border-right-width"),10):0)+(parseInt(f.css("padding-left"),10)||0)+(parseInt(f.css("padding-right"),10)||0); }if($telerik.isIE9Mode||parseFloat(f.css("font-size"))>12){i+=3; }f[0].style.width=Math.ceil(i)+"px"; }else{if(h<3){setTimeout(function(){b.RadMenu._adjustListWidth(g,h); },0); }}}; b.RadMenu._getViewPortSize=function(){var g=$telerik.getViewPortSize(); var f=document.compatMode!="CSS1Compat"; if($telerik.isFirefox&&f){g.height+=document.body.scrollTop; }return g; }; b.RadMenu._updateChildrenPositionClass=function(g){var h=function(i){a(i).children(".rmItem").filter(function(){return(this._item&&this._item.get_visible()); }).removeClass("rmFirst rmLast").filter(":first").addClass("rmFirst").end().filter(":last").addClass("rmLast"); }; if(!g){return; }var f=g.get_childListElement(); if(!f){return; }if(a(f).is(".rmMultiColumn")){a(f).find("> .rmGroupColumn > ul").each(function(){h(this); }); }else{h(f); }}; b.RadMenu._removeChildListCorners=function(f){a(f.get_childListElement()).find(".rmTopRight, .rmBottomLeft, .rmBottomRight, .rmTopFix, .rmBottomFix").remove(); f._roundedCornersRendered=false; f._shadowsRendered=false; }; b.RadMenu._removeScrollWrapContainer=function(f){if(f._slide){var g=a(f._getScrollWrapElement()).appendTo(f._slide.get_element())[0]; if(g){a(f.get_element()).find(".rmScrollWrapContainer").remove(); f._slide.set_animatedElement(g); }f._roundedCornersRendered=false; f._shadowsRendered=false; }}; b.RadMenu._renderCornerElements=function(j,g){var k=a(j._getScrollWrapElement()),f='<{0} class="rmTopRight"><{0} class="rmBottomLeft"><{0} class="rmBottomRight"><{0} class="rmTopFix"><{0} class="rmBottomFix">',h=(j.get_hasContentTemplate&&j.get_hasContentTemplate()),m="span",i="li"; if(g){f='<{0} class="rmTopRight rmTopShadowRight"><{0} class="rmBottomLeft rmBottomShadowLeft"><{0} class="rmBottomRight rmBottomShadowRight">'; }if(h){f=String.format(f,m); a(j._getContentTemplateContainer()).prepend(f); }else{f=String.format(f,i); if(k.length){var l=a(j.get_element()).find(".rmScrollWrapContainer"); if(!l.length){l=a('
').append(k).appendTo(j._getAnimationContainer()); j._animatedElement=l[0]; j._slide.set_animatedElement(j._getAnimatedElement()); }l.prepend(f); }else{a(j.get_childListElement()).prepend(f); }}}; b.RadMenu._ensureCorners=function(g,f){if($telerik.isIE6||$telerik.quirksMode){if(g.get_enableRoundedCorners()||g.get_enableShadows()){setTimeout(function(){var i=a(f._slide.get_element()).children(".rmScrollWrapContainer"),h=f.get_childListElement(),k=0,j=0; if(!i.length){i=a(h); h.style.cssText=h.style.cssText; k=i.innerWidth()-4; j=i.innerHeight(); }else{var l=a(f._getScrollWrapElement()); k=l.innerWidth(); j=l.innerHeight()+4; }a(i).children(".rmTopRight").height(j); a(i).children(".rmTopFix, .rmBottomFix").width(k); a(i).children(".rmBottomRight, .rmBottomLeft").add(h).add(i).each(function(){this.style.cssText=this.style.cssText; }); a(i).children(".rmBottomShadowLeft").width(i.innerWidth()-4); },0); }}}; b.RadMenu._preloadItemImages=function(h){var g=["imageUrl","hoveredImageUrl","expandedImageUrl","disabledImageUrl","clickedImageUrl","selectedImageUrl"]; var f=function(m){for(var j=0; j0&&f.get_expandDirection()==b.ExpandDirection.Left){this._item.focusFirstChild(d); return; }var i=this._item.get_parent(),k=null; if(i.get_groupSettings){k=i.get_groupSettings(); }if(k&&k.get_expandDirection()==b.ExpandDirection.Right){i._transferFocus(d); return; }var h=this._owner.get_openedItem(); if(h){h.focusPreviousItem(d); }},_onKeyboardRight:function(d){var j=this._item._getParentFlow(); if(j==b.ItemFlow.Horizontal){this._item.focusNextItem(d); return; }var g=this._item.get_items(),f=this._item.get_groupSettings(); if(g.get_count()>0&&f.get_expandDirection()==b.ExpandDirection.Right){this._item.focusFirstChild(d); return; }var i=this._item.get_parent(),k=null; if(i.get_groupSettings){k=i.get_groupSettings(); }if(k&&k.get_expandDirection()==b.ExpandDirection.Left){i._transferFocus(); return; }var h=this._owner.get_openedItem(); if(h){h.focusNextItem(d); }},_onKeyboardEsc:function(d){var g=this._item.get_parent(),f=this._owner; if(g==f){this._item._setFocused(false,d); }else{g._close(d); g._transferFocus(d); }}}; })($telerik.$,Telerik.Web.UI); (function(a,c,d){var b=Sys.Serialization.JavaScriptSerializer; c.RadMenu.prototype.get_hierarchyModel=function(){var f=this.get_odataClientSettings(); f.ExpandMode=c.MenuItemExpandMode.WebService; var e=this.get_dataBindings(); if(e){e[e.length-1].ExpandMode=c.MenuItemExpandMode.ClientSide; }f.DataBindings=e; return c.RadODataDataSource.Binder.Hierarhical.Model(f); },c.RadMenu.prototype._initializeODataSourceBinder=function(){var e=this; setTimeout(function(){var h=e.get_odataClientSettings().ODataSourceID,g=$find(h); if(!g){var i=String.format("DataSource with id {0} was not found on the page",h); alert(i); return; }e._hierarhicalBinder=new c.RadODataDataSource.Binder.Hierarhical(g,e); e._hierarhicalBinder.initialize(); var f=a.raiseCancellableControlEvent(e,"menuPopulating",{}); if(!f){e._onDataNeeded(); }},1); }; c.RadMenu.prototype._onDataNeeded=function(h){var f=h!=d?1+h.get_level():0,e=h!=d?h.get_key():"null"; var g={level:f,key:e,events:{requesting:function(i){if(h){var j=new Telerik.Web.UI.WebServiceLoaderEventArgs(h); this._onItemLoadingStarted(this,j); }},success:function(i){var j=h||this,k=new Telerik.Web.UI.WebServiceLoaderSuccessEventArgs(i,j); this._onItemLoadingSuccess(this,k); },fail:function(i){var j=h||this,k=new Telerik.Web.UI.WebServiceLoaderErrorEventArgs(i.get_message(),j); this._onItemLoadingError(this,k); }}}; this._hierarhicalBinder.fetch(g); }; c.RadMenu.prototype.get_webServiceSettings=function(){return this._webServiceSettings; }; c.RadMenu.prototype.set_webServiceSettings=function(f){var e=b.deserialize(f); if(e.ODataSettings){this._webServiceSettings=new c.NavigationControlODataSettings(e); }else{this._webServiceSettings=new c.WebServiceSettings(e); }}; c.RadMenu.prototype._initializeWebServiceLoader=function(){var e=this.get_webServiceSettings(); if(e.get_isOData()){this._webServiceLoader=new c.NavigationControlODataLoader(this.get_webServiceSettings(),function(f){if(f.length>0){return c.MenuItemExpandMode.WebService; }else{return c.MenuItemExpandMode.ClientSide; }}); }else{this._webServiceLoader=new c.WebServiceLoader(this.get_webServiceSettings()); }this._webServiceLoader.add_loadingStarted(Function.createDelegate(this,this._onItemLoadingStarted)); this._webServiceLoader.add_loadingSuccess(Function.createDelegate(this,this._onItemLoadingSuccess)); this._webServiceLoader.add_loadingError(Function.createDelegate(this,this._onItemLoadingError)); }; c.RadMenu.prototype._loadChildrenFromWebService=function(e){if(!this._webServiceLoader){this._initializeWebServiceLoader(); }var i={},g=new c.RadMenuItemPopulatingEventArgs(e,i); this._raiseEvent("itemPopulating",g); if(g.get_cancel()){return; }var f={Text:e.get_text(),Value:e.get_value(),ExpandMode:e.get_expandMode()}; if(e.get_attributes().get_count()>0){f.Attributes=e.get_attributes()._data; }var h={item:f,context:i}; if(this.get_webServiceSettings().get_isWcf()){h.context=this._webServiceLoader._serializeDictionaryAsKeyValuePairs(h.context); if(h.item.Attributes){h.item.Attributes=this._webServiceLoader._serializeDictionaryAsKeyValuePairs(h.item.Attributes); }}else{if(this.get_odataClientSettings()){this._onDataNeeded(e); return; }}this._webServiceLoader.loadData(h,e); }; c.RadMenu.prototype._onItemLoadingStarted=function(g,e){var f=e.get_context(); f._onChildrenLoading(); }; c.RadMenu.prototype._onItemLoadingSuccess=function(o,h){var n=h.get_data(),m=h.get_context(),f=m.get_items(),p=this.get_webServiceSettings().get_isWcf(); for(j=0; j0){k=1; }j.push({ExpandMode:k,Key:h[this._dataFieldID],NavigateUrl:h[this._dataNavigateUrlField],ParentID:h[this._dataFieldParentID],Text:h[this._dataTextField],Value:h[this._dataValueField]}); }var e={_data:j,_context:n,get_data:function(){return this._data; },get_context:function(){return this._context; }}; this._onItemLoadingSuccess(this,e); }; })($telerik.$,Telerik.Web.UI); (function(a,b,c){b.RadMenu.prototype._initializeScroller=function(){if(!this._childControlsCreated){return null; }var g=this._getScrollWrapElement(),d=this.get_childListElement(); if(g&&d){var f=null; if(this._scroller){f=this._scroller.get_currentPosition(); this._scroller.dispose(); }this._scroller=new b.MenuItemScroller(this,this.get_childListElement(),this._flow); d.style.display="block"; var e=this._flow==b.ItemFlow.Horizontal; if(e){b.RadMenu._adjustListWidth(this); }else{b.RadMenu._adjustChildrenWidth(this); if(this.get_rightToLeft()&&$telerik.isIE&&d.firstChild){d.style.width=d.firstChild.offsetWidth+"px"; d.parentNode.style.width=d.offsetWidth+"px"; }}this._scroller.initialize(); this._scroller.updateState(); if(f!==null){this._scroller.set_currentPosition(f); }if(this.get_rightToLeft()&&e){d.style.cssFloat="left"; this._scroller.scrollToMaxPosition(); }this._setHorizontalArrowSize(e); }}; b.RadMenu.prototype._getScrollableParent=function(e){var d=this._extractItemFromDomElement(e); if(!d&&this._scroller){d=this; }return d; }; b.RadMenu.prototype._changeScrollSpeed=function(g,f){var d=this._getScrollableParent(g),e=d._scroller; if(!e){return; }e.changeScrollSpeed(f); }; b.RadMenu.prototype._startScroll=function(i,d){var g=this._getScrollableParent(i),h=g._scroller; if(!h){return; }var e=1,f=g.get_openedItem(); if(d==b.ArrowPosition.Top||d==b.ArrowPosition.Left){e=-1; }if(f){f.close(); }h.startScroll(b.ScrollerSpeed.Slow,e); }; b.RadMenu.prototype._stopScroll=function(f){var d=this._getScrollableParent(f),e=d._scroller; if(!e){return; }e.stopScroll(); }; b.RadMenu.prototype._onItemMousewheel=function(f){var h=f.originalEvent,d=h.wheelDelta?h.wheelDelta:-h.detail,k=b.ScrollerSpeed.MousewheelDefault,g=this._getScrollableParent(f.target),i=g&&g.get_parent?g.get_parent():null,j=i?i._scroller:null; if(!j){return; }j.scrollRelative(d>0?-k:k); f.preventDefault(); }; b.RadMenu.prototype._onArrowMouseDown=function(d){this._changeScrollSpeed(d,b.ScrollerSpeed.Fast); }; b.RadMenu.prototype._onArrowMouseUp=function(d){this._changeScrollSpeed(d,b.ScrollerSpeed.Slow); }; b.RadMenu.prototype._onArrowMouseOver=function(e,d){this._startScroll(e,b.ArrowPosition[d]); }; b.RadMenu.prototype._onArrowMouseOut=function(d){this._stopScroll(d); }; })($telerik.$,Telerik.Web.UI); (function(a,b,q){var m=a.proxy,j="rmLeftArrow",k="rmRightArrow",l="rmTopArrow",d="rmBottomArrow",f="rmLeftArrowDisabled",g="rmRightArrowDisabled",h="rmTopArrowDisabled",e="rmBottomArrowDisabled",i="rmItem",p="touchstart",n="touchend",o="touchmove",c="."; b.MenuItemScroller=function(t,r,s){this._owner=t; this._menu=this._owner.get_menu?this._owner.get_menu():this._owner; this._leftArrowCssClass=j; this._rightArrowCssClass=k; this._topArrowCssClass=l; this._bottomArrowCssClass=d; this._leftArrowDisabledCssClass=f; this._rightArrowDisabledCssClass=g; this._topArrowDisabledCssClass=h; this._bottomArrowDisabledCssClass=e; this._arrowsZIndex=2; this._scroller=null; this._childListElement=r; this._scrollElement=null; this._orientation=null; this._minScrollPosition=null; this._itemFlow=s; this._scrollerPositionChangedDelegate=null; this._decArrow=null; this._incArrow=null; this._rtl=b.RadMenu._requiresRightToLeft(r); this._isUsedOnTouchDevices=$telerik.isTouchDevice; this._initialTouchLocation=0; this._previousScrollLocation=0; this._touchScrollInAction=false; this._timeOut=null; }; b.MenuItemScroller.prototype={initialize:function(){b.RadMenu.ExtendWithView(this._menu,this,"ExtendScrollerWithView"); this._childListElement.style.position="relative"; this._scrollElement=this._childListElement.parentNode; this._orientation=b.ScrollerOrientation.Horizontal; if(this._itemFlow==b.ItemFlow.Vertical){this._orientation=b.ScrollerOrientation.Vertical; }this._scroller=new b.Scroller(this._childListElement,this._scrollElement,this._orientation); if(this._isUsedOnTouchDevices){var r=a(this._childListElement); r.on(p,c+i,m(this._mobileScrollHandlerStart,this)); r.on(o,c+i,m(this._mobileScrollHandler,this)); r.on(n,c+i,m(this._mobileScrollHandlerStop,this)); this._scroller._onTick=a.proxy(this._onTick,this); }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._isUsedOnTouchDevices){var r=a(this._childListElement); r.off(p,c+i,this._mobileScrollHandlerStart); r.off(o,c+i,this._mobileScrollHandler); r.off(n,c+i,this._mobileScrollHandlerStop); }if(this._scroller){this._scroller.dispose(); this._scroller=null; var s=a(this._decArrow).add(a(this._incArrow)); if($telerik.isIE){s.unbind(".menuScroller"); }s.remove(); }this._scrollerPositionChangedDelegate=null; this._childListElement=null; this._scrollElement=null; },updateState:function(){this._updateScrollingLimits(); this._updateArrows(); },resetState:function(){this._scroller.resetState(); },startScroll:function(s,r){this._scroller.startScroll(s,r); },changeScrollSpeed:function(r){this._scroller.changeScrollSpeed(r); },stopScroll:function(){this._scroller.stopScroll(); },scrollToMaxPosition:function(){this._scroller.scrollToMaxPosition(); },scrollRelative:function(r){this.set_currentPosition(this.get_currentPosition()+r); },get_currentPosition:function(){return this._scroller._currentPosition; },set_currentPosition:function(r){this._scroller._scrollTo(Math.max(Math.min(this._scroller._maxPosition,r),this._scroller._minPosition)); },_onTick:function(){var s=this._scroller,r=s._currentPosition+(s._direction*s._speed); r=Math.max(r,s._minPosition); r=Math.min(r,s._maxPosition); this._previousScrollLocation=r; s._scrollTo(r); if(r==s._minPosition||r==s._maxPosition){s.stopScroll(); }},_createArrows:function(){var r=this._arrowsZIndex; this._decArrow=this._createArrowDomElement(r); this._incArrow=this._createArrowDomElement(r); if(this._orientation==b.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"; }},_updateArrows:function(){var s=this._scroller.isAtMinPosition(),r=this._scroller.isAtMaxPosition(); if(s){this._decArrow.disabled="disabled"; this._setElementCssClass(this._decArrow,this._getDecArrowCssClass(false)); }else{this._decArrow.disabled=""; this._setElementCssClass(this._decArrow,this._getDecArrowCssClass(true)); }if(r){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 u=0,t=0,r=a(this._childListElement),s=a(this._scrollElement); if(this._orientation==b.ScrollerOrientation.Vertical){t=r.height()-s.height(); }else{t=r.width()-s.width(); }if(this._rtl&&$telerik.isIE8){u=-t; t=0; }this._scroller.setScrollingLimits(u,t); },_getDecArrowCssClass:function(r){if(this._orientation==b.ScrollerOrientation.Vertical){return r?this._topArrowCssClass:this._topArrowDisabledCssClass; }else{return r?this._leftArrowCssClass:this._leftArrowDisabledCssClass; }},_getIncArrowCssClass:function(r){if(this._orientation==b.ScrollerOrientation.Vertical){return r?this._bottomArrowCssClass:this._bottomArrowDisabledCssClass; }else{return r?this._rightArrowCssClass:this._rightArrowDisabledCssClass; }},_onScrollerPositionChanged:function(s,r){this._updateArrows(); },_mobileScrollHandler:function(t){var r=this._orientation!=Telerik.Web.UI.ScrollerOrientation.Vertical?$telerik.getTouchEventLocation(t).x:$telerik.getTouchEventLocation(t).y,s,u,v=this._owner.get_openedItem(); t.preventDefault(); t.stopPropagation(); if(this._initialTouchLocation===0){this._initialTouchLocation=r; if(v){v.close(); }}s=this._initialTouchLocation-r; u=s+this._previousScrollLocation; this.set_currentPosition(u); clearTimeout(this._timeOut); this._touchScrollInAction=true; if(this._scroller.isAtMinPosition(u)||this._scroller.isAtMaxPosition(u)){this.stopScroll(); }else{this._lastDelta=s; }},_mobileScrollHandlerStop:function(r){r.stopPropagation(); this._initialTouchLocation=0; this._previousScrollLocation+=this._lastDelta; this._touchScrollInAction=false; },_mobileScrollHandlerStart:function(r){var s=this; r.stopPropagation(); this._timeOut=setTimeout(function(){s._touchScrollInAction=false; },90); }}; b.MenuItemScroller.registerClass("Telerik.Web.UI.MenuItemScroller",null,Sys.IDisposable); })($telerik.$,Telerik.Web.UI); (function(a,b,c){a.registerEnum(b,"ItemFlow",{Vertical:0,Horizontal:1}); a.registerEnum(b,"ExpandDirection",{Auto:0,Up:1,Down:2,Left:3,Right:4}); a.registerEnum(b,"MenuRepeatDirection",{Vertical:0,Horizontal:1}); b.RadMenuItemGroupSettings=function(f,d){if(d){for(var e in d){this[e]=d[e]; }}for(var e in f){var g=this["set_"+e]; if(g){g.call(this,f[e]); }}}; a.registerControlProperties(b.RadMenuItemGroupSettings,{flow:b.ItemFlow.Vertical,expandDirection:b.ExpandDirection.Auto,offsetX:0,offsetY:0,width:null,height:null,repeatDirection:b.MenuRepeatDirection.Vertical,repeatColumns:1}); b.RadMenuItemGroupSettings.registerClass("Telerik.Web.UI.RadMenuItemGroupSettings"); })($telerik.$,Telerik.Web.UI);