Author Topic: Context Menu Order  (Read 1338 times)

Offline cttechcorp

  • Newbie
  • *
  • Posts: 3
Context Menu Order
« on: February 24, 2022, 12:16:03 PM »
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.

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,856
Re: Context Menu Order
« Reply #1 on: February 25, 2022, 03:37:23 AM »
something like this:
Code: [Select]
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…

Offline cttechcorp

  • Newbie
  • *
  • Posts: 3
Re: Context Menu Order
« Reply #2 on: February 25, 2022, 10:01:15 AM »
Thanks for the reply John!

Where does this code go?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,856
Re: Context Menu Order
« Reply #3 on: February 26, 2022, 03:02:39 AM »
make a plugin which loads some javascript and put this in the onload.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline cttechcorp

  • Newbie
  • *
  • Posts: 3
Re: Context Menu Order
« Reply #4 on: March 01, 2022, 01:10:07 PM »
Awesome!

Thanks for the code.   That worked perfectly.