Create email tab with button in another zimlet

Have a great idea for extending Zimbra? Share ideas, ask questions, contribute, and get feedback.
André
Posts: 3
Joined: Tue Sep 01, 2020 2:54 am

Create email tab with button in another zimlet

Postby André » Wed Sep 02, 2020 7:31 pm

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


User avatar
barrydegraaff
Zimbra Employee
Zimbra Employee
Posts: 95
Joined: Tue Jun 17, 2014 3:31 am
Contact:

Re: Create email tab with button in another zimlet

Postby barrydegraaff » Thu Sep 03, 2020 7:22 am

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.
--
Barry de Graaff
Admin of Zimbra-Community Github: https://github.com/orgs/Zimbra-Community/
Developer of Zimbra OpenPGP Zimlet, Zimbra ownCloud Zimlet and more.
A Zetalliance Founder http://www.zetalliance.org/
André
Posts: 3
Joined: Tue Sep 01, 2020 2:54 am

Re: Create email tab with button in another zimlet

Postby André » Thu Sep 03, 2020 4:33 pm

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

Return to “Developers”

Who is online

Users browsing this forum: No registered users and 2 guests