summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/xml/client_action.xml
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2015-12-29 10:13:55 +0100
committerGéry Debongnie <ged@odoo.com>2015-12-29 14:47:40 +0100
commitcc8c355ecb2ac3daa4ef7ea76707e84828185d85 (patch)
treee19f409e1d3d67d5feaedb1d8d643f73d2273db1 /addons/mail/static/src/xml/client_action.xml
parent04fce958757b2907f97d6360cb3aa32cdb9fd23d (diff)
[IMP] mail, bus: display native notifications if user away
This commit introduces native notifications (if available) to the discuss application. Those notifications will only appear if the user grants the permission for that. A notification bar will appear in the discuss application if necessary to prompt the user. Also, it always is the master bus that will be the one sending the notification. For this change, it was necessary to be able to detect if the user has the focus on some other odoo tabs. For this reason, the bus was extended.
Diffstat (limited to 'addons/mail/static/src/xml/client_action.xml')
-rw-r--r--addons/mail/static/src/xml/client_action.xml6
1 files changed, 6 insertions, 0 deletions
diff --git a/addons/mail/static/src/xml/client_action.xml b/addons/mail/static/src/xml/client_action.xml
index 0c254e7cf7f..f2b22d5587a 100644
--- a/addons/mail/static/src/xml/client_action.xml
+++ b/addons/mail/static/src/xml/client_action.xml
@@ -4,6 +4,12 @@
<!-- Client Action -->
<t t-name="mail.client_action">
<div class="o_mail_chat">
+ <t t-if="widget.notification_bar">
+ <div class="o_mail_annoying_notification_bar">
+ <span class="o_mail_request_permission">Odoo needs your permission to <a href="#"> enable desktop notifications</a>.</span>
+ <span class="fa fa-close"></span>
+ </div>
+ </t>
<div class="o_mail_chat_sidebar"/>
<div class="o_mail_chat_content"/>
</div>