Unwanted closings of Document Manager

5 posts, 1 answers
  1. Roman
    Roman avatar
    7 posts
    Member since:
    Oct 2010

    Posted 22 Apr 2014 Link to this post

    Hi!

    According to the online demos: http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx

    I've found some issues:

    1. In RadEditor -> Document Manager, renaming a file or a folder pressing the enter key instead of clicking the OK button will close the whole document manager. You have to re-open the document manager again... Same goes for the ESC key while renaming or when adding a new folder.

    2. Also the document manager will also close when just pressing the ESC or enter key. Is there a way to avoid this?

    3. Renaming without any changes will result the message 'A file with a name same as the target already exists!' makes no sense to me, just leave the file untouched, close the window and all is good!

    Thanks!

    Roman Haussener
    Blowfish AG
  2. Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 25 Apr 2014 Link to this post

    Hi Roman,

    Following the described steps does not bring any concerns that could be a possible problem for user experience:

    1. Using the Rename dialog to change folder names - pressing enter is renaming the folder name as expected on pressing Enter key and the Esc key escapes only the rename dialog. Please examine this screencast.
    2. Using the Document Manager the mentioned behavior is as expected - Enter - adds the link, Esc - closes dialog. You can change this behavior by customizing the LinkManager dialog by following this approach.  In this dialog you will find a keyDownHandler method, removing the corresponding actions will remove the desired behavior.

    3. This behavior is encountered because of design decisions. This matter is implemented for precaution measures to restrict duplicate of files. I cannot suggest a possible approach to workaround. It would break the logic when two files with the same name are added. This alert is intended to inform the user that such file already exist and in the scope of the FileExplorer control renaming an existing file without changing the name is the same as adding a file with an already existing name.


    Regards,

    Ianko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Roman
    Roman avatar
    7 posts
    Member since:
    Oct 2010

    Posted 25 Apr 2014 in reply to Ianko Link to this post

    Hi Ianko,

    Thanks for the answers!

    1. Please try the same procedure with the document manager. I know, it's working with the image manager without any problems.

    2. Thanks for the link. Although I didn't found any code regarding the keyDownHandler method. Nevertheless I think, this point become obsolete when we can fix point #1.

    3. Maybe you got me wrong. Why not just abort the renaming process when new filename is the same like the old one? Just like a simple: if (newFilename == oldFilename) doCancel();
    Easy as that, not?

    Best regards

    Roman Haussener
    Blowfish AG
  5. Answer
    Ianko
    Admin
    Ianko avatar
    1535 posts

    Posted 29 Apr 2014 Link to this post

    Hi Roman,

    You are correct using the Document Manager, ESC key closes the whole dialog. This is due to the same matter described in point 2.

    As suggested using a Customized Dialog you should get the LinkManager.aspx file where the suggested code can be found and modified. Following the steps provided in the online demo should guide you on how to customize the dialog.

    If you have any difficulties, please provide exact details on what exactly is troubling you on following the provided steps in the Customize Built-in Dialogs approach.


    About the third point. Using a logic to detect if the file is exactly the same as an already existing one would be a performance issue for the FileExplorer. Using programmatic approaches to compare files as binary data is a heavy operation and this would include passing through all files. Note that the rename dialog is a simple RadPrompt box, which receives query parameters for the current name and the selected element. Confirming or Canceling are implemented with plain JavaScript for the further logic, where comparing of files is not available. Doing the suggested logic is needed to be done on the server with Server-side approaches. 

    As already mentioned, such matters are designed to be optimized and fast, and correct upon user experience. The suggested behavior is not possible due to the above matters.

    Regards,
    Ianko
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Roman
    Roman avatar
    7 posts
    Member since:
    Oct 2010

    Posted 29 Apr 2014 in reply to Ianko Link to this post

    Hi Ianko,

    Thanks! I could finally fix this issue and removed the _keyDownHandler in LinkManager.aspx. I didn't found out the culprit there before. ;-)

    Also thanks for pointing out #3. I can live with this ineloquent behaviour...

    Best regards

    Roman Haussener
    Blowfish AG
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017