Hello everybody,
I have wanted to add a small feature to roundcube. When I drag and drop messages, I wanted to automatically expand folders when possible.
* First, I have read the developments guidelines, and
saw this: Indentation consists of _4 spaces_ per level and no tabs! * Second, I have opened apps.js to add the functionality, and saw a lot of tabs. I have replaced them with spaces, so, you are not obliged to accept my patch...
Anyway, in this patch, I restart the drag & drop process just after expanding a collapsed folder when possible. However, to avoid any interference with current existing code, I have copied the drag_start function to a drag_restart function. I am not familiar with this JavaScript code, so, feel free to remove everything not needed into the function drag_restart.
I'm sure we can also use a timeout, but I try to keep things as simple as possible for the moment.
The next step, if possible, is to scroll the folders list when reaching the bottom or the top of the folders list, when dragging messages. I think it will be useful for all people who have an interminable folder's list like me...
ATB.
--- 8< --- detachments --- 8< --- The following attachments have been detached and are available for viewing. http://detached.gigo.com/rc/9G/bPX8oCbj/apps.js.patch Only click these links if you trust the sender, as well as this message. --- 8< --- detachments --- 8< ---
List info: http://lists.roundcube.net/dev/