2007/1/10, Robin Elfrink elfrink@introweb.nl:
An attempt to fix feature request #1457344, select parent folder when creating new folder.
To do:
- Make JS display new folder at the appropriate position.
- Check with http://trac.roundcube.net/trac.cgi/wiki/Dev_Guidelines
Comments so far, anybody?
I haven't applied your patch but just quickly looked at your code. We already have a function that creates a dropdown with all folders: rcmail_mailbox_list() which is located in program/steps/mail/func.inc
To use it in the settings part we have to move it to include/main.inc. Don't forget to move the related functions rcmail_build_folder_tree(), rcmail_render_folder_tree_html() and rcmail_render_folder_tree_select() as well.
I recommend to use this function because it already does things like charset conversion from UTF-7 (IMAP) to UTF-8, set localized names to default folders, etc.
To make it perfect, I suggest to allow the rcmail_mailbox_list() to take an exclusion list of folders that should not be included in the output. Since there's a config parameter 'protect_default_folders' RoundCube should not allow to create subfolders in those default folders.
Regards, Thomas