Q1 2009 - Image Manager - Disable new folder button and disable image editor

4 posts, 1 answers
  1. solutionfactory
    solutionfactory avatar
    45 posts
    Member since:
    Apr 2007

    Posted 30 Apr 2009 Link to this post

    Hi all,
    i use image manager as a stand-alone dialog, managed by RadDialogOpener object.

    How to disable new folder button?
    How to disable image editor?

    Thanks in advance,
    best regards

    Flavio
  2. Answer
    Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 04 May 2009 Link to this post

    Hi Flavio,

    You should configure the Image manager to use the EditorDialogs folder and modify the EditorDialogs/ImageManager.ascx control. You should copy the EditorDialogs folder to the root of your web application from the installation and set the following line in the codebehind:

    imageManager.Parameters["ExternalDialogsPath"] = "~/EditorDialogs/"; 

    as it is shown in this KB article. Once you do that you will be able to hide the Image Editor button by setting Visible="False" to the following control:

    <telerik:RadToolBarButton Text="Image Editor" Visible="false" ToolTip="Image Editor" Value="ImageEditor" Enabled="false" CssClass="icnImageEditor" />


    To hide the "New folder" button put the following class in the EditorDialogs/ImageManager.ascx control

        <style type="text/css">
        .icnNewFolder { display:none !important; }
        </style>


    Kind regards,
    Rumen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 19 Jun 2009 Link to this post

    Hi Rumen,

    In this scenario, how can I detect if the ImageManager is called as stand-alone or from an Editor toolbar.

    I have both situations on one page so I want to detect which control has called the ImageManager.
    I want to use this to disable some Tabs in case it is a stand-alone call.

    Hope you can help.

    Marc
  5. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 22 Jun 2009 Link to this post

    I can detect in _initImageItem: function from which object the ImageManager is being opened with:
            var dialogOpener = Telerik.Web.UI.Dialogs.CommonDialogScript.get_windowReference().toString(); 
             
            if (dialogOpener.indexOf('StandAlone',0)!=-1) { 
            this._setTabsEnabled(false); 
            } 
            else { 
            this._setTabsEnabled(true); 
            } 
    And I use next opener

    <telerik:dialogopener runat="server" id="StandAlone"></telerik:dialogopener>

    In this way I can switch off the desired tabs.

    BR,
    Marc



Back to Top