summaryrefslogtreecommitdiff
path: root/addons/mail/static/src
diff options
context:
space:
mode:
Diffstat (limited to 'addons/mail/static/src')
-rw-r--r--addons/mail/static/src/js/systray.js9
-rw-r--r--addons/mail/static/src/xml/discuss.xml2
2 files changed, 10 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/systray.js b/addons/mail/static/src/js/systray.js
index 18e9511cf25..f354d2ec6f7 100644
--- a/addons/mail/static/src/js/systray.js
+++ b/addons/mail/static/src/js/systray.js
@@ -207,6 +207,15 @@ var MessagingMenu = Widget.extend({
var model = $(ev.currentTarget).data('model');
var domain = [['model', '=', model], ['res_id', '=', resID]];
this.call('chat_manager', 'markAllAsRead', channel, domain);
+ } else if (channelID === 'mail_failure') {
+ var unread_counter = $(ev.currentTarget).data('unread_counter');
+ var model = $(ev.currentTarget).data('model');
+ this.do_action('mail.mail_resend_cancel_action', {
+ additional_context: {
+ default_model: model,
+ unread_counter: unread_counter
+ }
+ });
} else {
this.call('chat_manager', 'markChannelAsSeen', channel);
}
diff --git a/addons/mail/static/src/xml/discuss.xml b/addons/mail/static/src/xml/discuss.xml
index 1eda1dfec1b..f1fef247c7c 100644
--- a/addons/mail/static/src/xml/discuss.xml
+++ b/addons/mail/static/src/xml/discuss.xml
@@ -237,7 +237,7 @@
</t>
<t t-raw="channel.last_message_preview"/>
</div>
- <span t-att-data-channel_id="channel.id" t-att-data-res_id="channel.res_id" t-att-data-model="channel.model" title="Mark as Read" class="o_discuss_icon o_mail_channel_mark_read fa fa-check" t-if="channel.unread_counter"/>
+ <span t-att-data-channel_id="channel.id" t-att-data-res_id="channel.res_id" t-att-data-model="channel.model" t-att-data-unread_counter="channel.unread_counter" title="Mark as Read" class="o_discuss_icon o_mail_channel_mark_read fa fa-check" t-if="channel.unread_counter"/>
</div>
</div>
</t>