Page 1 of 1

Create email tab with button in another zimlet

Posted: Wed Sep 02, 2020 7:31 pm
by André
Hello, I have a zimlet with some functions, I want to create a button inside that zimlet that opens a tab with a new email, just like when we click on a new email. I already tried it that way: http://mail.domain.com?username=user@ex ... ompose&to=%1 "but it opens a tab in my browser, and i want a new tab inside zimbra.

thanks

Re: Create email tab with button in another zimlet

Posted: Thu Sep 03, 2020 7:22 am
by barrydegraaff
If you want the same functionality, as if the user clicked the New Mail button, then the easiest (hack) is to find the New Button ID in the UI using javascript and then call the click() method.

An example of a Zimlet that clicks the Save button when creating a new Appointment can be found here:
https://github.com/Zimbra-Community/HPO ... ng.js#L451

It is similar for what you want, just a different view/button.

Re: Create email tab with button in another zimlet

Posted: Thu Sep 03, 2020 4:33 pm
by André
barrydegraaff wrote:If you want the same functionality, as if the user clicked the New Mail button, then the easiest (hack) is to find the New Button ID in the UI using javascript and then call the click() method.

An example of a Zimlet that clicks the Save button when creating a new Appointment can be found here:
https://github.com/Zimbra-Community/HPO ... ng.js#L451

It is similar for what you want, just a different view/button.


Thank you for your help