diff options
| author | Nicolas Lempereur <nle@odoo.com> | 2018-11-07 13:26:56 +0000 |
|---|---|---|
| committer | Nicolas Lempereur <nle@odoo.com> | 2018-11-09 08:10:24 +0000 |
| commit | 9799dd294dfb201f2f256151120d38580e34e0ec (patch) | |
| tree | e394d6199643db69147a16551b7c1589da6f7455 /addons/mail/static/src/js/composers | |
| parent | 7754416cd8a6484dd7d449f302909d7ef70ffe0f (diff) | |
[FIX] mail: enable composer after message sent
c5dc0b2f39 disabled send button on composer sent.
But this is only needed for chatter composer, other composers directly
send the message and are not refreshed asynchronously.
So for other composer, the send button worked one time but then was
disabled and the only way to sent was ENTER (on basic composer) or
CTRL+ENTER (on extended composer).
With this fix, disabling the button is done only for chatter composer.
Also the behavior of not clearing the message if there was an error is
introduced back.
Without change in code, added test fails with:
"Should keep unsent message in the composer on failure" (result: "")
"Send button should be re-enabled on message post failure" (result: true)
issue found when checking opw-1904029
closes #28475
Diffstat (limited to 'addons/mail/static/src/js/composers')
| -rw-r--r-- | addons/mail/static/src/js/composers/basic_composer.js | 1 | ||||
| -rw-r--r-- | addons/mail/static/src/js/composers/chatter_composer.js | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/addons/mail/static/src/js/composers/basic_composer.js b/addons/mail/static/src/js/composers/basic_composer.js index 0e4d62232e2..a6cdb39e2de 100644 --- a/addons/mail/static/src/js/composers/basic_composer.js +++ b/addons/mail/static/src/js/composers/basic_composer.js @@ -390,7 +390,6 @@ var BasicComposer = Widget.extend({ return; } - this.$(".o_composer_button_send").prop("disabled", true); clearTimeout(this._cannedTimeout); var self = this; this._preprocessMessage().then(function (message) { diff --git a/addons/mail/static/src/js/composers/chatter_composer.js b/addons/mail/static/src/js/composers/chatter_composer.js index d1a990b31e4..cda91eab205 100644 --- a/addons/mail/static/src/js/composers/chatter_composer.js +++ b/addons/mail/static/src/js/composers/chatter_composer.js @@ -45,7 +45,7 @@ var ChatterComposer = BasicComposer.extend({ * * @override */ - clearComposerOnSend: function () {}, + _clearComposerOnSend: function () {}, //-------------------------------------------------------------------------- // Private |
