From 2522af3dca369bf55b88f481af53a18c9aa70a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 14 May 2012 14:32:31 +0200 Subject: [PATCH] [IMP] Thread widget: action menu appears only in Wall. bzr revid: tde@openerp.com-20120514123231-45rqs796tej9p60i --- addons/mail/static/src/js/mail.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index 1f7c2f69d1a..a8dae21381b 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -70,18 +70,23 @@ openerp.mail = function(session) { start: function() { this._super.apply(this, arguments); - // customize display - if (this.display.show_post_comment) { this.$element.find('div.oe_mail_thread_act').show(); } - if (this.display.show_reply_by_email) { this.$element.find('a.oe_mail_compose').show(); } // add events this.add_events(); /* display user, fetch comments */ this.display_current_user(); if (this.params.records) var display_done = this.display_comments_from_parameters(this.params.records); else var display_done = this.init_comments(); + // customize display + $.when(display_done).then(this.proxy('do_customize_display')); return display_done }, + do_customize_display: function() { + if (this.display.show_post_comment) { this.$element.find('div.oe_mail_thread_act').show(); } + if (this.display.show_reply_by_email) { this.$element.find('a.oe_mail_compose').show(); } + if (! this.display.show_msg_menu) { this.$element.find('img.oe_mail_msg_menu_icon').hide(); } + }, + add_events: function() { var self = this; // event: click on 'more' at bottom of thread