Hi,
I am trying to follow some of the code for adding a zimlet button to generate a new email and set the subject field. So far I haveI refresh ZWC but I do not see the button appear, and if I click on new message then nothing happens. Thoughts on what I have done wrong please ?Code:com_uxbod_sendfax = function() { }; com_uxbod_sendfax.prototype = new ZmZimletBase; com_uxbod_sendfax.prototype.constructor = com_uxbod_sendfax; com_uxbod_sendfax.prototype.initializeToolbar = function(app, toolbar, controller, viewId) { if (viewId.indexOf("COMPOSE") >= 0) { var buttonIndex = -1; for (var i = 0; i < toolbar.opList.length; i++) { if (toolbar.opList[i] == ZmOperation.VIEW_MENU) { buttonIndex = i + 1; break; } } var buttonArgs = { text : "Send Fax", tooltip : "Uxbod Send Fax Facility", index : buttonIndex, image : "zimbraicon" }; var button = toolbar.createOp("UXBOD_ZIMLET_SENDFAX_BUTTON", buttonArgs); button.addSelectionListener(new AjxListener(this, this._showSelectedMail, controller)); } }; com_uxbod_sendfax.prototype._showSelectedMail = function(controller) { var message = controller.getMsg(); appCtxt.getAppController().setStatusMsg("Subject:"+ message.subject); };


LinkBack URL
About LinkBacks


Slight mod and it is now working
