Property opening a dialog using EPi.CreateDialog

Vote:
 
I have a problem with using EPi.CreateDialog, when i open the dialog up i get EPi is not defined 764 EPi.RemoveEventListener(this, "load", this.opener.EPiOpenedDialog._DialogLoad); and when i close my dialog from the default.aspx (using EPi.GetDialog().Close(...); i get EPi is not defined 853 EPi.RemoveEventListener(window.top, "unload", this._OnOpenerUnload); In the dialog i have on page_load RegisterClientScriptFile(UriSupport.ResolveUrlFromUtilBySettings("javascript/episerverscriptmanager.js")); RegisterClientScriptFile(UriSupport.ResolveUrlFromUIBySettings("javascript/system.aspx")); RegisterClientScriptFile(UriSupport.ResolveUrlFromUIBySettings("javascript/system.js")); and on the property i have under CreateEditControls() EditButton = new Button(); EditButton.ID = Name + "Edit"; EditButton.Text = "..."; EditButton.CssClass = "epismallbutton"; EditButton.OnClientClick = "OpenPropertyDialog('" + ValueHiddenField.ClientID + "','" + ResponseTextBox.ClientID + "');"; Controls.Add(EditButton); if(!Page.ClientScript.IsClientScriptBlockRegistered("jsscript")){ string js = @""; Page.ClientScript.RegisterClientScriptBlock(typeof(String), "jsscript", js);
#16013
Feb 27, 2008 14:05
Vote:
 
There is an article (with code samples) regarding Modal Dialogs in EPiServer UI available here: http://www.episerver.com/en/EPiServer_Knowledge_Center/Documentation/Articles/EPiServer-CMS/Modal-Dialogs-in-the-EPiServer-UI-for-non-IE-Browsers/
#16806
Feb 27, 2008 14:51
Vote:
 
that's one that i've followed, thought, it differs somewhat when you're building a property
#16807
Feb 27, 2008 15:38
Vote:
 
The problem was that i used Button instead of a HtmlInputButton. Now it works
#16808
Feb 27, 2008 15:59
Vote:
 

Hi!

I'm creating a customproperty where I need to use a modal dialog. I have not been able to find an example of this, only the few lines Mikael gave here. If there is an example somewehere that someone could point me to, or if Mikael could be so kind as to present the code for his property that would be very much appreciated :)

#29331
Apr 21, 2009 13:44
Vote:
 

I used reflector to look at the Page property type editor control when creating my control used in this blog post (source included, so you can look at that one too):

http://world.episerver.com/en/Blogs/Magnus-Paulsson/Dates/2009/4/Generic-Property-Type-Selection-Tree/

#29339
Edited, Apr 21, 2009 14:50
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.