This is a migrated thread and some comments may be shown as answers.

Custom Dialogs and aspx

11 Answers 389 Views
Editor
This is a migrated thread and some comments may be shown as answers.
christopher willis
Top achievements
Rank 1
christopher willis asked on 29 Jan 2008, 02:07 AM

With the previous RadEditor we could use an .aspx for a modal dialog from the toolbar.  Now it seems it has to be .ascx user control, meaning all the dialogs we wrote as web pages before will not work now.   Is this the case?  The new radwindow still seems to use aspx’s for dialogs, so I’m curious why the ascx change for the RadEditor.  I hope we can still use aspx's for dialogs, as converting them all to ascx's will be far from trivial for us.

11 Answers, 1 is accepted

Sort by
0
Accepted
Rumen
Telerik team
answered on 29 Jan 2008, 09:25 AM
Hi Christopher,

Yes, it is possible to add ASPX page to a custom dialog of RadEditor "Prometheus". Here is a sample code:

<telerik:RadEditor ID="contentEditor" runat="server"></telerik:RadEditor>

<script type="text/javascript">
Telerik.Web.UI.Editor.CommandList["LibraryImageManager"] = function(commandName, editor, args)
{
   var myCallbackFunction = function(sender, args)
   {
       editor.pasteHtml(String.format("<img src='{0}' />", args.src))
   }
     editor.showExternalDialog(
       '../UserControls/EditorDialogs/LibraryImageDialog.aspx',
       null,
       600,
       400,
       myCallbackFunction,
       null,
       'ImageLibraryDialog',
       true,
       Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
       false,
       false)
    };
</script>


Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
christopher willis
Top achievements
Rank 1
answered on 29 Jan 2008, 04:47 PM

Cool - that worked right away.

However, there is some odd imagery shown in the status bar of the dialog.  I need to hide the status bar until thats fixed - how is that done?

I guess I need some documentation for the new showExternalDialog method - it has more parameters than the old classic version.

Also, I had used the old radwindow script in my dialog (which works)

<script type="text/javascript" src="../RadControls/Editor/Scripts/7_3_1/RadWindow.js"></script>



I'd like to swap that out to the Prometheus version, which hopefully doesn't require me to change the script version with each new release.  How is that done?

Thanks!


 

0
Rumen
Telerik team
answered on 30 Jan 2008, 05:45 PM
Hi Christopher,

We are not sure what is causing the problem with odd imagery shown in the status bar. Could you please open a support ticket and send a screenshot of the problem? We can help you to hide the statusbar with CSS but we need to see the problem first.

We are currently working on the RadEditor dialogs and their implementation is still in development. In the official build of RadEditor "Prometheus" there will be no need to reference a RadWindow script file into the dialog. You can look at custom dialog example: Custom Dialogs.

If you are not able to work out how to pass back and forward values from the dialog to the page - open a ticket send us a working project with your dialog and we will make the necessary adjustments.


Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
christopher willis
Top achievements
Rank 1
answered on 31 Jan 2008, 03:50 PM
I think the Default2006 skin has the problem with the status bar (black ajax loader and black text on black background), the other skins don't show it. 

I don't really need the status bar,so I'd like to know how to disable it with the editor.showExternalDialog.  The documentation does not list that function yet.
0
Rumen
Telerik team
answered on 05 Feb 2008, 01:46 PM
Hi Christopher,

Thank you for the additional information!

We were able to reproduce the Default2006 skin problem and we fixed it in our in-house build of RadEditor "Prometheus". The problem will not exist in the upcoming hotfix of RadEditor due in the end of February' 2008.

Currently, you can hide the dialog's statusbar with the following style:

    <style>
    .statusbarrow
    {
        display:none;
    }
    </style>

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
SamVanity
Top achievements
Rank 2
answered on 05 Mar 2008, 02:48 PM
where can we find the details about showExternalDialog?

in the document there is only a section for showDialog.
0
Rumen
Telerik team
answered on 05 Mar 2008, 03:08 PM
Hello Sam Van,

The showExternalDialog method is not documented yet, because we will enhance the RadEditor "Prometheus" custom dialogs for the official release, due in April. We will update the help with detailed information about this method once we finish the development of the custom dialogs.

     Here is a list of the available showExternalDialog arguments:

showExternalDialog : function(url, argument, width, height, callbackFunction, callbackArgs, title, modal, behaviors, showStatusbar, showTitlebar)

I hope this helps.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Nelson
Top achievements
Rank 1
answered on 30 May 2012, 01:30 PM
I am looking for the details of showExternalDialog, however, I too only see showDialog with no mention of showExternalDialog anywhere except a quick demo and example. Specifically, at the moment I am curious about the 'behaviors' parameter. Using the supplied showExternalDialog below as used, it does not render a titlebar or a close button so I am confused as to how setting those behaviors affects the window.
0
Rumen
Telerik team
answered on 30 May 2012, 01:57 PM
Hi,

The editor's showExternalDialog() method has the following arguments:

showExternalDialog(url (aspx/html file), argument, width, height, callbackFunction, callbackArgs, title, modal, behaviors, showStatusbar, showTitlebar);

e.g.

editor.showExternalDialog(
            'InsertLink.aspx',
            argument,
            270,
            300,
            myCallbackFunction,
            null,
            'Insert Link',
            true,
            Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move,
            true,
            true);
    };

All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Nelson
Top achievements
Rank 1
answered on 30 May 2012, 02:22 PM
I was looking for details specifically about the 'behaviors' parameter at the moment. When using the call you just supplied, I do not generate a window I can move or close via titlebar.
0
Rumen
Telerik team
answered on 04 Jun 2012, 10:04 AM
Hello,

The WindowBehaviors are

None: 0, Resize: 1, Minimize: 2, Close: 4, Pin: 8, Maximize: 16, Move: 32, Reload: 64, Default: (1 + 2 + 4 + 8 + 16 + 32 + 64)
and you can set them with numbers as shown below:

editor.showExternalDialog(
url,
null,
270,
300,
myCallbackFunction,
null,
'',
true,
1 + 2 + 4 + 8 + 16 + 32 + 64,
false,
true);
args.set_cancel(true);



All the best,
Rumen
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Editor
Asked by
christopher willis
Top achievements
Rank 1
Answers by
Rumen
Telerik team
christopher willis
Top achievements
Rank 1
SamVanity
Top achievements
Rank 2
Nelson
Top achievements
Rank 1
Share this question
or