Telerik.Web.UI.RadMenuItemEventArgs=function(a,b){Telerik.Web.UI.RadMenuItemEventArgs.initializeBase(this); this._item=a; this._domEvent=b||null; }; Telerik.Web.UI.RadMenuItemEventArgs.prototype={get_item:function(){return this._item; },get_domEvent:function(){return this._domEvent; }}; Telerik.Web.UI.RadMenuItemEventArgs.registerClass("Telerik.Web.UI.RadMenuItemEventArgs",Sys.EventArgs); Telerik.Web.UI.RadMenuItemCancelEventArgs=function(a,b){Telerik.Web.UI.RadMenuItemCancelEventArgs.initializeBase(this); this._item=a; this._domEvent=b||null; }; Telerik.Web.UI.RadMenuItemCancelEventArgs.prototype={get_item:function(){return this._item; },get_domEvent:function(){return this._domEvent; }}; Telerik.Web.UI.RadMenuItemCancelEventArgs.registerClass("Telerik.Web.UI.RadMenuItemCancelEventArgs",Sys.CancelEventArgs); Telerik.Web.UI.RadMenuMouseOverEventArgs=function(a,b){Telerik.Web.UI.RadMenuMouseOverEventArgs.initializeBase(this,[a,b||null]); }; Telerik.Web.UI.RadMenuMouseOverEventArgs.registerClass("Telerik.Web.UI.RadMenuMouseOverEventArgs",Telerik.Web.UI.RadMenuItemEventArgs); Telerik.Web.UI.RadMenuMouseOutEventArgs=function(a,b){Telerik.Web.UI.RadMenuMouseOutEventArgs.initializeBase(this,[a,b||null]); }; Telerik.Web.UI.RadMenuMouseOutEventArgs.registerClass("Telerik.Web.UI.RadMenuMouseOutEventArgs",Telerik.Web.UI.RadMenuItemEventArgs); Telerik.Web.UI.RadMenuItemFocusEventArgs=function(a,b){Telerik.Web.UI.RadMenuItemFocusEventArgs.initializeBase(this,[a,b||null]); }; Telerik.Web.UI.RadMenuItemFocusEventArgs.registerClass("Telerik.Web.UI.RadMenuItemFocusEventArgs",Telerik.Web.UI.RadMenuItemEventArgs); Telerik.Web.UI.RadMenuItemBlurEventArgs=function(a,b){Telerik.Web.UI.RadMenuItemBlurEventArgs.initializeBase(this,[a,b||null]); }; Telerik.Web.UI.RadMenuItemBlurEventArgs.registerClass("Telerik.Web.UI.RadMenuItemBlurEventArgs",Telerik.Web.UI.RadMenuItemEventArgs); Telerik.Web.UI.RadMenuItemClickingEventArgs=function(a,b){Telerik.Web.UI.RadMenuItemClickingEventArgs.initializeBase(this,[a,b||null]); }; Telerik.Web.UI.RadMenuItemClickingEventArgs.registerClass("Telerik.Web.UI.RadMenuItemClickingEventArgs",Telerik.Web.UI.RadMenuItemCancelEventArgs); Telerik.Web.UI.RadMenuItemClickedEventArgs=function(a,b){Telerik.Web.UI.RadMenuItemClickedEventArgs.initializeBase(this,[a,b||null]); }; Telerik.Web.UI.RadMenuItemClickedEventArgs.registerClass("Telerik.Web.UI.RadMenuItemClickedEventArgs",Telerik.Web.UI.RadMenuItemEventArgs); Telerik.Web.UI.RadMenuItemOpeningEventArgs=function(a,b){Telerik.Web.UI.RadMenuItemOpeningEventArgs.initializeBase(this,[a,b||null]); }; Telerik.Web.UI.RadMenuItemOpeningEventArgs.registerClass("Telerik.Web.UI.RadMenuItemOpeningEventArgs",Telerik.Web.UI.RadMenuItemCancelEventArgs); Telerik.Web.UI.RadMenuItemOpenedEventArgs=function(a,b){Telerik.Web.UI.RadMenuItemOpenedEventArgs.initializeBase(this,[a,b||null]); }; Telerik.Web.UI.RadMenuItemOpenedEventArgs.registerClass("Telerik.Web.UI.RadMenuItemOpenedEventArgs",Telerik.Web.UI.RadMenuItemEventArgs); Telerik.Web.UI.RadMenuItemClosingEventArgs=function(a,b){Telerik.Web.UI.RadMenuItemClosingEventArgs.initializeBase(this,[a,b||null]); }; Telerik.Web.UI.RadMenuItemClosingEventArgs.registerClass("Telerik.Web.UI.RadMenuItemClosingEventArgs",Telerik.Web.UI.RadMenuItemCancelEventArgs); Telerik.Web.UI.RadMenuItemClosedEventArgs=function(a,b){Telerik.Web.UI.RadMenuItemClosedEventArgs.initializeBase(this,[a,b||null]); }; Telerik.Web.UI.RadMenuItemClosedEventArgs.registerClass("Telerik.Web.UI.RadMenuItemClosedEventArgs",Telerik.Web.UI.RadMenuItemEventArgs); Telerik.Web.UI.RadMenuItemPopulatingEventArgs=function(a,b){Telerik.Web.UI.RadMenuItemPopulatingEventArgs.initializeBase(this,[a]); this._context=b; }; Telerik.Web.UI.RadMenuItemPopulatingEventArgs.prototype={get_context:function(){return this._context; }}; Telerik.Web.UI.RadMenuItemPopulatingEventArgs.registerClass("Telerik.Web.UI.RadMenuItemPopulatingEventArgs",Telerik.Web.UI.RadMenuItemCancelEventArgs); Telerik.Web.UI.RadMenuItemPopulatedEventArgs=function(a){Telerik.Web.UI.RadMenuItemPopulatedEventArgs.initializeBase(this,[a]); }; Telerik.Web.UI.RadMenuItemPopulatedEventArgs.registerClass("Telerik.Web.UI.RadMenuItemPopulatedEventArgs",Telerik.Web.UI.RadMenuItemEventArgs); Telerik.Web.UI.RadMenuItemPopulationFailedEventArgs=function(b,a){Telerik.Web.UI.RadMenuItemPopulationFailedEventArgs.initializeBase(this,[b]); this._errorMessage=a; }; Telerik.Web.UI.RadMenuItemPopulationFailedEventArgs.prototype={get_errorMessage:function(){return this._errorMessage; }}; Telerik.Web.UI.RadMenuItemPopulationFailedEventArgs.registerClass("Telerik.Web.UI.RadMenuItemPopulationFailedEventArgs",Telerik.Web.UI.RadMenuItemCancelEventArgs); (function(){var e=$telerik.$,a=Telerik.Web.UI,c="rmItem",b="rmLink",d="rmTopArrow",g="rmBottomArrow",f="rmLeftArrow",h="rmRightArrow"; Type.registerNamespace("Telerik.Web.UI"); $telerik.findMenu=$find; $telerik.toMenu=function(i){return i; }; a.RadMenu=function(i){a.RadMenu.initializeBase(this,[i]); this._childTypeName="Telerik.Web.UI.RadMenuItem"; this._selectedValue=""; this._itemData=null; this._expandAnimation=new a.AnimationSettings({}); this._expandDelay=100; this._collapseAnimation=new a.AnimationSettings({}); this._collapseDelay=500; this._flow=a.ItemFlow.Horizontal; this._defaultGroupSettings=new a.RadMenuItemGroupSettings({}); this._enableSelection=true; this._enableAutoScroll=false; this._autoScrollMinimumHeight=50; this._autoScrollMinimumWidth=50; this._enableRootItemScroll=false; this._enableScreenBoundaryDetection=true; this._enableRoundedCorners=false; this._enableShadows=false; this._clickToOpen=false; this._childListElement=null; this._postBackReference=null; this._onClickDelegate=null; this._webServiceSettings=new a.WebServiceSettings({}); this._persistLoadOnDemandItems=true; this._enableOverlay=true; this._childListElementCssClass=""; this._selectedItemIndex=null; this._enabled=true; this._visible=true; this._openedItem=null; this._lastOpenedItem=null; this._childrenDetached=false; this._originalZIndex=null; this._defaultZIndex=7000; this._zIndexIncrementDepth=0; this._fireEvents=true; this._webServiceLoader=null; this._loadingTemplate=""; this._onMouseOutDelegate=null; this._onClickDelegate=null; this._onResizeDelegate=null; this._aboutToCollapse=false; this._rightToLeft=null; this._skin=null; }; a.RadMenu._createChildControls=function(i,k){var j=i.get_itemData(); if(!j){return; }var l=i.get_childListElement(); if(!l){return; }e(i._getChildElements()).each(function(m){var n=new a.RadMenuItem(); k.add(n); n._initialize(j[m],this); }); }; a.RadMenu._adjustChildrenWidth=function(o,l){var n=o.get_items(); var j=n.get_count(); if(l){for(var k=0; k0){if($telerik.quirksMode){i+=(j.css("border-left-style")!="none"?parseInt(j.css("border-left-width"),10):0)+(j.css("border-right-style")!="none"?parseInt(j.css("border-right-width"),10):0)+(parseInt(j.css("padding-left"),10)||0)+(parseInt(j.css("padding-right"),10)||0); }j[0].style.width=i+"px"; }else{if(k<3){setTimeout(function(){a.RadMenu._adjustListWidth(l,k); },0); }}}; a.RadMenu._getViewPortSize=function(){var j=$telerik.getViewPortSize(); var i=document.compatMode!="CSS1Compat"; if($telerik.isFirefox&&i){j.height+=document.body.scrollTop; }return j; }; a.RadMenu._updateChildrenPositionClass=function(j){var k=function(l){e("> .rmItem",l).filter(function(){return(this._item&&this._item.get_visible()); }).removeClass("rmFirst rmLast").filter(":first").addClass("rmFirst").end().filter(":last").addClass("rmLast"); }; if(!j){return; }var i=j.get_childListElement(); if(!i){return; }if(e(i).is(".rmMultiColumn")){e("> .rmGroupColumn > ul",i).each(function(){k(this); }); }else{k(i); }}; a.RadMenu._removeChildListCorners=function(i){e(".rmTopRight, .rmBottomLeft, .rmBottomRight, .rmTopFix, .rmBottomFix",i.get_childListElement()).remove(); i._roundedCornersRendered=false; i._shadowsRendered=false; }; a.RadMenu._removeScrollWrapContainer=function(i){var j=e(i._getScrollWrapElement()).appendTo(i._slide.get_element())[0]; e(".rmScrollWrapContainer",i.get_element()).remove(); i._slide.set_animatedElement(j); i._roundedCornersRendered=false; i._shadowsRendered=false; }; a.RadMenu._renderCornerElements=function(k,l){var i=e(k._getScrollWrapElement()); var j='
  • '; if(l){j='
  • '; }if(i.length){var m=e(".rmScrollWrapContainer",k.get_element()); if(!m.length){m=e('
    ').append(i).appendTo(k._getAnimationContainer()); k._animatedElement=m[0]; k._slide.set_animatedElement(k._getAnimatedElement()); }m.prepend(j); }else{e(k.get_childListElement()).prepend(j); }}; a.RadMenu._ensureCorners=function(i,j){if($telerik.isIE6||$telerik.quirksMode){if(i.get_enableRoundedCorners()||i.get_enableShadows()){setTimeout(function(){var n=e("> .rmScrollWrapContainer",j._slide.get_element()); var k=j.get_childListElement(); if(!n.length){n=e(k); k.style.cssText=k.style.cssText; var l=n.innerWidth()-4; var o=n.innerHeight(); }else{var m=e(j._getScrollWrapElement()); var l=m.innerWidth(); var o=m.innerHeight()+4; }e("> .rmTopRight",n).height(o); e("> .rmTopFix, > .rmBottomFix",n).width(l); e("> .rmBottomRight, > .rmBottomLeft",n).add(k).add(n).each(function(){this.style.cssText=this.style.cssText; }); e("> .rmBottomShadowLeft",n).width(n.innerWidth()-4); },0); }}}; a.RadMenu.prototype={initialize:function(){a.RadMenu.callBaseMethod(this,"initialize"); var i=this.get_element(); i.value=this._selectedValue; if(this.get_rightToLeft()){this._initRightToLeft(); }if(this._flow==a.ItemFlow.Vertical&&this.get_childListElement()){this._adjustRootItemWidth(); }this._originalZIndex=parseInt($telerik.getCurrentStyle(i,"zIndex")); if(!this._originalZIndex){i.style.zIndex=this._defaultZIndex; this._originalZIndex=this._defaultZIndex; }this._onClickDelegate=Function.createDelegate(this,this._onClick); $addHandler(document,"click",this._onClickDelegate); if(!this.get_clickToOpen()){if($telerik.isIE){this._onMouseOutDelegate=Function.createDelegate(this,this._onMouseOut); $addHandler(document,"mouseout",this._onMouseOutDelegate); }}this._onResizeDelegate=Function.createDelegate(this,this._onResize); $addHandler(window,"resize",this._onResizeDelegate); this._eventMap.addHandlerForClassName("mouseover",c,this._onItemMouseOver); this._eventMap.addHandlerForClassName("mouseout",c,this._onItemMouseOut); this._eventMap.addHandlerForClassName("dragstart",c,this._onItemDragStart); this._eventMap.addHandlerForClassName("click",b,this._onItemClick); this._eventMap.addHandlerForClassName("click",c,this._onItemClick); this._eventMap.addHandlerForClassName("mouseover",b,this._onLinkMouseOver); this._eventMap.addHandlerForClassName("mouseout",b,this._onLinkMouseOut); this._eventMap.addHandlerForClassName("mousedown",b,this._onLinkMouseDown); this._eventMap.addHandlerForClassName("mouseup",b,this._onLinkMouseUp); this._eventMap.addHandlerForClassName("blur",b,this._onLinkBlur); this._eventMap.addHandlerForClassName("deactivate",b,this._onLinkBlur); this._eventMap.addHandlerForClassName("focus",b,this._onLinkFocus); this._eventMap.addHandlerForClassName("activate",b,this._onLinkFocus); this._eventMap.addHandlerForClassName("keydown",b,this._onLinkKeyDown); this._eventMap.addHandlerForClassName("mousedown",d,this._onTopArrowMouseDown); this._eventMap.addHandlerForClassName("mouseup",d,this._onTopArrowMouseUp); this._eventMap.addHandlerForClassName("mouseover",d,this._onTopArrowMouseOver); this._eventMap.addHandlerForClassName("mouseout",d,this._onTopArrowMouseOut); this._eventMap.addHandlerForClassName("click",d,this._onScrollArrowClicked); this._eventMap.addHandlerForClassName("mousedown",g,this._onBottomArrowMouseDown); this._eventMap.addHandlerForClassName("mouseup",g,this._onBottomArrowMouseUp); this._eventMap.addHandlerForClassName("mouseover",g,this._onBottomArrowMouseOver); this._eventMap.addHandlerForClassName("mouseout",g,this._onBottomArrowMouseOut); this._eventMap.addHandlerForClassName("click",g,this._onScrollArrowClicked); this._eventMap.addHandlerForClassName("mousedown",f,this._onLeftArrowMouseDown); this._eventMap.addHandlerForClassName("mouseup",f,this._onLeftArrowMouseUp); this._eventMap.addHandlerForClassName("mouseover",f,this._onLeftArrowMouseOver); this._eventMap.addHandlerForClassName("mouseout",f,this._onLeftArrowMouseOut); this._eventMap.addHandlerForClassName("click",f,this._onScrollArrowClicked); this._eventMap.addHandlerForClassName("mousedown",h,this._onRightArrowMouseDown); this._eventMap.addHandlerForClassName("mouseup",h,this._onRightArrowMouseUp); this._eventMap.addHandlerForClassName("mouseover",h,this._onRightArrowMouseOver); this._eventMap.addHandlerForClassName("mouseout",h,this._onRightArrowMouseOut); this._eventMap.addHandlerForClassName("click",h,this._onScrollArrowClicked); this._initializeScroller(); if(!this.get_enabled()){this.set_enabled(false); }this._raiseEvent("load",null); },dispose:function(){a.RadMenu.callBaseMethod(this,"dispose"); if(this._onClickDelegate){$removeHandler(document,"click",this._onClickDelegate); this._onClickDelegate=null; }if(this._onMouseOutDelegate){$removeHandler(document,"mouseout",this._onMouseOutDelegate); this._onMouseOutDelegate=null; }if(this._onResizeDelegate){$removeHandler(window,"resize",this._onResizeDelegate); this._onResizeDelegate=null; }if(this._eventMap){this._eventMap.dispose(); this._eventMap=null; }if(this._scroller){this._scroller.dispose(); this._scroller=null; }},repaint:function(){var i=this._flow==a.ItemFlow.Vertical; if(i){this._adjustRootItemWidth(); }var j=this.get_element(); if(this._scroller){var k=this._getScrollWrapElement(); if(i){k.style.height=j.style.height; }else{k.style.width=j.style.width; }this._initializeScroller(); }window.setTimeout(function(){j.style.cssText=j.style.cssText; },0); },get_items:function(){return this._getChildren(); },set_items:function(i){this._children=i; },get_enableScreenBoundaryDetection:function(){return this._enableScreenBoundaryDetection; },set_enableScreenBoundaryDetection:function(i){this._enableScreenBoundaryDetection=i; },get_enableAutoScroll:function(){return this._enableAutoScroll; },set_enableAutoScroll:function(i){this._enableAutoScroll=i; },get_enableSelection:function(){return this._enableSelection; },set_enableSelection:function(i){this._enableSelection=i; },get_autoScrollMinimumHeight:function(){return this._autoScrollMinimumHeight; },set_autoScrollMinimumHeight:function(i){this._autoScrollMinimumHeight=i; },get_autoScrollMinimumWidth:function(){return this._autoScrollMinimumWidth; },set_autoScrollMinimumWidth:function(i){this._autoScrollMinimumWidth=i; },get_childListElement:function(){if(!this._childListElement){var i=this.get_element(); var j=this._getScrollWrapElement(); if(j){i=j; }this._childListElement=$telerik.getFirstChildByTagName(i,"ul",0); }return this._childListElement; },get_expandAnimation:function(){return this._expandAnimation; },set_expandAnimation:function(j){var i=Sys.Serialization.JavaScriptSerializer.deserialize(j); this._expandAnimation=new a.AnimationSettings(i); },get_collapseAnimation:function(){return this._collapseAnimation; },set_collapseAnimation:function(j){var i=Sys.Serialization.JavaScriptSerializer.deserialize(j); this._collapseAnimation=new a.AnimationSettings(i); },get_defaultGroupSettings:function(){return this._defaultGroupSettings; },set_defaultGroupSettings:function(j){var i=Sys.Serialization.JavaScriptSerializer.deserialize(j); this._defaultGroupSettings=new a.RadMenuItemGroupSettings(i); },get_itemData:function(){return this._itemData; },set_itemData:function(i){this._itemData=i; },set_enabled:function(j){a.RadMenu.callBaseMethod(this,"set_enabled",[j]); if(!this.get_isInitialized()){return; }this.get_element().disabled=!j; var m=this.get_element(); var n=this.get_items(); var l=n.get_count(); if(!j){this.disableEvents(); for(var k=0; k"); var i=e("div.rmScrollWrap",k); if(i.length==1){j.appendTo(i); }else{j.appendTo(k); }},_getChildElements:function(){return e(this.get_childListElement()).children(".rmItem"); },_initializeScroller:function(){if(!this._childControlsCreated){return null; }var m=this._getScrollWrapElement(); var j=this.get_childListElement(); if(m&&j){var n=null; if(this._scroller){n=this._scroller.get_currentPosition(); this._scroller.dispose(); }this._scroller=new a.MenuItemScroller(this.get_childListElement(),this._flow); j.style.display="block"; var i=this._flow==a.ItemFlow.Horizontal; if(i){a.RadMenu._adjustListWidth(this); }else{a.RadMenu._adjustChildrenWidth(this); if(this.get_rightToLeft()&&$telerik.isIE&&j.firstChild){j.style.width=j.firstChild.offsetWidth+"px"; j.parentNode.style.width=j.offsetWidth+"px"; }}this._scroller.initialize(); this._scroller.updateState(); if(n!==null){this._scroller.set_currentPosition(n); }if(this.get_rightToLeft()&&i){j.style.cssFloat="left"; this._scroller.scrollToMaxPosition(); }if(i&&$telerik.isIE6){var o=this.get_element().offsetHeight+"px"; var k=$telerik.getElementByClassName(this.get_element(),f,"a")||$telerik.getElementByClassName(this.get_element(),"rmLeftArrowDisabled","a"); if(k){k.style.height=o; }var l=$telerik.getElementByClassName(this.get_element(),h,"a")||$telerik.getElementByClassName(this.get_element(),"rmRightArrowDisabled","a"); if(l){l.style.height=o; }}}},_getScrollWrapElement:function(){if(!this._scrollWrapElement){var i=$telerik.getFirstChildByTagName(this.get_element(),"div",0); if(i&&Sys.UI.DomElement.containsCssClass(i,"rmScrollWrap")){this._scrollWrapElement=i; }}return this._scrollWrapElement; },_clearSelectedItem:function(){var i=this.get_selectedItem(); if(i){i.set_selected(false); }},_registerSelectedItem:function(i){this._selectedItemIndex=i._getHierarchicalIndex(); this.updateClientState(); this._updateValidationField(i); },_unregisterSelectedItem:function(i){if(i._getHierarchicalIndex()!=this._selectedItemIndex){return; }this._selectedItemIndex=null; this.updateClientState(); this._updateValidationField(this.get_selectedItem()); },_updateValidationField:function(i){var j=""; if(i){j=i.get_value(); if(j===null){j=i.get_text(); }}this.get_element().value=j; },_onMouseOut:function(k){var j=k.rawEvent.relatedTarget?k.rawEvent.relatedTarget:k.rawEvent.toElement; if(!j&&!this._isMainElementDescendant(k.target)){var i=this; setTimeout(function(){i.close(); },this.get_collapseDelay()); }},_onClick:function(i){if(!this._isMainElementDescendant(i.target)){var j=this.get_clickToOpen(); if(this._focusedItem||j){this.close(); if(this.get_clickToOpen()){this.set_clicked(false); }}}},_onResize:function(){},_onItemMouseOver:function(l){var k=this._extractItemFromDomElement(l.eventMapTarget); if(!k.get_enabled()){return true; }k._preventClose(); if(this.get_clickToOpen()&&!this.get_clicked()){return true; }if(k._state==a.RadMenuItemState.Open||k._state==a.RadMenuItemState.AboutToOpen){return true; }var i=k.get_parent(); var j=i.get_openedItem(); if(j&&j!=k){j._clearTimeout(); j._state=a.RadMenuItemState.AboutToClose; j._setTimeout(function(){j.close(); j._timeoutRef=null; },this.get_expandDelay()); }if(k.get_items().get_count()==0&&!k._isWebServiceCallNeeded()){return true; }this._lastOpenedItem=k; k._state=a.RadMenuItemState.AboutToOpen; k._setTimeout(function(){k.open(); k._timeoutRef=null; },this.get_expandDelay()); return true; },_onItemMouseOut:function(m){var k=this._extractItemFromDomElement(m.eventMapTarget); if(!k.get_enabled()){return true; }var l=m.eventMapRelatedTarget; var i=k.get_element(); if(!l||i==l||$telerik.isDescendant(i,l)){return true; }if(this._childrenDetached&&$telerik.isDescendant(k.get_parent()._getAnimationContainer(),l)){return true; }if(this._scroller&&k.get_level()>0&&!$telerik.isDescendant(this.get_element(),l)){var j=k; while(j.get_level()>0){j=j.get_parent(); }this._onItemMouseOut({eventMapTarget:j.get_element(),eventMapRelatedTarget:l}); }if(k._state==a.RadMenuItemState.Closed||k._state==a.RadMenuItemState.AboutToClose){return true; }if(k._state==a.RadMenuItemState.AboutToOpen){k._clearTimeout(); k._state=a.RadMenuItemState.Closed; k.get_parent()._openedItem=null; return true; }if(this.get_clickToOpen()){return true; }k._state=a.RadMenuItemState.AboutToClose; k._setTimeout(function(){k.close(); k._timeoutRef=null; },this._collapseDelay); return true; },_onItemDragStart:function(i){i.preventDefault(); return false; },_getFirstClickableParent:function(i,m){var j=["select","option","a","input","textarea","button","label"]; var l=i; while(l!=m){var k=e.inArray(l.tagName.toLowerCase(),j)!=-1; if(k){return l; }l=l.parentNode; }return null; },_onItemClick:function(k){if(!this.get_enabled()){$telerik.cancelRawEvent(k); return false; }var j=this._extractItemFromDomElement(k.eventMapTarget); var i=this._getFirstClickableParent(k.target,j.get_element()); if(i&&!e(i).hasClass(b)){return true; }if(e(k.eventMapTarget).is(".rmItem")&&j.get_linkElement()){return true; }j._click(k); if(!j._shouldNavigate()){$telerik.cancelRawEvent(k); return false; }return true; },_onLinkMouseOver:function(l){var k=l.eventMapRelatedTarget; var j=this._extractItemFromDomElement(l.eventMapTarget); if(!j.get_enabled()){return true; }var i=j.get_linkElement(); if(!k||i==k||$telerik.isDescendant(i,k)){return true; }j._hovered=true; j._updateImageSrc(); this._raiseEvent("mouseOver",new a.RadMenuMouseOverEventArgs(j,l)); return true; },_onLinkMouseOut:function(l){var k=l.eventMapRelatedTarget; var j=this._extractItemFromDomElement(l.eventMapTarget); if(!j.get_enabled()){return true; }var i=j.get_linkElement(); if(!k||!i){return; }if(i==k||$telerik.isDescendant(i,k)){return true; }j._hovered=false; j._updateImageSrc(); this._raiseEvent("mouseOut",new a.RadMenuMouseOutEventArgs(j,l)); return true; },_onLinkMouseDown:function(i){var j=this._extractItemFromDomElement(i.eventMapTarget); if(!j.get_enabled()){return true; }j._clicked=true; j._updateLinkClass(); j._updateImageSrc(); return true; },_onLinkMouseUp:function(i){var j=this._extractItemFromDomElement(i.eventMapTarget); if(!j.get_enabled()){return true; }j._clicked=false; j._updateLinkClass(); j._updateImageSrc(); return true; },_onLinkBlur:function(i){var j=this._extractItemFromDomElement(i.eventMapTarget); if(!j.get_enabled()){return true; }j._focused=false; j.blur(); return true; },_onLinkFocus:function(i){var j=this._extractItemFromDomElement(i.eventMapTarget); if(!j.get_enabled()){return true; }j._focused=true; j.focus(); return true; },_onLinkKeyDown:function(i){var j=this._extractItemFromDomElement(i.eventMapTarget); if(!j.get_enabled()){return true; }return j._onKeyDown(i); },_getScrollItem:function(i){if(this._scroller&&Sys.UI.DomElement.containsCssClass(i.parentNode,"rmRootGroup")){return this; }return this._extractItemFromDomElement(i); },_onTopArrowMouseDown:function(i){var j=this._getScrollItem(i.eventMapTarget); j._onScrollArrowMouseDown(a.ArrowPosition.Top); },_onTopArrowMouseUp:function(i){var j=this._getScrollItem(i.eventMapTarget); j._onScrollArrowMouseUp(a.ArrowPosition.Top); },_onTopArrowMouseOver:function(i){var j=this._getScrollItem(i.eventMapTarget); j._onScrollArrowMouseOver(a.ArrowPosition.Top); },_onTopArrowMouseOut:function(i){var j=this._getScrollItem(i.eventMapTarget); j._onScrollArrowMouseOut(a.ArrowPosition.Top); },_onBottomArrowMouseDown:function(i){var j=this._getScrollItem(i.eventMapTarget); j._onScrollArrowMouseDown(a.ArrowPosition.Bottom); },_onBottomArrowMouseUp:function(i){var j=this._getScrollItem(i.eventMapTarget); j._onScrollArrowMouseUp(a.ArrowPosition.Bottom); },_onBottomArrowMouseOver:function(i){var j=this._getScrollItem(i.eventMapTarget); j._onScrollArrowMouseOver(a.ArrowPosition.Bottom); },_onBottomArrowMouseOut:function(i){var j=this._getScrollItem(i.eventMapTarget); j._onScrollArrowMouseOut(a.ArrowPosition.Bottom); },_onLeftArrowMouseDown:function(i){var j=this._getScrollItem(i.eventMapTarget); j._onScrollArrowMouseDown(a.ArrowPosition.Left); },_onLeftArrowMouseUp:function(i){var j=this._getScrollItem(i.eventMapTarget); j._onScrollArrowMouseUp(a.ArrowPosition.Left); },_onLeftArrowMouseOver:function(i){var j=this._getScrollItem(i.eventMapTarget); j._onScrollArrowMouseOver(a.ArrowPosition.Left); },_onLeftArrowMouseOut:function(i){var j=this._getScrollItem(i.eventMapTarget); j._onScrollArrowMouseOut(a.ArrowPosition.Left); },_onRightArrowMouseDown:function(i){var j=this._getScrollItem(i.eventMapTarget); j._onScrollArrowMouseDown(a.ArrowPosition.Right); },_onRightArrowMouseUp:function(i){var j=this._getScrollItem(i.eventMapTarget); j._onScrollArrowMouseUp(a.ArrowPosition.Right); },_onRightArrowMouseOver:function(i){var j=this._getScrollItem(i.eventMapTarget); j._onScrollArrowMouseOver(a.ArrowPosition.Right); },_onRightArrowMouseOut:function(i){var j=this._getScrollItem(i.eventMapTarget); j._onScrollArrowMouseOut(a.ArrowPosition.Right); },_onScrollArrowClicked:function(i){i.preventDefault(); i.stopPropagation(); return false; },_onScrollArrowMouseDown:function(){if(!this._scroller){return; }this._scroller.changeScrollSpeed(a.ScrollerSpeed.Fast); },_onScrollArrowMouseUp:function(){if(!this._scroller){return; }this._scroller.changeScrollSpeed(a.ScrollerSpeed.Slow); },_onScrollArrowMouseOver:function(k){if(!this._scroller){return; }var i=1; if(k==a.ArrowPosition.Top||k==a.ArrowPosition.Left){i=-1; }var j=this.get_openedItem(); if(j){j.close(); }this._scroller.startScroll(a.ScrollerSpeed.Slow,i); },_onScrollArrowMouseOut:function(){if(!this._scroller){return; }this._scroller.stopScroll(); },_childrenCleared:function(i){if(i._slideWrapElement){i._slideWrapElement.outerHTML=""; i._slideWrapElement=null; i._scrollWrapElement=null; }i._linkElement=null; i._childListElement=null; i._animatedElement=null; i._animationContainer=null; i._itemsLoaded=false; i._hasItems=false; if(i._originalExpandMode){i.set_expandMode(i._originalExpandMode); }if(i._updateTextElementClass){i._updateTextElementClass(); }if(i==this){this.close(); }a.RadMenu.callBaseMethod(this,"_childrenCleared",[i]); },_childInserting:function(j,k,i){a.RadMenu.callBaseMethod(this,"_childInserting",[j,k,i]); if(!i._childControlsCreated){return; }this._backupClientState(); },_childInserted:function(j,k,i){this._restoreClientState(); if(i._setHasItems){i._setHasItems(true); }a.RadMenu.callBaseMethod(this,"_childInserted",[j,k,i]); if(i._updateTextElementClass){i._updateTextElementClass(); }if(i._state&&i._state==a.RadMenuItemState.Open){if(k._getWidth()>0){a.RadMenu._adjustChildrenWidth(i); }i._updateColumnWrapSize(); }if(i==this&&this._enableRootItemScroll){this._initializeScroller(); }},_attachChildItem:function(n,m,i){if(i==this||!i._hasMultipleColumns()){a.RadMenu.callBaseMethod(this,"_attachChildItem",[n,m,i]); return; }if(!i.get_childListElement()){i._createChildListElement(); }var l=n.get_nextSibling(); if(l){var j=l.get_element(); j.parentNode.insertBefore(m,j); }else{var k=i._getColumnForItem(n); e("> .rmGroup",k).append(m); i._recalculateColumns(); }},_childRemoving:function(i){i.set_selected(false); this._backupClientState(); a.RadMenu.callBaseMethod(this,"_childRemoving",[i]); },_childRemoved:function(k,i){this._restoreClientState(); k.get_text(); var j=k.get_element(); if(i.get_items().get_count()==0){if(i._slide){i._slide.dispose(); i._slide=null; }j=$telerik.getFirstChildByTagName(i.get_element(),"div",0); i._linkElement=null; i._childListElement=null; i._scrollWrapElement=null; i._slideWrapElement=null; i._animatedElement=null; i._animationContainer=null; i._hasItems=false; if(i._updateTextElementClass){i._updateTextElementClass(); }}if(j){j.outerHTML=""; if(j.parentNode){j.parentNode.removeChild(j); }j=null; }a.RadMenu.callBaseMethod(this,"_childRemoved",[k,i]); if(i._state&&i._state==a.RadMenuItemState.Open){a.RadMenu._adjustChildrenWidth(i,true); i._updateColumnWrapSize(); }if(i==this&&this._enableRootItemScroll){this._initializeScroller(); }a.RadMenu._updateChildrenPositionClass(i); },_backupClientState:function(){this._backupSelectedItem=this.get_selectedItem(); },_restoreClientState:function(){if(this._backupSelectedItem){this._registerSelectedItem(this._backupSelectedItem); }},_getExtendedItemClickingEventArgs:function(i){return i; },_getExtendedItemClickedEventArgs:function(i){return i; },_incrementZIndex:function(j){if(this._zIndexIncrementDepth==0){var i=this.get_element(); i.style.zIndex=this._originalZIndex+j; }this._zIndexIncrementDepth++; },_restoreZIndex:function(){if(this._zIndexIncrementDepth>0){this._zIndexIncrementDepth--; }if(this._zIndexIncrementDepth==0){var i=this.get_element(); i.style.zIndex=this._originalZIndex; }},_getRtlClassName:function(){return"RadMenu_rtl"; },_getMainElement:function(){return this.get_element(); },_initRightToLeft:function(){var m=this._getMainElement(); m.dir="ltr"; if(m.className.indexOf("RadMenu_rtl")<0||m.className.indexOf("RadMenu_Context_rtl")<0){m.className=String.format("{0} {1}",m.className,this._getRtlClassName()); if(this._skin){m.className=String.format("{0} RadMenu_{1}_rtl",m.className,this._skin); }}for(var k=0; k0){i.Attributes=l.get_attributes()._data; }var k={item:i,context:m}; if(this.get_webServiceSettings().get_isWcf()){k.context=this._webServiceLoader._serializeDictionaryAsKeyValuePairs(k.context); if(k.item.Attributes){k.item.Attributes=this._webServiceLoader._serializeDictionaryAsKeyValuePairs(k.item.Attributes); }}this._webServiceLoader.loadData(k,l); },_onItemLoadingStarted:function(i,k){var j=k.get_context(); j._onChildrenLoading(); },_onItemLoadingSuccess:function(p,q){var r=q.get_data(); var t=q.get_context(); var s=t.get_items(); var o=this.get_webServiceSettings().get_isWcf(); for(l=0; l0){b.RadMenu._adjustChildrenWidth(u); }}},get_expandedImageUrl:function(){return this._properties.getValue("expandedImageUrl",null); },set_expandedImageUrl:function(t){this._properties.setValue("expandedImageUrl",t,true); this._updateImageSrc(); },get_disabledImageUrl:function(){return this._properties.getValue("disabledImageUrl",null); },set_disabledImageUrl:function(t){this._properties.setValue("disabledImageUrl",t,true); this._updateImageSrc(); },get_disabledCssClass:function(){return this._properties.getValue("disabledCssClass",k); },set_disabledCssClass:function(t){this._properties.setValue("disabledCssClass",t,true); this._updateLinkClass(); },get_expandedCssClass:function(){return this._properties.getValue("expandedCssClass",j); },set_expandedCssClass:function(t){this._properties.setValue("expandedCssClass",t,true); this._updateLinkClass(); },get_focusedCssClass:function(){return this._properties.getValue("focusedCssClass",n); },set_focusedCssClass:function(t){this._properties.setValue("focusedCssClass",t,true); this._updateLinkClass(); },get_selectedCssClass:function(){return this._properties.getValue("selectedCssClass",i); },set_selectedCssClass:function(t){this._properties.setValue("selectedCssClass",t,true); this._updateLinkClass(); },get_clickedCssClass:function(){return this._properties.getValue("clickedCssClass",h); },set_clickedCssClass:function(t){this._properties.setValue("clickedCssClass",t,true); this._updateLinkClass(); },get_postBack:function(){return this._properties.getValue("postBack",true)==true; },set_postBack:function(t){this._properties.setValue("postBack",t); },get_expandMode:function(){return this._properties.getValue("expandMode",b.MenuItemExpandMode.ClientSide); },set_expandMode:function(t){this._properties.setValue("expandMode",t,true); },set_enabled:function(t){b.RadMenuItem.callBaseMethod(this,"set_enabled",[t]); this._updateLinkClass(); this._updateImageSrc(); if(t){this._restoreNavigateUrl(); }else{this._clearNavigateUrl(); }},get_level:function(){var t=this.get_parent(); var u=0; while(t){if(b.ControlItemContainer.isInstanceOfType(t)||b.RadMenu.isInstanceOfType(t)){return u; }u++; t=t.get_parent(); }return u; },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._blur(null); },focusFirstChild:function(w){var v=this.get_items(); if(v.get_count()==0){return; }var u=v.getItem(0); var t=u; while(!u._canFocus()){u=u._getNextItem(); if(u==t){return; }}u._focus(w||null); },focusLastChild:function(w){var v=this.get_items(); if(v.get_count()==0){return; }var u=v.getItem(v.get_count()-1); var t=u; while(!u._canFocus()){u=u._getPreviousItem(); if(u==t){return; }}u._focus(w||null); },focusNextItem:function(t){var u=this._getNextItem(); while(!u._canFocus()){u=u._getNextItem(); }u._focus(t||null); },focusPreviousItem:function(t){var u=this._getPreviousItem(); while(!u._canFocus()){u=u._getPreviousItem(); }u._focus(t||null); },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); },_determineCssClass:function(){if(this.get_isSeparator()){return"rmItem rmSeparator"; }return"rmItem"; },_renderImage:function(t){var u=new m(t).append(""); return t; },_renderLink:function(v){if(this.get_isSeparator()){return; }var w="#"; var x=this.get_navigateUrl(); if(x&&x!="#"){w=x; }var u=new m(v); u.append(""); },_renderChildItems:function(u,t){var w=this.get_items().toArray(); if(!t&&w.length==0){return; }var x=new m(u); x.append("
    "); if(this._getShouldRenderScrollWrap()){this._renderScrollWrap(x); }var v=this._getGroupCssClass(); if(this._hasMultipleColumns()){this._renderColumns(x,w,v,t); }else{this._renderChildGroup(x,w,v,t); }if(this._getShouldRenderScrollWrap()){x.append("
    "); }x.append("
    "); },_renderScrollWrap:function(v){v.append("
    "); },_renderColumns:function(A,B,z,D){A.append("
      "); var v=this.get_groupSettings(); var x=v.get_repeatColumns(); var w=D?0:Math.min(x,B.length); var C=v.get_repeatDirection(); for(var u=0; u"); var t=C==b.MenuRepeatDirection.Vertical?this._getRowItems(u,x,B):this._getColumnItems(u,x,B); this._renderChildGroup(A,t,z); A.append(""); }A.append("
    "); },_renderChildGroup:function(u,w,v,t){u.append("
      "); if(!t){l.each(w,function(){this._render(u.get_buffer()); }); }u.append("
    "); },_getGroupLevelCssClass:function(){return a+(this.get_level()+1); },_getGroupCssClass:function(){var t=new m(); t.append(this._getFlowCssClass()); if(!this._getShouldRenderScrollWrap()){t.append(" ",r," ",this._getGroupLevelCssClass()); }return t.toString(); },_getRowItems:function(y,w,x){var v=[]; for(var u=0; u0; A--){var C=v[A]; var B=v[A-1]; if(C.length==B.length){return; }B.push(C.shift()); }}; var z=v[w-1]; l.each(x,function(){z.push(this); t(); }); return v[y]; },_getColumnItems:function(t,u,x){var y=[]; var w=0; for(var v=0; v .rmItem",v)[0]; if(t){v.style.width=t.offsetWidth+"px"; }}},_shouldInitializeChild:function(){return true; },_createChildListElement:function(){var t=[]; this._renderChildItems(t,true); var u=l(t.join("")); l(this.get_element()).append(u); this._initializeAnimation(); this._updateTextElementClass(); if(this._getShouldRenderScrollWrap()){this._initializeScroller(); }return u; },_getColumnForItem:function(y){if(!this._hasMultipleColumns()){return null; }var v=this.get_childListElement(); var u=l("> .rmGroupColumn",v); var t=this.get_groupSettings(); var x=t.get_repeatColumns(); if(u.length .rmGroupColumn",v); for(var t=u.length-1; t>0; t--){var x=u[t]; var w=u[t-1]; if(this._getColumnItemCount(w)==this._getColumnItemCount(x)){return; }l("> .rmGroup",w).append(l("> .rmGroup > .rmItem:first",x)); }},_getColumnItemCount:function(t){return l("> .rmGroup > .rmItem",t).length; },_createEmptyColumn:function(){var u=this._getGroupCssClass(); var t=new m(); t.append("
  • "); this._renderChildGroup(t,[],u); t.append("
  • "); var v=l(t.toString()); l(this.get_childListElement()).append(v); return v; },_hasMultipleColumns:function(){var u=this.get_groupSettings(); var t=u.get_repeatColumns(); if(t==1){t=this.get_menu().get_defaultGroupSettings().get_repeatColumns(); }return t>1; },_getShouldRenderScrollWrap:function(){if(this._hasMultipleColumns()){return false; }var t=this.get_groupSettings(); var u=this.get_menu().get_defaultGroupSettings(); var w=t.get_width(); if(!w){w=u.get_width(); }var v=t.get_height(); if(!v){v=u.get_height(); }return w||v; },_getChildElements:function(){var w=l(this.get_childListElement()); if(w.is(".rmMultiColumn")){var A=l("> .rmGroupColumn > ul > .rmItem",w); var u=this.get_groupSettings(); var z=u.get_repeatDirection(); var v=u.get_repeatColumns(); if(v==1||z==b.MenuRepeatDirection.Vertical){return A; }var x=[]; var y=Math.ceil(A.length/v); for(var t=0; t .rmGroupColumn > .rmGroup",u).each(function(){t+=this.offsetWidth; v=Math.max(this.offsetHeight,v); }); if(t==0||v==0){return; }if($telerik.quirksMode){t+=(u.css("border-left-style")!="none"?parseInt(u.css("border-left-width"),10):0)+(u.css("border-right-style")!="none"?parseInt(u.css("border-right-width"),10):0); }u.css("width",t+"px").css("height",v+"px"); },_createItemCollection:function(){var t=new b.RadMenuItemCollection(this); b.RadMenu._createChildControls(this,t); return t; },_getSlideWrapElement:function(){if(!this._slideWrapElement){var t=$telerik.getFirstChildByTagName(this.get_element(),"div",1); if(t&&Sys.UI.DomElement.containsCssClass(t,"rmSlide")){this._slideWrapElement=t; }}return this._slideWrapElement; },_getScrollWrapElement:function(){if(!this._scrollWrapElement){var t=this._getSlideWrapElement(); if(t){this._scrollWrapElement=$telerik.getFirstChildByTagName(t,"div",0); }}return this._scrollWrapElement; },_getAnimationContainer:function(){if(!this._animationContainer){var t=this.get_templated()?1:0; this._animationContainer=$telerik.getFirstChildByTagName(this.get_element(),"div",t); }return this._animationContainer; },_getAnimatedElement:function(){if(!this._animatedElement){this._animatedElement=this._getScrollWrapElement()||this.get_childListElement(); }return this._animatedElement; },_determineExpandDirection:function(){var u=this.get_groupSettings(); if(u.get_expandDirection()!=b.ExpandDirection.Auto){return; }var t=this._getParentFlow(); if(t==b.ItemFlow.Vertical){if(this.get_menu().get_rightToLeft()){u.set_expandDirection(b.ExpandDirection.Left); }else{u.set_expandDirection(b.ExpandDirection.Right); }}else{u.set_expandDirection(b.ExpandDirection.Down); }},_getSlideDirection:function(){var t=this.get_groupSettings().get_expandDirection(); if(t==b.ExpandDirection.Auto){return null; }return t; },_getParentFlow:function(){var t=this.get_parent(); if(!t){return null; }if(t==this.get_menu()){return t._flow; }else{return t.get_groupSettings().get_flow(); }},_initializeAnimation:function(){this._determineExpandDirection(); var t=this._getAnimatedElement(); if(t){var u=this.get_menu(); this._slide=new b.jSlide(t,u.get_expandAnimation(),u.get_collapseAnimation(),u.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(t){this._hasItems=t; },_clearNavigateUrl:function(){var t=this.get_linkElement(); if(!t){return; }if(!this.get_enabled()&&t.href){l(t).data("href",this._getNavigateUrl()); l(t).removeAttr("href"); }},_restoreNavigateUrl:function(){var t=this.get_linkElement(); if(!t){return; }var u=l(t).data("href"); if(this.get_enabled()&&u){t.href=u; }},_updateTextElementClass:function(){var u=this.get_textElement(); if(!u){return; }var t="rmText"; if(this._getHasItems()||this.get_expandMode()==b.MenuItemExpandMode.WebService){t+=" "+this._getExpandClassName(); }u.className=t; },_onCollapseAnimationEnded:function(){var t=this.get_menu(); this.get_element().style.zIndex=0; t._restoreZIndex(); if(this.get_level()==0&&t.get_rightToLeft()){var u=t.get_element(); u.style.cssText=u.style.cssText; }},_initializeScroller:function(){var t=this._getScrollWrapElement(); if(t){this._scroller=new b.MenuItemScroller(this.get_childListElement(),this.get_groupSettings().get_flow()); this._scroller.initialize(); }},_isAutoScrollPossible:function(){var t=this.get_menu(); var u=this._getMaximumExpandSize(); var v=this._getAnimationContainer(); if(this.get_groupSettings().get_flow()==b.ItemFlow.Vertical){return(t._autoScrollMinimumHeightB)){G=b.ExpandDirection.Down; v=x; }break; case b.ExpandDirection.Down:if($telerik.elementOverflowsBottom(N,M,I)){if(y.y>M.offsetHeight){G=b.ExpandDirection.Up; v=-A; }}break; case b.ExpandDirection.Left:if(I.xt){G=b.ExpandDirection.Right; z=w; }}break; case b.ExpandDirection.Right:if($telerik.elementOverflowsRight(N,M,I)){if(t>D){G=b.ExpandDirection.Left; z=-J; }}break; }switch(G){case b.ExpandDirection.Down:case b.ExpandDirection.Up:if($telerik.elementOverflowsRight(N,M)){var F=N.width-(I.x+J); var C=this.get_menu(); if(C.get_rightToLeft()&&this.get_level()==0){z+=F; }else{z=F; }}break; case b.ExpandDirection.Left:case b.ExpandDirection.Right:if($telerik.elementOverflowsBottom(N,M)){var E=Math.min(A,N.height); v=N.height-(I.y+E)-this._defaultScrollSize; }break; }this._setChildContainerPosition(z,v); this._slide.set_direction(G); return{adjustedLeft:z,adjustedTop:v}; },_closeChildren:function(w){var t=this.get_items(); for(var u=0; u0&&t.get_expandDirection()==b.ExpandDirection.Left){this.focusFirstChild(y); return; }var w=this.get_parent(); var u=null; if(w.get_groupSettings){u=w.get_groupSettings(); }if(u&&u.get_expandDirection()==b.ExpandDirection.Right){w._focus(y); return; }var x=this.get_menu().get_openedItem(); if(x){x.focusPreviousItem(y); }},_onKeyboardRight:function(y){var v=this._getParentFlow(); if(v==b.ItemFlow.Horizontal){this.focusNextItem(y); return; }var z=this.get_items(); var t=this.get_groupSettings(); if(z.get_count()>0&&t.get_expandDirection()==b.ExpandDirection.Right){this.focusFirstChild(y); return; }var w=this.get_parent(); var u=null; if(w.get_groupSettings){u=w.get_groupSettings(); }if(u&&u.get_expandDirection()==b.ExpandDirection.Left){w.focus(); return; }var x=this.get_menu().get_openedItem(); if(x){x.focusNextItem(y); }},_onKeyboardEsc:function(v){var t=this.get_parent(); var u=this.get_menu(); if(t==u){this._blur(v); }else{t._close(v); t._focus(v); }},_render:function(t){var u=this.get_parent().get_items().get_count()==1; t[t.length]="
  • "; this._renderLink(t); if(this.get_imageUrl()){this._renderImage(t); }t[t.length]=""; t[t.length]=this.get_text(); t[t.length]=""; this._renderChildItems(t); t[t.length]="
  • "; },_renderAccessKey:function(){if(this.get_isSeparator()||this.get_templated()){return; }var u=this.get_linkElement(); if(!u){return; }var x=this.get_linkElement().accessKey.toLowerCase(); if(!x){return; }var w=this.get_textElement(); var t=w.innerHTML; var v=t.toLowerCase().indexOf(x); if(t.toLowerCase().indexOf("")!=-1){return; }if(v==-1){return; }w.innerHTML=t.substr(0,v)+""+t.substr(v,1)+""+t.substr(v+1,t.length); },_getIsImageOnly:function(){if(this._isImageOnly===null){this._isImageOnly=this.get_imageElement()!=null; }return this._isImageOnly; },_getFlowCssClass:function(){if(this.get_groupSettings().get_flow()==b.ItemFlow.Vertical){return f; }else{return s; }},_isWebServiceCallNeeded:function(){if(this._itemsLoading){return false; }return(!this._itemsLoaded&&this.get_expandMode()==b.MenuItemExpandMode.WebService); },_createLoadingItem:function(){var u=this.get_menu().get_loadingTemplate(); if(u===""){return; }var t=new b.RadMenuItem(); this.get_items().add(t); t.set_text(u); },_removeLoadingItem:function(){if(this.get_menu().get_loadingTemplate()===""){return; }var t=this.get_items().getItem(0); this.get_items().remove(t); },_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(u){var t=this.get_parent(); if(t){this._clearSiblingsWidth(); b.RadMenu._adjustChildrenWidth(t,u); }},_removeChildListCorners:function(){var t=this.get_menu(); if(t&&(t.get_enableRoundedCorners()||t.get_enableShadows())){b.RadMenu._removeChildListCorners(this); }},_removeScrollWrapContainer:function(){var t=this.get_menu(); if(t&&((t.get_enableRoundedCorners()&&this._roundedCornersRendered)||(t.get_enableShadows()&&this._shadowsRendered))){b.RadMenu._removeScrollWrapContainer(this); }},_ensureRoundedCorners:function(){if(this._roundedCornersRendered){return; }var t=this.get_menu(); if(t&&t.get_enableRoundedCorners()){this._roundedCornersRendered=true; b.RadMenu._renderCornerElements(this); }},_ensureShadows:function(){if(this._shadowsRendered){return; }var t=this.get_menu(); if(t&&t.get_enableShadows()){this._shadowsRendered=true; b.RadMenu._renderCornerElements(this,"shadow"); }}}; b.RadMenuItem.registerClass("Telerik.Web.UI.RadMenuItem",b.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(d,c){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=d; this._scrollElement=null; this._orientation=null; this._minScrollPosition=null; this._itemFlow=c; this._scrollerPositionChangedDelegate=null; this._decArrow=null; this._incArrow=null; this._rtl=a.RadMenu._requiresRightToLeft(d); }; 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 c=this._scroller.isAtMinPosition(); var d=this._scroller.isAtMaxPosition(); if(c){this._decArrow.disabled="disabled"; this._setElementCssClass(this._decArrow,this._getDecArrowCssClass(false)); }else{this._decArrow.disabled=""; this._setElementCssClass(this._decArrow,this._getDecArrowCssClass(true)); }if(d){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 c=0; var f=0; var d=0; if(this._orientation==a.ScrollerOrientation.Vertical){c=this._childListElement.offsetHeight-this._scrollElement.offsetHeight; f=this._decArrow.offsetHeight; d=this._incArrow.offsetHeight; }else{c=this._childListElement.offsetWidth-this._scrollElement.offsetWidth; f=this._decArrow.offsetWidth; d=this._incArrow.offsetWidth; }var e=0; var g=c; if(this._rtl&&$telerik.isIE8){e=-c; g=0; }this._scroller.setScrollingLimits(e,g); },_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(d,c){var e=d.className; if(e!=c){d.className=c; }},_onScrollerPositionChanged:function(c,d){this._updateArrows(); }}; a.MenuItemScroller.registerClass("Telerik.Web.UI.MenuItemScroller",null,Sys.IDisposable); })(); if(typeof(Sys)!=='undefined')Sys.Application.notifyScriptLoaded();