Image Manager Issues

8 posts, 1 answers
  1. Jim Johnstone
    Jim Johnstone avatar
    5 posts
    Member since:
    Nov 2007

    Posted 18 Apr 2008 Link to this post

    I have a couple of issues using the Image Manager in the current release (Q1 2008).

    1. I have implemented a custom ImageContentProvider.  Everything works fine with it except that the Delete button is always disabled in the Image Manager.  This same provider works fine in the older RadControls for ASP.NET.  I have the DeletePaths = "." for the ImageManager (same as was used before).  This is also the same value I have for ViewPaths and UploadPaths both of which work fine.  How can I get the Delete button to be enabled?

    2.  Our custom image provider stored the images in a database without any folder structure.  Is there anyway to disable/remove the Create Folder button and the ".." in the images list?  It would certainly be nice as these are of no value in our system.

    3. In the current relase, the Image Alt Text box in the Image Manager is half hidden using certains skins.  Just one example of this is the Vista skin.

    Any help with these would be appreciated.  Thanks.

    Jim
  2. Jim Johnstone
    Jim Johnstone avatar
    5 posts
    Member since:
    Nov 2007

    Posted 21 Apr 2008 Link to this post

    Well, I've solved issue #1 by setting the correct permissions when creating the DirectoryItems.

    #2 is still an issue.  I have overridden the CanCreateDirectory property and always return false but the Create Directory button is still always enabled on the Image Manager.  I also cannot get rid of having the ".." (backup one directory) in the list of Images.  With our DB structure, we have no directories for images at all.  It's just a flat list.  I have tried many different combinations of ViewPaths and setting of values in the FileItems and DirectoryItems unsuccessfully.  I don't know if it is because our site is a virtual directory but it is very annoying to be able to go back a directory in the images list when there are no directories at all.

    Jim
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    George
    Admin
    George avatar
    859 posts

    Posted 22 Apr 2008 Link to this post

    Hi Jim,

    Straight to your questions:
    1. Is there anyway to disable/remove the Create Folder button :
      Yes you can hide the Create Folder button and the ".." in the images list with the following JavaScript called when the Image Manager command is executed:


      <script type="text/javascript">  
         function OnClientCommandExecuted(editor, args)  
          {  
             if(args.get_commandName()=="ImageManager")  
             window.setTimeout(function()  
             {  
                 var imageManager = window.frames['RadEditor1dialogOpenerImageManager'];  
                 var button =  imageManager.document.getElementById('dialogControl_ImageManager_FileLister1_CreateNewDirectory');  
                 button.style.display="none";  
                 elements = imageManager.document.getElementById('dialogControl_ImageManager_FileLister1_ItemsTable').childNodes[0].childNodes;  
                 for(var i=0; i<elements.length; i++)  
                 {  
                      
                    if(elements[i].className=="folderup")  
                    {  
                       elements[i].style.display="none";  
                    }  
                 }  
                 },500);  
          }  
      </script>  
      <telerik:RadEditor ID="RadEditor1" 
          OnClientCommandExecuted="OnClientCommandExecuted" 
          ImageManager-ViewPaths="~/Img" 
          ImageManager-UploadPaths="~/Img" 
          runat="server"   
          Skin="Default">  
          <Content>  
          </Content>  
      </telerik:RadEditor> 
    2. In regards to the skin problem - we logged this issue in our ToDo list and we will do our best to have it fixed as soon as possible.

    I hope this helps.

    Sincerely,
    George
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Jim Johnstone
    Jim Johnstone avatar
    5 posts
    Member since:
    Nov 2007

    Posted 22 Apr 2008 Link to this post

    Thanks for this answer.  I was able to use your code to achieve what was desired.

    Jim
  6. Durga
    Durga avatar
    3 posts
    Member since:
    Jul 2008

    Posted 02 Jul 2008 Link to this post

    I did visible False to Refresh, CreateNewDirectory, ImageEditor, Delete in Image Manager using OnClientCommandExecuted event. After that I clicked on upload button and uploaded an Image. Now all the hidden buttons are become visible. How to handle this scenario to hide the buttons?

  7. George
    Admin
    George avatar
    859 posts

    Posted 03 Jul 2008 Link to this post

    Hi Durga,

    In RadEditor v.619 it is possible to load editor dialogs [.ascx-es] from an external folder, rather than from the DLL. Thus, it is possible for developers to easily make changes and restrictions to the dialogs and their functionality.

    Please find attached a sample project that shows how to achieve the desired behavior.

    Sincerely,
    George
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  8. mattc
    mattc avatar
    21 posts
    Member since:
    Aug 2007

    Posted 05 Feb 2009 Link to this post

    hello

    Know this is an old thread. Is the method here still valid for hiding higher folders from the editor?

    Doesn't seem to work in the latest build?

    Thanks

    Matt
  9. Rumen
    Admin
    Rumen avatar
    12851 posts

    Posted 09 Feb 2009 Link to this post

    Hi Matt,

    Please, see the following live example on the subject: ExternalDialogsPath.

    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