override display of attachments? I would like to override the default way that attachments are rendered. The code appears to be in ZmMailMsgView.prototype._getAttachmentHtml. I think I have to work on the ZmMailMsgView instance, though, not the prototype, right? I know how to get to the ZmMailMsgView instance, so I tried this but it didn't appear to do anything:
var msgView = ...; // get the instance here
msgView._oldGetAttachmentHtml = msgView._getAttachmentHtml;
msgView._getAttachmentHtml = function(msg, htmlArr, idx) {
alert('idx == ' + idx);
return msgView._oldGetAttachmentHtml(msg, htmlArr, idx);
}
I put that code in an init() of a Zimlet but when I view a message that has attachments I don't see the alert I expect. Does anyone have any info on how to do something like this? |