if(this.thread_level < this.options.display_indented_thread) {
this.create_thread();
}
- this.$('.oe_msg_attachments, .oe_msg_images').addClass("oe_hidden");
+ this.display_attachments();
this.ds_notification = new session.web.DataSetSearch(this, 'mail.notification');
this.ds_message = new session.web.DataSetSearch(this, 'mail.message');
this.$('.oe_reply').on('click', this.on_message_reply);
this.$('.oe_star').on('click', this.on_star);
this.$('.oe_msg_vote').on('click', this.on_vote);
- this.$('.oe_view_attachments').on('click', this.on_view_attachments);
-
},
/* Call the on_compose_message on the thread of this message. */
}
},
- /* Call the on_compose_message on the thread of this message. */
- on_view_attachments:function (event) {
- event.stopPropagation();
- var self = this;
- if (!this.toggle_attachment) {
- self.display_attachments();
- this.toggle_attachment = true;
- }
- this.$('.oe_msg_attachment_list').toggle(200);
- },
-
/**
* Wait a confirmation for delete the message on the DB.
* Make an animate destroy
<a t-if="widget.author_id" t-attf-href="#model=res.partner&id=#{widget.author_id[0]}"><t t-raw="widget.author_id[1]"/></a>
<span class='oe_subtle'>•</span>
<span t-att-title="widget.date"><t t-raw="widget.timerelative"/></span>
- <t t-if='widget.attachment_ids.length > 0'>
- <span class='oe_subtle'>•</span>
- <a class="oe_view_attachments">
- <t t-if="widget.attachment_ids.length == 1">1 Attachment</t>
- <t t-if="widget.attachment_ids.length > 1"><t t-raw="widget.attachment_ids.length"/> Attachments</t>
- </a>
- </t>
<span class='oe_subtle'>•</span>
<t t-call="mail.thread.message.vote"/>
</div>