Custom Dialogs and aspx

12 posts, 1 answers
  1. christopher willis
    christopher willis avatar
    47 posts
    Member since:
    Sep 2006

    Posted 28 Jan 2008 Link to this post

    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.

  2. Answer
    Rumen
    Admin
    Rumen avatar
    14430 posts

    Posted 29 Jan 2008 Link to this post

    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
  3. christopher willis
    christopher willis avatar
    47 posts
    Member since:
    Sep 2006

    Posted 29 Jan 2008 Link to this post

    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!


     

  4. Rumen
    Admin
    Rumen avatar
    14430 posts

    Posted 30 Jan 2008 Link to this post

    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
  5. christopher willis
    christopher willis avatar
    47 posts
    Member since:
    Sep 2006

    Posted 31 Jan 2008 Link to this post

    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.
  6. Rumen
    Admin
    Rumen avatar
    14430 posts

    Posted 05 Feb 2008 Link to this post

    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
  7. SamVanity
    SamVanity avatar
    154 posts
    Member since:
    Apr 2006

    Posted 05 Mar 2008 Link to this post

    where can we find the details about showExternalDialog?

    in the document there is only a section for showDialog.
  8. Rumen
    Admin
    Rumen avatar
    14430 posts

    Posted 05 Mar 2008 Link to this post

    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
  9. Nelson
    Nelson avatar
    12 posts
    Member since:
    Nov 2010

    Posted 30 May 2012 Link to this post

    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.
  10. Rumen
    Admin
    Rumen avatar
    14430 posts

    Posted 30 May 2012 Link to this post

    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.
  11. Nelson
    Nelson avatar
    12 posts
    Member since:
    Nov 2010

    Posted 30 May 2012 Link to this post

    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.
  12. Rumen
    Admin
    Rumen avatar
    14430 posts

    Posted 04 Jun 2012 Link to this post

    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.
Back to Top