Quote:
Originally Posted by MyMoon I am experiencing problems with adding buttons to the Compose toolbar. I have read other threads but nothing seems to work. So far i have done that:
- ZmMailApp: create an operation for it via ZmOperation.registerOp
- ZmComposeController: add it to the toolbar (_initializeToolBar)
- ZmComposeController: add a listener for it (constructor)
- ZmComposeController: write the listener, have it do what you want
When i add my buttons in the upper files, make these changes to ZimbraMail_all. js.zgz the mail crashes with a "ZmZimbraMail is not defined" error.
My questions are:
1. Does zimbra work only with ZimbraMail_all. js.zgz?
2. Is there any way i can change the content of the files in /webapps/zimbra/h directory so that they take effect? (Is compiling needed for these files?)
3. In the ZmMailApp. js the existing operation for the Compose toolbar is already defined. Should i define a new one or i can use the existing one. |
Not to be a horrible tease, but I just finished up a code example for a upcoming O'Reilly book. It has this, and a lot more details.
1. ZimbraMail_all.
js.zgz is the default compressed representation. For whatever reason b1-b3 do not update zimlet code correctly when you do a deploy. Slap a &dev=1 at the end of the URL to load the newest code.
2. You should be using a zimlet for this, instead of modifying the core code. You should also not be using anything with underscore in the name, because that means private. I have found that the easiest way to handle buttons is to listen for Toolbarinitilized, and then checked to see if it was a instance of the view I wanted.
Hope this helps!