Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Developers

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-14-2006, 04:40 PM
Intermediate Member
 
Posts: 22
Default 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?
Reply With Quote
  #2 (permalink)  
Old 08-15-2006, 10:06 PM
Zimbra Employee
 
Posts: 4,792
Default

Which version of the code are you looking at? I'm looking at 4.0 and I think the method you want is called: ZmMailMsgView.prototype._setAttachmentLinks
__________________
Bugzilla - Wiki - Downloads - Offline Client
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.