roundcube / roundcubemail

The Roundcube Webmail suite
https://roundcube.net
GNU General Public License v3.0
5.89k stars 1.64k forks source link

Elastic: Add to addressbook option from "more" popup dialog #7799

Open thomascube opened 3 years ago

thomascube commented 3 years ago

when having an email open to read, the recipients are visible in the "details" of the email. there, one can add an email adress per mouse click in the context menu to the address book.

so far so good.

when the list of recipients is longer than displayed in the preview header, they are summed under the hyperlink "more" ("weitere" in german). After mouseclick on "more", all other recipients are also displayed, in a new popup window.

However, the option of adding someone to the address book doesn't work here anymore, because a mouseclick on the address leads directly to a new window to write an email to that very same address.

alecpl commented 3 years ago

For this dialog we pass the dialog HTML content as argument. We could bind to dialog-open event to apply the mailto: link menu handler.

However, I don't like how we pass the dialog content. So, I propose to:

  1. put the content in some hidden element on the page. The clone it when using simple_dialog().
  2. when invoked from the "summary" header the dialog does not have a title we should fix that.

This should solve the issue "automatically". Also, in Elastic currently the content of the dialog is added to the page twice (for "summary" and "details" header version). So, this should also de-duplicate that content.

alecpl commented 3 years ago

Looking closer this is not that easy, because the dialog is displayed in the parent window context where we do not have the menu element nor env parameters that are set inside the preview frame.