Results 1 to 2 of 2

Thread: How can i add buttons to the compose toolbar?

  1. #1
    Join Date
    Oct 2007
    Posts
    1
    Rep Power
    8

    Default How can i add buttons to the compose toolbar?

    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.

  2. #2
    Join Date
    Nov 2005
    Posts
    477
    Rep Power
    10

    Default

    Quote Originally Posted by MyMoon View Post
    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!

Similar Threads

  1. Zimbra + Samba LDAP, cannot add winxp
    By fajarpri in forum Installation
    Replies: 4
    Last Post: 07-08-2007, 12:45 PM
  2. Replies: 1
    Last Post: 02-20-2007, 01:49 AM
  3. No Vertical Scroll Bar in Mail Filter Compose Window
    By LMStone in forum Administrators
    Replies: 0
    Last Post: 11-03-2006, 08:32 AM
  4. adding button to compose toolbar with a zimlet
    By sdouglass in forum Zimlets
    Replies: 1
    Last Post: 09-18-2006, 07:39 PM
  5. Using Zimlet to add zimbra account
    By dzed in forum Zimlets
    Replies: 2
    Last Post: 05-05-2006, 03:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •