SMS Zimlet needs to be upgraded to work for 6.x. In 6.x we support multiple compose (and compose in tabs). Also in 6.x we have a newer api initializeToolbar that helps to easily add toolbar buttons.
The code below adds button to compose
Code:
com_zimbra_hellotoolbarbtns.prototype.initializeToolbar =
function(app, toolbar, controller, view) {
//for compose view since 6.x supports multiple compose tabs(and has dynamic ids) that look like “123_COMPOSE_DWT123”
if(viewId.indexOf("COMPOSE") >=0){
//get the index of View menu so we can display it after that.
var buttonIndex = -1;
for (var i = 0, count = toolbar.opList.length; i < count; i++) {
if (toolbar.opList[i] == ZmOperation.VIEW_MENU) {
buttonIndex = i + 1;
break;
}
}
//create params obj with button details
var buttonArgs = {
text : "Toolbar Button",
tooltip: "This button shows up in Conversation view, traditional view, and in convlist view",
index: buttonIndex, //position of the button
image: "zimbraicon" //icon
};
//toolbar.createOp api creates the button with some id and params containing button details.
var button = toolbar.createOp("HELLOTEST_ZIMLET_TOOLBAR_BUTTON", buttonArgs);
button.addSelectionListener(new AjxListener(this, this._showSelectedMail, controller));
}
};
com_zimbra_hellotoolbarbtns.prototype._showSelectedMail =
function(controller) {
var message = controller.getMsg();
appCtxt.getAppController().setStatusMsg("Subject:"+ message.subject);
};