Roundcube Community Forum

 

Context Menu Order

Started by cttechcorp, February 24, 2022, 12:16:03 PM

Previous topic - Next topic

cttechcorp

Does anyone know how to re-order the items in the context menu?   

Since I updated to the latest version the top item is "Collapse" instead of "Mark as Read", and it is causing me serious headache when going through all of my folders and clearing unread messages.

JohnDoh

something like this:

rcmail.addEventListener('menu-open', function(p) {
  if (p.name == 'rcm_folderlist') {
    var item = $('#rcm_folderlist').find('a.cmd_mark-all-read').parent();
    item.parent().prepend(itm);
  }
});
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

cttechcorp

Thanks for the reply John!

Where does this code go?

JohnDoh

make a plugin which loads some javascript and put this in the onload.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...

cttechcorp

Awesome!

Thanks for the code.   That worked perfectly.