Thank you for the replies. I have looked at the Launch action on mail sent tread , and tried to combine that code with mine , but it only made my button disapear, so im guessing im doing it wrong.
Here is my current code :
Quote:
com_zimbra_test_HandlerObject = function() {
};
com_zimbra_test_HandlerObject.prototype = new ZmZimletBase;
com_zimbra_test_HandlerObject.prototype.constructo r = com_zimbra_test_HandlerObject;
com_zimbra_test_HandlerObject.prototype.initialize Toolbar =
function(app, toolbar, controller, viewId) {
if (viewId.indexOf(ZmId.VIEW_COMPOSE) ==0) {
// get the index of "View" menu so we can display the button after that
var buttonIndex = 0;
for (var i = 0; i < toolbar.opList.length; i++) {
if (toolbar.opList[i] == ZmOperation.VIEW_MENU) {
buttonIndex = i + 1;
break;
}
}
var buttonParams = {
text : "Send to Archive",
tooltip: "This button sends a email with cc to a fixed address ",
index: buttonIndex, // position of the button
image: "zimbraicon" // icon
};
// creates the button with an id and params containing the button details
var button = toolbar.createOp("Send to Archive", buttonParams);
button.addSelectionListener(new AjxListener(this, this._showSelectedMail, controller));
}
};
// * Add cc and send mail.
com_zimbra_test_HandlerObject.prototype._showSelec tedMail =
function(controller) {
};
|
That is my code so far. Its pretty much something i have taken from some examples. Wich gets the job of adding the button done.
I`m missing som code under the "Add cc and send email" part. kinda stuck on what to put in there so that the button will be able to send mail with a fixed cc address. Would be nice with some advice. As my javascript & zimbra knowledge is limited. But rising fast
