Type.registerNamespace("Telerik.Web.UI"); Telerik.Web.UI.DialogDefinition=function(){ this.Width="600px"; this.Height="400px"; this.Title=""; this.Behaviors=36; this.Modal=true; this.VisibleStatusbar=false; this.VisibleTitlebar=true; this.ClientCallbackFunction=""; }; Telerik.Web.UI.DialogDefinition.registerClass("Telerik.Web.UI.DialogDefinition",null); Telerik.Web.UI.DialogDefinitionsDictionary=function(_1){ for(var _2 in _1){ var _3=_1[_2]; var _4=new Telerik.Web.UI.DialogDefinition(); for(var _5 in _3){ _4[_5]=_3[_5]; } this[_2]=_4; } }; Telerik.Web.UI.DialogDefinitionsDictionary.registerClass("Telerik.Web.UI.DialogDefinitionsDictionary",null); Telerik.Web.UI.DialogOpenEventArgs=function(_6,_7){ Telerik.Web.UI.DialogOpenEventArgs.initializeBase(this); this._dialogName=_6; if(_7){ this._parameters=_7; }else{ this._parameters={}; } }; Telerik.Web.UI.DialogOpenEventArgs.prototype={get_dialogName:function(){ return this._dialogName; },set_parameters:function(_8){ this._parameters=_8; },get_parameters:function(){ return this._parameters; }}; Telerik.Web.UI.DialogOpenEventArgs.registerClass("Telerik.Web.UI.DialogOpenEventArgs",Sys.EventArgs); Telerik.Web.UI.DialogOpener=function(_9){ Telerik.Web.UI.DialogOpener.initializeBase(this,[_9]); this._additionalQueryString=""; this._dialogDefinitions={}; this._handlerUrl=""; this._handlerChecked=false; this._useClassicDialogs=false; this._skin=""; this._dialogParametersProviderTypeName=""; this._dialogUrlLengthLimit=2000; this._dialogUniqueID=""; this._dialogContainers={}; this._container=null; }; Telerik.Web.UI.DialogOpener.prototype={initialize:function(){ Telerik.Web.UI.DialogOpener.callBaseMethod(this,"initialize"); this._dialogDefinitions=new Telerik.Web.UI.DialogDefinitionsDictionary(this.get_dialogDefinitions()); },dispose:function(){ Telerik.Web.UI.DialogOpener.callBaseMethod(this,"dispose"); },get_container:function(){ if(this._container==null){ this._container=this._findChildControl("Window"); } return this._container; },get_additionalQueryString:function(){ return this._additionalQueryString; },set_additionalQueryString:function(_a){ this._additionalQueryString=_a; },get_dialogDefinitions:function(){ return this._dialogDefinitions; },get_handlerUrl:function(){ return this._handlerUrl; },set_handlerUrl:function(_b){ this._handlerUrl=_b; },get_useClassicDialogs:function(){ return this._useClassicDialogs; },set_useClassicDialogs:function(_c){ this._useClassicDialogs=_c; },get_skin:function(){ return this._skin; },set_skin:function(_d){ this._skin=_d; },add_open:function(_e){ this.get_events().addHandler("open",_e); },remove_open:function(_f){ this.get_events().removeHandler("open",_f); },add_close:function(_10){ this.get_events().addHandler("close",_10); },remove_close:function(_11){ this.get_events().removeHandler("close",_11); },openUrl:function(url,_13,_14,_15,_16,_17,_18,_19,_1a,_1b,_1c,_1d){ _1d="EXTERNAL_URL"+(_1d||"default"); var _1e=this._getDialogContainer(_1d); _1e.set_width(_14+"px"); _1e.set_height(_15+"px"); _1e.set_behaviors(_1a||Telerik.Web.UI.WindowBehaviors.Default); _1e.set_modal(_19||true); _1e.set_visibleStatusbar(_1b||true); _1e.set_visibleTitlebar(_1c||true); var _1f=new Telerik.Web.UI.DialogOpenEventArgs(url,_13); this.raiseEvent("open",_1f); _1e.ClientParameters=_13; _1e.set_clientCallBackFunction(_16); _1e.setUrl(url); _1e.show(); _1e.center(); window.setTimeout(function(){ _1e.setActive(true); },100); _1e._iframe.focus(); },open:function(_20,_21,_22){ if(!this._handlerChecked){ this._checkDialogHandler(this.get_handlerUrl()); } var _23=this._getDialogDefinition(_20); var _24=new Telerik.Web.UI.DialogOpenEventArgs(_20,_21); this.raiseEvent("open",_24); var _21=_24.get_parameters(); if(!_22){ _22=_23.ClientCallbackFunction; } if(this.get_useClassicDialogs()){ var _25=$create(Telerik.Web.UI.ClassicDialog,{dialogOpener:this}); _25.ClientParameters=_21; this._applyParameters(_20,_25); if(_22){ _25.set_clientCallBackFunction(_22); } window.__getCurrentRadEditorRadWindowReference=function(){ return _25; }; var _26="width="+parseInt(_23["Width"])+",height="+parseInt(_23["Height"]); _26+=",resizable=0,scrollbars=0,status=0,toolbar=0,menubar=0,directories=0"; var wnd=_25.open(_26); wnd.radWindow=_25; return wnd; }else{ var _25=this._getDialogContainer(_20); var _28=_23["Height"]; _25.set_height(_28); _25.set_width(_23["Width"]); _25.set_behaviors(_23["Behaviors"]); _25.set_modal(_23["Modal"]); _25.set_visibleStatusbar(_23["VisibleStatusbar"]); _25.set_visibleTitlebar(_23["VisibleTitlebar"]); if(_23["ReloadOnShow"]!=null){ _25.set_reloadOnShow(_23["ReloadOnShow"]); } _25.ClientParameters=_21; this._applyParameters(_20,_25); if(_22){ _25.set_clientCallBackFunction(_22); } _25.show(); _25.set_height(_28); _25.center(); window.setTimeout(function(){ _25.setActive(true); },100); if(!$telerik.isSafari||$telerik.isSafari3){ _25._iframe.focus(); } } },_applyParameters:function(_29,_2a){ var _2b=this._getDialogParameters(_29); if(!_2b){ return; } var _2c="&dp="+encodeURIComponent(_2b); var _2d=this._getBaseDialogUrl(_29); var _2e=_2d.length+_2c.length; var _2f=this._dialogParametersProviderTypeName==""; var _30=_2f&&_2e<=this._dialogUrlLengthLimit; if(_30){ var _31=_2a.get_navigateUrl(); var url=_2d+_2c; if(_31!=url){ _2a.setUrl(url); }else{ var _33=_2a.get_contentFrame(); if(_33&&_33.contentWindow&&_33.contentWindow.$find){ var _34=_33.contentWindow.initDialog; if(_34){ _33.contentWindow.setTimeout(function(){ _34(); },1); } } } }else{ _2a.setUrl(_2d); _2a.DialogParameters=_2b; } },_closeContainerDelegate:function(_35){ this.raiseEvent("close",_35); },_getDialogContainer:function(_36){ if(typeof (this._dialogContainers[_36])=="undefined"){ var _37=$find(this.get_id()+_36); if(null!=_37){ _37.dispose(); } this._dialogContainers[_36]=this.get_container().clone(this.get_id()+_36); var _38=this; this._dialogContainers[_36].get_dialogOpener=function(){ return _38; }; this._dialogContainers[_36].add_close(Function.createDelegate(this,this._closeContainerDelegate)); } return this._dialogContainers[_36]; },_getBaseDialogUrl:function(_39){ var _3a=this.get_handlerUrl().indexOf("?")<0?"?":"&"; return this.get_handlerUrl()+_3a+"DialogName="+_39+"&Skin="+this.get_skin()+"&Title="+this._getDialogDefinition(_39)["Title"]+"&doid="+this._dialogUniqueID+"&dpptn="+encodeURIComponent(this._dialogParametersProviderTypeName)+this.get_additionalQueryString(); },_getDialogDefinition:function(_3b){ var _3c=this.get_dialogDefinitions()[_3b]; if(_3c){ return _3c; }else{ throw Error.argumentNull("dialogName",String.format("Dialog Parameters for the {0} dialog do not exist",_3b)); } },_getDialogParameters:function(_3d){ return this._getDialogDefinition(_3d)["SerializedParameters"]; },_checkDialogHandler:function(url){ var _3f=url.indexOf("?")<0?"?":"&"; var _40=url+_3f+"checkHandler=true"; var _41=new Sys.Net.WebRequest(); _41.set_url(_40); _41.add_completed(Function.createDelegate(this,this._checkRequestCompleted)); var _42=new Sys.Net.XMLHttpExecutor(); _41.set_executor(_42); _42.executeRequest(); },_checkRequestCompleted:function(_43,_44){ if(_43.get_responseAvailable()){ var _45=_43.get_webRequest(); var _46=_43.get_responseData(); if(_46&&_46.indexOf("HandlerCheckOK")>0){ this._handlerChecked=true; return; } } window.alert("Web.config registration missing!\n The Telerik dialogs require a HttpHandler registration in the web.config file. Please, use the control's Smart Tag to add the handler automatically, or see the help for more information: Controls > Editor > Dialogs"); }}; Telerik.Web.UI.DialogOpener.registerClass("Telerik.Web.UI.DialogOpener",Telerik.Web.UI.RadWebControl); Telerik.Web.UI.ClassicDialog=function(_47,_48){ Telerik.Web.UI.ClassicDialog.initializeBase(this); this.BrowserWindow=window; this._dialogOpener=null; this._clientCallBackFunction=null; this._window=null; this._url=""; this._closeEvent=[]; }; Telerik.Web.UI.ClassicDialog.prototype={close:function(_49){ this.raise_close(); if(null!=_49&&!(_49 instanceof Sys.UI.DomEvent)){ var _4a=this.get_clientCallBackFunction(); if(_4a){ _4a(this,_49); } } var wnd=this.get_contentFrame(); wnd.setTimeout(function(){ wnd.close(); wnd.parent.focus(); },100); },open:function(_4c){ this._window=window.open(this.get_navigateUrl(),"Dialog"+(new Date()-100),_4c); return this._window; },setUrl:function(_4d){ this._url=_4d; },get_navigateUrl:function(){ return this._url; },get_contentFrame:function(){ return this._window; },dispose:function(){ this._window=null; this._clientCallBackFunction=null; this._dialogOpener=null; this._closeEvent=[]; Telerik.Web.UI.ClassicDialog.callBaseMethod(this,"dispose"); },get_dialogOpener:function(){ return this._dialogOpener; },set_dialogOpener:function(_4e){ this._dialogOpener=_4e; },get_clientCallBackFunction:function(){ return this._clientCallBackFunction; },set_clientCallBackFunction:function(_4f){ this._clientCallBackFunction=_4f; },add_close:function(_50){ Array.add(this._closeEvent,_50); },remove_close:function(_51){ Array.remove(this._closeEvent,_51); },raise_close:function(_52){ var evt=this._closeEvent; if(!evt||(evt.length===0)){ return; } evt=Array.clone(evt); if(!evt._handler){ evt._handler=function(_54,_55){ for(var i=0,l=evt.length;i