diff options
| author | Martin Trigaux <mat@odoo.com> | 2019-07-24 07:36:59 +0000 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2019-07-24 10:32:23 +0000 |
| commit | a98427834e00380e2e63e08668f5c2b069e3c2ea (patch) | |
| tree | fbefd4a26124efbaf5e6b4bdbf58ec570014c896 /addons/mail/static/src/js/thread_windows/thread_window.js | |
| parent | 4e6ee3ac97041653ff15a77abd77084dc0c9f525 (diff) | |
| parent | 860ab5a1c28ba85d7a193d68cfbbb1063bbf0651 (diff) | |
[MERGE] Forward port of saas-12.2 to saas-12.3 up to 860ab5a1c28ba
closes odoo/odoo#35119
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
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.js | 18 |
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 * |
