Create email tab with button in another zimlet

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

Create email tab with button in another zimlet

Post 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 ... pose&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: 242
Joined: Tue Jun 17, 2014 3:31 am
Contact:

Re: Create email tab with button in another zimlet

Post 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.
--
Barry de Graaff
Email: barry.degraaff [at] synacor [dot] com
Admin of Zimbra-Community Github: https://github.com/orgs/Zimbra-Community/ and the
Zimlet Gallery https://gallery.zetalliance.org/extend/
André
Posts: 7
Joined: Tue Sep 01, 2020 2:54 am

Re: Create email tab with button in another zimlet

Post 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
Post Reply