summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2016-01-15 16:19:03 +0100
committerGéry Debongnie <ged@odoo.com>2016-01-15 16:33:33 +0100
commit59ce9a0ed94cd82679dfae8a0dd69f05dbca1e34 (patch)
tree4ec36e32e8ce1afdc506e3706704cb0b15cd9bdf /addons/mail/static/src/js
parent5a76586edec032c77edd1097edea107bdb2abc14 (diff)
[FIX] mail: composer fixes
- chatter composer did incorrectly send messages when enter is pressed - add a div around the textareas to prevent rendering issues because of flex
Diffstat (limited to 'addons/mail/static/src/js')
-rw-r--r--addons/mail/static/src/js/chatter.js4
-rw-r--r--addons/mail/static/src/js/composer.js4
2 files changed, 6 insertions, 2 deletions
diff --git a/addons/mail/static/src/js/chatter.js b/addons/mail/static/src/js/chatter.js
index 15e51c253e2..46d5fcab8fd 100644
--- a/addons/mail/static/src/js/chatter.js
+++ b/addons/mail/static/src/js/chatter.js
@@ -467,6 +467,10 @@ var ChatterComposer = composer.BasicComposer.extend({
return $.when(this._super.apply(this, arguments), this.message_get_suggested_recipients());
},
+ should_send: function () {
+ return false;
+ },
+
preprocess_message: function () {
var self = this;
var def = $.Deferred();
diff --git a/addons/mail/static/src/js/composer.js b/addons/mail/static/src/js/composer.js
index be30588a642..dae8cdc4241 100644
--- a/addons/mail/static/src/js/composer.js
+++ b/addons/mail/static/src/js/composer.js
@@ -315,7 +315,7 @@ var BasicComposer = Widget.extend({
template: "mail.ChatComposer",
events: {
- "keydown .o_composer_input": "on_keydown",
+ "keydown .o_composer_input textarea": "on_keydown",
"keyup .o_composer_input": "on_keyup",
"change input.o_form_input_file": "on_attachment_change",
"click .o_composer_button_send": "send_message",
@@ -367,7 +367,7 @@ var BasicComposer = Widget.extend({
this.$attachment_button = this.$(".o_composer_button_add_attachment");
this.$attachments_list = this.$('.o_composer_attachments_list');
- this.$input = this.$('.o_composer_input');
+ this.$input = this.$('.o_composer_input textarea');
this.$input.focus(function () {
self.trigger('input_focused');
});