[IMP] Thread widget: updated actions menu in messages
bzr revid: tde@openerp.com-20120514121530-hrnixf8h95h7ynak
This commit is contained in:
@@ -141,18 +141,6 @@ openerp.mail = function(session) {
|
||||
});
|
||||
return false;
|
||||
});
|
||||
// event: click on 'hide' in wheel_menu
|
||||
this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_msg_hide_thread', 'click', function (event) {
|
||||
if (! confirm(_t("Do you really want to hide this thread ?"))) { return false; }
|
||||
var msg_id = event.srcElement.dataset.id;
|
||||
if (! msg_id) return false;
|
||||
var call_defer = self.ds.call('message_remove_pushed_notifications', [[self.params.res_id], [parseInt(msg_id)], true]);
|
||||
$(event.srcElement).parents('li.oe_mail_thread_msg').eq(0).hide();
|
||||
if (self.params.thread_level > 0) {
|
||||
$(event.srcElement).parents('ul.oe_mail_thread').eq(0).hide();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
// event: click on 'hide this type' in wheel_menu
|
||||
this.$element.find('div.oe_mail_thread_display').delegate('a.oe_mail_msg_hide_type', 'click', function (event) {
|
||||
console.log('hiding type');
|
||||
|
||||
@@ -63,9 +63,13 @@
|
||||
<div t-attf-class="oe_mail_msg_#{record.type}">
|
||||
<img class="oe_mail_msg_menu_icon" src="/mail/static/src/img/wheel_menu.png" alt="menu"/>
|
||||
<ul class="oe_mail_msg_menu">
|
||||
<li><a href="#" class="oe_mail_msg_hide_thread" t-attf-data-id='{record.id}'>Hide this thread</a></li>
|
||||
<li><a href="#" class="oe_mail_msg_hide_type" t-attf-data-subtype='{record.subtype}'>Hide this type: <t t-esc="record.subtype"/>
|
||||
</a></li>
|
||||
<t t-if="display['show_delete']"><t t-if="thread._is_author(record.user_id[0])">
|
||||
<li><a href="#" class="oe_mail_oe_intlink oe_mail_msg_delete" t-attf-data-id='{record.id}'>Delete</a></li>
|
||||
</t></t>
|
||||
<t t-if="display['show_hide']">
|
||||
<li><a href="#" class="oe_mail_oe_intlink oe_mail_msg_hide" t-attf-data-id='{record.id}'>Remove from Wall</a></li>
|
||||
<li><a href="#" class="oe_mail_oe_intlink oe_mail_msg_hide_type" t-attf-data-subtype='{record.subtype}'>Hide this type: <t t-esc="record.subtype"/></a></li>
|
||||
</t>
|
||||
</ul>
|
||||
<img class="oe_mail_msg_image oe_mail_oe_left" t-att-src="record.mini_url"/>
|
||||
<div class="oe_mail_msg_content">
|
||||
|
||||
Reference in New Issue
Block a user