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
Create email tab with button in another zimlet
- barrydegraaff
- Zimbra Employee
- Posts: 103
- Joined: Tue Jun 17, 2014 3:31 am
- Contact:
Re: Create email tab with button in another zimlet
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.
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/
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/
Re: Create email tab with button in another zimlet
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
Who is online
Users browsing this forum: ichiro [Crawler] and 5 guests