This is a migrated thread and some comments may be shown as answers.

Unwanted closings of Document Manager

4 Answers 84 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Roman
Top achievements
Rank 1
Roman asked on 22 Apr 2014, 05:28 PM
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

4 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 25 Apr 2014, 07:16 AM

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.

 
0
Roman
Top achievements
Rank 1
answered on 25 Apr 2014, 01:38 PM
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
0
Accepted
Ianko
Telerik team
answered on 29 Apr 2014, 12:48 PM
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.

 
0
Roman
Top achievements
Rank 1
answered on 29 Apr 2014, 01:41 PM
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
Tags
Editor
Asked by
Roman
Top achievements
Rank 1
Answers by
Ianko
Telerik team
Roman
Top achievements
Rank 1
Share this question
or