1// (c) 2010 CodePlex Foundation 2(function(){function n(){Type.registerNamespace("Sys.Extended.UI");Sys.Extended.UI.PopupControlBehavior=function(n){Sys.Extended.UI.PopupControlBehavior.initializeBase(this,[n]);this._popupControlID=null;this._commitProperty=null;this._commitScript=null;this._position=null;this._offsetX=0;this._offsetY=0;this._extenderControlID=null;this._popupElement=null;this._popupBehavior=null;this._popupVisible=!1;this._focusHandler=null;this._popupKeyDownHandler=null;this._popupClickHandler=null;this._bodyClickHandler=null;this._onShowJson=null;this._onHideJson=null};Sys.Extended.UI.PopupControlBehavior.prototype={initialize:function(){Sys.Extended.UI.PopupControlBehavior.callBaseMethod(this,"initialize");var n=this.get_element();this._popupElement=$get(this._popupControlID);this._popupBehavior=$create(Sys.Extended.UI.PopupBehavior,{id:this.get_id()+"PopupBehavior",parentElement:n},null,null,this._popupElement);this._onShowJson&&this._popupBehavior.set_onShow(this._onShowJson);this._onHideJson&&this._popupBehavior.set_onHide(this._onHideJson);this._focusHandler=Function.createDelegate(this,this._onFocus);this._popupClickHandler=Function.createDelegate(this,this._onPopupClick);this._bodyClickHandler=Function.createDelegate(this,this._onBodyClick);this._popupKeyDownHandler=Function.createDelegate(this,this._onPopupKeyDown);$addHandler(n,"focus",this._focusHandler);$addHandler(n,"click",this._focusHandler);$addHandler(document.body,"click",this._bodyClickHandler);$addHandler(this._popupElement,"click",this._popupClickHandler);$addHandler(this._popupElement,"keydown",this._popupKeyDownHandler);this.registerPartialUpdateEvents();Sys.Extended.UI.PopupControlBehavior.__VisiblePopup&&this.get_id()==Sys.Extended.UI.PopupControlBehavior.__VisiblePopup.get_id()&&this._onFocus(null)},dispose:function(){var n=this.get_element();this._onShowJson=null;this._onHideJson=null;this._popupBehavior&&(this._popupBehavior.dispose(),this._popupBehavior=null);this._focusHandler&&($removeHandler(n,"focus",this._focusHandler),$removeHandler(n,"click",this._focusHandler),this._focusHandler=null);this._bodyClickHandler&&($removeHandler(document.body,"click",this._bodyClickHandler),this._bodyClickHandler=null);this._popupClickHandler&&($removeHandler(this._popupElement,"click",this._popupClickHandler),this._popupClickHandler=null);this._popupKeyDownHandler&&($removeHandler(this._popupElement,"keydown",this._popupKeyDownHandler),this._popupKeyDownHandler=null);Sys.Extended.UI.PopupControlBehavior.callBaseMethod(this,"dispose")},showPopup:function(){var n=Sys.Extended.UI.PopupControlBehavior.__VisiblePopup;n&&n._popupBehavior&&n.hidePopup();Sys.Extended.UI.PopupControlBehavior.callBaseMethod(this,"populate");this._popupBehavior.set_x(this._getLeftOffset());this._popupBehavior.set_y(this._getTopOffset());this._popupBehavior.show();this._popupVisible=!0;Sys.Extended.UI.PopupControlBehavior.__VisiblePopup=this},hidePopup:function(){this._popupBehavior.hide();this._popupVisible=!1;Sys.Extended.UI.PopupControlBehavior.__VisiblePopup=null},_onFocus:function(n){this._popupVisible||this.showPopup();n&&n.stopPropagation()},_onPopupKeyDown:function(n){this._popupVisible&&n.keyCode==27&&this.get_element().focus()},_onPopupClick:function(n){n.stopPropagation()},_onBodyClick:function(){this._popupVisible&&this.hidePopup()},_close:function(n){var t=this.get_element();null!=n&&("$$CANCEL$$"!=n&&(this._commitProperty?t[this._commitProperty]=n:"text"==t.type?t.value=n:Sys.Debug.assert(!1,String.format(Sys.Extended.UI.Resources.PopupControl_NoDefaultProperty,t.id,t.type)),this._commitScript&&eval(this._commitScript)),this.hidePopup())},_partialUpdateEndRequest:function(n,t){if(Sys.Extended.UI.PopupControlBehavior.callBaseMethod(this,"_partialUpdateEndRequest",[n,t]),this.get_element()){var i=t.get_dataItems()[this.get_element().id];undefined===i&&Sys.Extended.UI.PopupControlBehavior.__VisiblePopup&&this.get_id()==Sys.Extended.UI.PopupControlBehavior.__VisiblePopup.get_id()&&(i=t.get_dataItems()._PopupControl_Proxy_ID_);undefined!==i&&this._close(i)}},_onPopulated:function(n,t){Sys.Extended.UI.PopupControlBehavior.callBaseMethod(this,"_onPopulated",[n,t]);this._popupVisible&&this._popupBehavior.show()},_getLeftOffset:function(){return Sys.Extended.UI.PopupControlPopupPosition.Left==this._position?-1*this.get_element
2().offsetWidth+this._offsetX:Sys.Extended.UI.PopupControlPopupPosition.Right==this._position?this.get_element().offsetWidth+this._offsetX:this._offsetX},_getTopOffset:function(){return Sys.Extended.UI.PopupControlPopupPosition.Top==this._position?-1*this.get_element().offsetHeight+this._offsetY:Sys.Extended.UI.PopupControlPopupPosition.Bottom==this._position?this.get_element().offsetHeight+this._offsetY:this._offsetY},get_onShow:function(){return this._popupBehavior?this._popupBehavior.get_onShow():this._onShowJson},set_onShow:function(n){this._popupBehavior?this._popupBehavior.set_onShow(n):this._onShowJson=n;this.raisePropertyChanged("onShow")},get_onShowBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onShowBehavior():null},onShow:function(){this._popupBehavior&&this._popupBehavior.onShow()},get_onHide:function(){return this._popupBehavior?this._popupBehavior.get_onHide():this._onHideJson},set_onHide:function(n){this._popupBehavior?this._popupBehavior.set_onHide(n):this._onHideJson=n;this.raisePropertyChanged("onHide")},get_onHideBehavior:function(){return this._popupBehavior?this._popupBehavior.get_onHideBehavior():null},onHide:function(){this._popupBehavior&&this._popupBehavior.onHide()},get_PopupControlID:function(){return this._popupControlID},set_PopupControlID:function(n){this._popupControlID!=n&&(this._popupControlID=n,this.raisePropertyChanged("PopupControlID"))},get_CommitProperty:function(){return this._commitProperty},set_CommitProperty:function(n){this._commitProperty!=n&&(this._commitProperty=n,this.raisePropertyChanged("CommitProperty"))},get_CommitScript:function(){return this._commitScript},set_CommitScript:function(n){this._commitScript!=n&&(this._commitScript=n,this.raisePropertyChanged("CommitScript"))},get_Position:function(){return this._position},set_Position:function(n){this._position!=n&&(this._position=n,this.raisePropertyChanged("Position"))},get_ExtenderControlID:function(){return this._extenderControlID},set_ExtenderControlID:function(n){this._extenderControlID!=n&&(this._extenderControlID=n,this.raisePropertyChanged("ExtenderControlID"))},get_OffsetX:function(){return this._offsetX},set_OffsetX:function(n){this._offsetX!=n&&(this._offsetX=n,this.raisePropertyChanged("OffsetX"))},get_OffsetY:function(){return this._offsetY},set_OffsetY:function(n){this._offsetY!=n&&(this._offsetY=n,this.raisePropertyChanged("OffsetY"))},get_PopupVisible:function(){return this._popupVisible},add_showing:function(n){this._popupBehavior&&this._popupBehavior.add_showing(n)},remove_showing:function(n){this._popupBehavior&&this._popupBehavior.remove_showing(n)},raiseShowing:function(n){this._popupBehavior&&this._popupBehavior.raiseShowing(n)},add_shown:function(n){this._popupBehavior&&this._popupBehavior.add_shown(n)},remove_shown:function(n){this._popupBehavior&&this._popupBehavior.remove_shown(n)},raiseShown:function(n){this._popupBehavior&&this._popupBehavior.raiseShown(n)},add_hiding:function(n){this._popupBehavior&&this._popupBehavior.add_hiding(n)},remove_hiding:function(n){this._popupBehavior&&this._popupBehavior.remove_hiding(n)},raiseHiding:function(n){this._popupBehavior&&this._popupBehavior.raiseHiding(n)},add_hidden:function(n){this._popupBehavior&&this._popupBehavior.add_hidden(n)},remove_hidden:function(n){this._popupBehavior&&this._popupBehavior.remove_hidden(n)},raiseHidden:function(n){this._popupBehavior&&this._popupBehavior.raiseHidden(n)}};Sys.Extended.UI.PopupControlBehavior.registerClass("Sys.Extended.UI.PopupControlBehavior",Sys.Extended.UI.DynamicPopulateBehaviorBase);Sys.registerComponent(Sys.Extended.UI.PopupControlBehavior,{name:"popupBehavior"});Sys.Extended.UI.PopupControlBehavior.__VisiblePopup=null;Sys.Extended.UI.PopupControlPopupPosition=function(){throw Error.invalidOperation();};Sys.Extended.UI.PopupControlPopupPosition.prototype={Center:0,Top:1,Left:2,Bottom:3,Right:4};Sys.Extended.UI.PopupControlPopupPosition.registerEnum("Sys.Extended.UI.PopupControlPopupPosition",!1)}window.Sys&&Sys.loader?Sys.loader.registerScript("ExtendedPopupBehavior",["ExtendedDynamicPopulate","ExtendedPopup","ExtendedAnimationBehavior"],n):n()})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.