summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/thread_windows/thread_window.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-07-26 15:12:29 +0200
committerChristophe Simonis <chs@odoo.com>2019-07-26 15:12:29 +0200
commitbfd34e14b1be97465e135d85c76b9e626a219e7a (patch)
tree8de54ec8f504158e965ab92e21658cab539024ee /addons/mail/static/src/js/thread_windows/thread_window.js
parent26b5b446b3dab3d66b7db054ca77e7b1a811c28a (diff)
parent40e8b67179f212551a176d72b3851671febc1fba (diff)
[MERGE] forward port branch saas-12.3 up to 40e8b67179f
Diffstat (limited to 'addons/mail/static/src/js/thread_windows/thread_window.js')
-rw-r--r--addons/mail/static/src/js/thread_windows/thread_window.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/addons/mail/static/src/js/thread_windows/thread_window.js b/addons/mail/static/src/js/thread_windows/thread_window.js
index 9999014a08d..16d5cd31c86 100644
--- a/addons/mail/static/src/js/thread_windows/thread_window.js
+++ b/addons/mail/static/src/js/thread_windows/thread_window.js
@@ -6,6 +6,7 @@ var BasicComposer = require('mail.composer.Basic');
var core = require('web.core');
+var QWeb = core.qweb;
var _t = core._t;
/**
@@ -153,6 +154,23 @@ var ThreadWindow = AbstractThreadWindow.extend({
removePassive: function () {
this._passive = false;
},
+ renderOutOfOffice: function () {
+ var $outOfOffice = this.$('.o_out_of_office');
+ if (!this.getOutOfOfficeInfo() && !this.getOutOfOfficeMessage()) {
+ if ($outOfOffice.length) {
+ $outOfOffice.remove();
+ }
+ return;
+ }
+ var $newOutOfOffice = $(QWeb.render('mail.thread_window.OutOfOffice', {
+ widget: this,
+ }));
+ if ($outOfOffice.length) {
+ $outOfOffice.replaceWith($newOutOfOffice);
+ } else {
+ $newOutOfOffice.insertAfter(this.$('.o_thread_window_header'));
+ }
+ },
/**
* Update this thread window
*