Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: cttechcorp on February 24, 2022, 12:16:03 PM

Title: Context Menu Order
Post by: cttechcorp 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.
Title: Re: Context Menu Order
Post by: JohnDoh on February 25, 2022, 03:37:23 AM
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);
  }
});
Title: Re: Context Menu Order
Post by: cttechcorp on February 25, 2022, 10:01:15 AM
Thanks for the reply John!

Where does this code go?
Title: Re: Context Menu Order
Post by: JohnDoh on February 26, 2022, 03:02:39 AM
make a plugin which loads some javascript and put this in the onload.
Title: Re: Context Menu Order
Post by: cttechcorp on March 01, 2022, 01:10:07 PM
Awesome!

Thanks for the code.   That worked perfectly.