Author Topic: Contextmenu FolderMenu  (Read 4980 times)

Offline noper

  • Newbie
  • *
  • Posts: 1
Contextmenu FolderMenu
« on: February 08, 2011, 04:12:39 AM »
Hello,
I'm using Roundcube for quite a while now.
What I'm missing is a Plugin, like the copycontextmenu, to add/rename folders direkt in the Message view, without the purpose of switching to the Settings.

I was thinking about writing a plugin by my self, but at the moment it seams a little bit hard to get a start, becouse of missing documentation/tutorials of the pluginapi and the contextmenu.
The first problem I have is how to add Items in the Foldermenu from the contexmenu-plugin.

Is there anyone interessted in write a plugin for FolderMenu. Or does anyone know how to add Items to the Foldermenu from the contextmenu (as far as I see it's not a Problem to add Items to the contextmenu of messages, but I don't have a clue how to add Items to the Foldermenu).

Greetings

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,855
Contextmenu FolderMenu
« Reply #1 on: February 08, 2011, 01:55:48 PM »
you should be able to use the rcm_contextmenu_register_command function, the last parameter is optional, you can set it to the object you want to attach your new option to (the main contextmenu by default) or $('rcmFolderMenu') for example....

Code: [Select]
rcm_contextmenu_register_command('copy', 'rcmail_copyto', $('#rcmContextCopy'), null, 'after', true, false, $('#rcmFolderMenu'));
There is a bug in the code though, so if you set a value for pos then it wont work, it will always be added to the main contextmenu. I have a fix for this and I will publish it just as soon as I have finished another change I'm working on.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦