Charles McNulty wrote:
Mark Edwards wrote:
Is there the possibility of adding contextual menu functions to Roundcube (i.e. right-click or control-click dropping down a menu of lesser-used functions)? That's where such things are located in the Apple Mail and Thunderbird, and I think that works pretty well to keep them safely out of the way.
Yes! If no one starts this before I do, this is very much on the list of things I'd like to add to RC. As far as being able to clear out an entire folder? Rarely needed and potentially dangerous. Very very low on the list of things to do.
Right, context menus would solve all our GUI problems. Implementing new functions is mostly not very complicated but adding them to the GUI is the big challenge. Since space is limited, we cannot add a button for every function. I have something in mind how context menus could be implemented:
Within the template, menus can be defined with <roundcube:menu command="xxx" group="yyy" label="zzz" /> which would then add the HTML code to the body and register the menu to the client script: rcmail.register_menu('xxx', 'id-of-element')
This allows the client script to enable/disable menu items like this is done with buttons.
I'm not sure about the "group" attribute. Either these are fixed values known by the script which will then add the mouse handlers to open the according menu when the user right-clicks on a specific area or the contextmenu can be registered to the component using <roundcube:object ... contextmenu="yyy" />
To define cascaded menus, a menu item could hold the command "openmenu" which will then show the menu specified with the "prop" attribute.
Let me give you an example of my idea:
<!-- define menus -->
<roundcube:menu command="expunge" label="compact" group="mboxmenu"/> <roundcube:menu command="purge" label="empty" group="mboxmenu"/> <roundcube:menu command="openmenu" prop="markmenu" label="markall" group="mboxmenu"/> <roundcube:menu command="markread" label="read" group="markmenu"/> <roundcube:menu command="markunread" label="unread" group="markmenu"/> <roundcube:menu command="renamefolder" label="rename" group="mboxmenu"/>
<!-- attach menu to a mailboxlist component -->
<roundcube:object name="mailboxlist" contextmenu="mboxmenu"/>
With this architecture RC keeps the flexibility to define all GUI menus within the skin templates in the same way other components are defined and styled here.
Please let me know what you think about this concept...
Regards, Thomas