From 5018b01dc7e0e5f2c2198367f13ec41b1ed402c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Mon, 10 Feb 2020 12:38:52 +0000 Subject: [IMP] mail, test_mail, hr_holidays: remove obsolete out of office MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The customizable "out of office" text was removed from the editable views as part of task-2053585, but some places in the code were still using it, even though it was never set anymore. This commit removes the obsolete code. Part of task-2171864 closes odoo/odoo#44968 Signed-off-by: Alexandre Kühn (aku) --- .../static/src/js/thread_windows/thread_window.js | 25 ---------------------- 1 file changed, 25 deletions(-) (limited to 'addons/mail/static/src/js/thread_windows/thread_window.js') 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 f7f0c23dd7b..4bd1e6c15ff 100644 --- a/addons/mail/static/src/js/thread_windows/thread_window.js +++ b/addons/mail/static/src/js/thread_windows/thread_window.js @@ -24,7 +24,6 @@ var ThreadWindow = AbstractThreadWindow.extend({ 'click .o_mail_thread': '_onThreadWindowFocus', 'click .o_thread_composer': '_onThreadWindowFocus', 'click .o_thread_window_expand': '_onClickExpand', - 'click .o_out_of_office_read_more_less_button': '_onClickOutOfOfficeReadMoreLess', }), /** * Version of thread window that supports {mail.model.Thread} @@ -92,8 +91,6 @@ var ThreadWindow = AbstractThreadWindow.extend({ self.$input = self.$('.o_composer_text_field'); }); } - this._updateOutOfOfficeReadMoreLessButton(); - return Promise.all([superDef, composerDef]); }, @@ -262,19 +259,6 @@ var ThreadWindow = AbstractThreadWindow.extend({ }) .focus(); }, - /** - * @private - */ - _updateOutOfOfficeReadMoreLessButton: function () { - var $readMore = this.$('.o_out_of_office_text'); - var isOverflowing = $readMore.prop('scrollWidth') > $readMore.width(); - var isOverflowShown = !$readMore.hasClass('o_text_wrap'); - if (isOverflowing || isOverflowShown) { - var $button = this.$('.o_out_of_office_read_more_less_button'); - $button.show(); - $button.text(isOverflowing ? _t('Read more') : _t('Read less')); - } - }, //-------------------------------------------------------------------------- // Handlers @@ -313,15 +297,6 @@ var ThreadWindow = AbstractThreadWindow.extend({ }); } }, 1000, true), - /** - * @private - * @param {MouseEvent} ev - */ - _onClickOutOfOfficeReadMoreLess: function (ev) { - ev.preventDefault(); - this.$('.o_out_of_office_text').toggleClass('o_text_wrap'); - this._updateOutOfOfficeReadMoreLessButton(); - }, /** * @override * @private -- cgit v1.2.3