Image Manager/File Manager

29 posts, 0 answers
  1. urbanBaldGuy
    urbanBaldGuy avatar
    13 posts
    Member since:
    Apr 2007

    Posted 18 Oct 2007 Link to this post

    Is there any way to have the Image/File Manager show as a seperate window?  I am using a RadGrid with a RadWindow as a record editor, inside the record editor is a RadEditor.  When you click the Image Manager button you don't see all of the Image Manager.  Is their any way for the Image/File Manager windows to show over the top of the RadWindow?
  2. Rumen
    Admin
    Rumen avatar
    12847 posts

    Posted 18 Oct 2007 Link to this post

    Hi,

    The requested functionality is supported by the classic dialogs of RadEditor for ASP.NET (UseClassicDialogs="true").
    Unfortunately, for the time being we do not have plans to implement the UseClassicDialogs property for the RadEditor "Prometheus" dialogs, but we will reconsider its implementation for one of the upcoming versions.

    Currently our suggestion is to set a bigger width and height to the RadWindow dialogs.

    Kind regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. urbanBaldGuy
    urbanBaldGuy avatar
    13 posts
    Member since:
    Apr 2007

    Posted 18 Oct 2007 Link to this post

    Thank you for the reply.  I really don't want to use the old RadEditor.  I like the load times of Prometheus to much.

    How can I launch my RadWindow maximized?  I set the initial behavior but it does not appear to have any effect.
  5. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 22 Oct 2007 Link to this post

    I know I've suggested this before in a support ticket, but I'll say it again here as it hasn't been implemented.  This, to me, makes more sense from a UX point of view.

    The *Managers from the editor should aways open relative to the entire browser window with regards to centering and sizing - and then appear as modal on top of anything else that happens to be open at the time.  The way I see it, if the end user has opened any of the dialogs, that dialog is their primary focus until they close the dialog - therefore the entire rest of the screen become irrelevant.

    For example, say you have a r.a.d.Splitter with two panes (top and bottom).  The top pane is used for navigation, and the bottom is used for content.  The bottom pane then opens r.a.d.Windows (as modal windows) which load pages that contain editors.  These windows are set with sizes smaller than the standard Image Manager window.

    As of now, opening the Imange Manager within the r.a.d.Window causes the Image Manager window to be cropped by the bounds of the modal Window.  The only work-around is to set the original r.a.d.Window size bigger than the standard Image Manager which is an ugly solution.

    What should happen is when opening the Image Manager it should set the currently opened r.a.d.Window, and the r.a.d.Splitter as the background and open the Image Manger as a modal window relative to the entire browser window.  Sounds like it would solve alot of issues.
  6. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 23 Oct 2007 Link to this post

    Hello Shaun,

    You are correct when you say "The *Managers from the editor should always open relative to the entire browser window with regards to centering and sizing - and then appear as modal on top of anything else that happens to be open at the time."

    This is exactly what the editor does, or tries to do.

    However, when you open the editor in a [relatively small] RadWindow dialog, the editor dialogs will of course open within the context of the dialog, as RadWindow is implemented as yet another ASP.NET control that would only render and exist within the context of its own document. In theory, rendering a window in a parent page is possible, in case the page originates from the same server. However, at present the RadWindow does not provide this functionality by default.

    Since there are a number of people that use the editor in a RadWindow dialog, we believe implementing this would be useful to have, so we added it to the TODO list and we will implement it as soon as we complete the remaining parts of RadEditor for Prometheus.


    Greetings,
    Tervel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 24 Oct 2007 Link to this post

    It's actually a more common scenario that the r.a.d.Window would be (too) small for the Image Manager when using just the DialogOpener control.  In any case, I'm sure the code for the fix would work for both scenarios (DialogOpener on its own or the ImageManager from an Editor Toolbar).
  8. Shane
    Shane avatar
    91 posts
    Member since:
    Mar 2007

    Posted 12 Mar 2008 Link to this post

    Hi Guys,

    I have a editor inside a iframe. so when I click on the image manager, modal doesn't cover the whole are and it looks ugly. I need to open the dialog in a new window. How do I do this?

    Shane
  9. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 13 Mar 2008 Link to this post

    Hi Shane,

    We are currently looking for possibilities to address the problem in the easiest possible way for the developers.
    There are several options and each has some pros and cons.
    We are currently leaning towards the following implementation:

    Scenario: Editor is in a RadWindow or in simple iframe [i.e, in a different document that only occupies part of the page. We want, when an editor dialog open, that it renders in the context of the top browser window so that its modality covers the whole page, as well as it is possible to move and resize the window on the whole page.

    Possible solution we are currently experimenting with:
    1. Add a ScriptManager and a RadWindowManager Prometheus on the top browser page [must be done by the developer]
    2. When the editor opens a dialog, it will check whether the current window is the top browser window. If it is not, it will try to access the top browser window (possible if the two pages are from the same domain), and get a reference to a RadWindowManager. If it gets a reference to the manager, it will use it to create the windows in the context of this window manager [the RadEditorPrometheus code will need to be changed to do this].

    There is one important question to be addressed with this approach - it is possible that the developer aready uses a RadWindowManager on the top page, and perhaps has written client code that make break if the editor [or editors] start using the same RadWindowManager.

    One option would be to hardcode the editor to use the RadWindowManager only if it has a special ID, e.g. "RadEditorDialogProvider".

    I am writing all this hoping to hear your suggestions and comments on the approach, so that we decide on an approach and implement it.


    Best regards,
    Tervel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  10. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 13 Mar 2008 Link to this post

    Hello Tervel,

    Yes, it is acceptable to ask the developer to put a RadWindowManager on the top page, and yes, it is also acceptable to require that it's ID be "RadEditorDialogProvider".  To the developer (me) this is a painless solution to a horribly painful problem.

    Any chance this can be done by yesterday?  I've been patiently waiting since October...

    Thanks,

    Shaun.
  11. Shane
    Shane avatar
    91 posts
    Member since:
    Mar 2007

    Posted 13 Mar 2008 Link to this post

    Hi Tervel,

    Thanks for you reply!

    Unfortunately, I can't have a RadWindowManager on the page.

    The reason why I am using iFrame is, the parent page is a HTML page and I can't have a asp controls at all. For this reason I need to open up the dialogue in a separate windows which is common for the page.

    Thanks for taking this on-board!

    Regards,

    Shane
  12. Shaun Peet
    Shaun Peet avatar
    571 posts
    Member since:
    Aug 2004

    Posted 01 Apr 2008 Link to this post

    Is this coming for Q1 2008?
  13. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 29 May 2008 Link to this post

    Hi Shaun,

    We were not able to implement this request for the Q1 release. We gave a try to building the functionality into RadWindow - that is, to make it possible for a RadWindow to automatically open into the context of the top browser window, using the scripts from the window it resides in. If we had been successful, that would mean that the scenario discused here would have been solved seamlessly for the developer, without the need for any extra code and efforts. It turned out, however, that the MS AJAX framework, on top of which our controls are built has quite some problems with this approach - especially when running the application in debug mode - all the parameter/object debug checks are not well-suited to executing between windows.

    That said, we still believe it might work out and we have not given up on this approach - because it is the best possible solution in terms of end result. However, we did not have the time to address all the issues that arose with it for the Q1 release, and it was put on hold. I am monitoring this thread, and once the experiments/research with building the functionality right into RadWindow are complete I will update the thread on what came out and what the next steps will be.

    Best regards,
    Tervel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  14. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 28 Aug 2008 Link to this post

    Hello,

    Here is an update on this topic. The same answer was posted in another forum thread:
    http://www.telerik.com/community/forums/thread/b311D-bktahc.aspx

    =============================================
    We tried getting the RadWindow to load in the parent frame - but with dubious success. The bottomline is that the MS AJAX framework, on top of which the Telerik suite is built is not designed to allow for creating rich controls in a document other than where the ScriptManager resides.

    Thus we had to abandon the idea. It seems that the only way to go in this scenario is to provide a property that will run the  heavyweight browser windows (e.g. window.open) instead of the skinnable RadWindow. We have included this on our TODO list for the current Q3 2008, and the functionality will appear either in Q2 SP2, or at Q3 at latest.

    =============================================

    Sincerely yours,
    Tervel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  15. Jim
    Jim avatar
    52 posts
    Member since:
    Sep 2012

    Posted 16 Nov 2008 Link to this post

    What is the status of this?
  16. Rumen
    Admin
    Rumen avatar
    12847 posts

    Posted 17 Nov 2008 Link to this post

    Hi James,

    Please, see the following KB article on the subject, which provides guidance how to configure RadEditor to use the browser modal dialogs instead of RadWindow:

    Using browser modal dialog instead of RadWindow.

    Best regards,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  17. Seth
    Seth avatar
    14 posts
    Member since:
    Dec 2007

    Posted 03 Dec 2008 Link to this post

    We attempted to the solution as mentioned in the kb article along these lines:

    ScriptManager.RegisterClientScriptBlock(MeMe.GetType(), "RadEditorClientLoad""function RadEditorClientLoad(editor){editor.set_useClassicDialogs(true);}"True
    Me.OnClientLoad = "RadEditorClientLoad" 
     

    Appears to work fine.  But now, when you click Insert on the Image Manager dialog to insert a new image into the editor, firebug is giving us a javascript error:

     
     
    [Exception... "'Sys.InvalidOperationException: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no]  
    _getAbbrMonthIndex("")  

    Any insight as to why it might be giving us this error?



  18. Rumen
    Admin
    Rumen avatar
    12847 posts

    Posted 05 Dec 2008 Link to this post

    Hello Seth,

    Your code is correct and you should not experience this problem. I tried to reproduce the reported error using the latest version Q3 SP1 of RadEditor for ASP.NET AJAX, but to no avail. For your convenience I have attached my test project. Are you able to reproduce the error in FF with it?

    All the best,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  19. Seth
    Seth avatar
    14 posts
    Member since:
    Dec 2007

    Posted 05 Dec 2008 Link to this post


    Yep, reproduced it with your attached code.

    Downloaded code, unzipped, opened in VS2008, ran
    Launched FF
    Clicked Image Manager button
    Clicked Desiy.jpg
    Clicked Insert

    Firebug reports the same js exception

    I'm using FF 2.0.0.18

    [Exception... "'Sys.InvalidOperationException: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.' when calling method: [nsIDOMEventListener::handleEvent]" nsresult: "0x8057001c (NS_ERROR_XPC_JS_THREW_JS_OBJECT)" location: "<unknown>" data: no] 
    Sys$CultureInfo$_getAbbrMonthIndex(""


  20. Rumen
    Admin
    Rumen avatar
    12847 posts

    Posted 08 Dec 2008 Link to this post

    Hi Seth,

    I made the same test under Firefox 2.0.0.14 and I was not able to reproduce this error again. Firebug and the Error Console of the browser did not show any errors.

    Could you please, tell us whether the image is inserted in the editor? Does the editor work after the image insertion despite the error message?

    By the way, are you able to reproduce the error in Firefox 3.0.4?

    Best regards,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  21. Seth
    Seth avatar
    14 posts
    Member since:
    Dec 2007

    Posted 08 Dec 2008 Link to this post

    Everything appears to work correctly.  The image does get inserted.  The editor also continues to work just fine.  You can insert multiple images successfully.  Only upon insertion of the 1st image does the javascript error appear.  In fact, if I reload the page after receiving the js exception and attempt to reinsert the image, it appears to work fine as well with no error thrown.  What happens if you completely shutdown FF, start up a new instance, and the 1st thing you do is load up your sample application and insert an image?

    FF 3.0.4 did not give me the js exception.
  22. Tervel
    Admin
    Tervel avatar
    1337 posts

    Posted 08 Dec 2008 Link to this post

    Hi Seth,

    On occasions FF would throw such an exception mostly when dealing with moving of focus across documents. It does not prevent any code from working properly - as you point out yourself, everything works fine, as well as the error only happens occasionally. There is no clear explanation on what causes it. This is purely a FireFox issue that cannot be controlled or prevented from code.


    Kind regards,
    Tervel
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  23. Seth
    Seth avatar
    14 posts
    Member since:
    Dec 2007

    Posted 08 Dec 2008 Link to this post

    I don't mean to hijack the thread, but this one seems related as well.  Using the previously attached sample code, if you start up the web site, then open the page in IE7, click on the Hyperlink Manager, and then click on the "ApplyClass" CSS Class dropdown, you get a javascript exception.

    ---------------------------
    Error
    ---------------------------
    A Runtime Error has occurred.
    Do you wish to Debug?

    Line: 3346
    Error: 'cssText' is null or not an object
    ---------------------------
    Yes   No  
    ---------------------------

    Seems to be IE7 only.  I am unable to reproduce in FF.  But can consistently reproduce in IE7 using the posted sample project.

  24. Nikolay Raykov
    Admin
    Nikolay Raykov avatar
    102 posts

    Posted 09 Dec 2008 Link to this post

    Hi Seth,

    I managed to reproduce the problem and turned out to be an IE bug. I came up with the following solution - you should use external dialogs to fix the problem.
    Copy the EditorDialogs from the installation folder of RadControls to your application. Then set the ExternalDialogsPath property to point to this folder. This is a help page where you can find more information about this:

    http://www.telerik.com/help/aspnet-ajax/customizingimagedialog.html

    Then you need to add this javascript code to the Hyperlink Manager ascx file (LinkManager.ascx):

    <script type="text/javascript"
        Telerik.Web.UI.Editor.ApplyClassDropDown.prototype.oldRenderChild = Telerik.Web.UI.Editor.ApplyClassDropDown.prototype.renderChild; 
        Telerik.Web.UI.Editor.ApplyClassDropDown.prototype.renderChild = function(cell, dataItem, index) 
        { 
            if (dataItem[1]) 
            { 
                this.oldRenderChild(cell, dataItem, index); 
            } 
        } 
    </script> 

    For your convenience I have attached the changed ascx file.

    All the best,
    Nikolay Raykov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  25. Seth
    Seth avatar
    14 posts
    Member since:
    Dec 2007

    Posted 10 Dec 2008 Link to this post

    I created a folder the dialogs and specified the ExternalDialogsPath property, but it still seems to be using the dialog from the rad editor assembly.  Any ideas as to why it wouldn't be using the dialogs as specified in the ExternalDialogsPath path?
  26. Seth
    Seth avatar
    14 posts
    Member since:
    Dec 2007

    Posted 10 Dec 2008 Link to this post

    My fault, it has magically started working.  Must have been cached or something.  Code gnomes.
  27. Seth
    Seth avatar
    14 posts
    Member since:
    Dec 2007

    Posted 10 Dec 2008 Link to this post

    Well, setting the ExternalDialogsPath has fixed the link manager in IE7.  Unfortunately, it has now introduced a new bug.  If I now open up the site with ExternalDialogsPath defined in IE6, and click on the Image Manager, I get a new javascript error:

    -------------------------
    Error
    -------------------------
    A Runtime Error has occurred.
    Do you wish to Debug?

    Line: 54
    Error: Object required
    -------------------------
    Yes   No  
    -------------------------

    Appears to be IE6 only.  IE7 and FF2 appear to be ok.
  28. Nikolay Raykov
    Admin
    Nikolay Raykov avatar
    102 posts

    Posted 11 Dec 2008 Link to this post

    Hello Seth,

    I made some tests on IE6 and I couldn't reproduce the problem. I suggest you to clear the cache of the browser and see whether the problem persists.

    If you still get this error, please, open a support ticket and send us a sample project so that we can examine the problem locally - we will do our best to help.



    Kind regards,
    Nikolay Raykov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  29. Katrine
    Katrine avatar
    3 posts
    Member since:
    Jan 2008

    Posted 02 Feb 2009 Link to this post

    So in conclusion, at present: if you would like to use a RadEditor inside a RadWindow, your FileManagers is going to pop up behind the Radwindow? As an alternative you propose to use ModalDialog solution instead.

    Is this still the case? If yes, is this still on the TODO list (when will next version be out?)? And if yes, are there any other fixes that might allow me to use it inside a RadWindow?

    I use RadControls for ASP.NET AJAX Q2 2008

  30. Rumen
    Admin
    Rumen avatar
    12847 posts

    Posted 04 Feb 2009 Link to this post

    Hello Katrine,

    Please see the following KB article on the subject, which provides guidance how to configure RadEditor to use the modal browser dialogs instead of RadWindow based:
    Using browser modal dialog instead of RadWindow.

    Best regards,
    Rumen
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017