diff options
| author | Christophe Simonis <chs@odoo.com> | 2015-12-10 13:05:58 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2015-12-10 13:05:58 +0100 |
| commit | 82a495eed52a9f42e5b88caa52c20a85f8d81ce3 (patch) | |
| tree | 6c5e8cc0247d5fe08d24e9abae38fe353fbebc56 /addons/mail/static/src/js/chat_window.js | |
| parent | 0bc2ddae784bf80c4c809d8b7f6d642d576f92a1 (diff) | |
| parent | 4022493c0b85f966e499b6c03ac7cce5556f15e6 (diff) | |
[MERGE] forward port of branch saas-7 up to 4022493
Diffstat (limited to 'addons/mail/static/src/js/chat_window.js')
| -rw-r--r-- | addons/mail/static/src/js/chat_window.js | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/addons/mail/static/src/js/chat_window.js b/addons/mail/static/src/js/chat_window.js index 3936ef956e1..e9fcaa9fe09 100644 --- a/addons/mail/static/src/js/chat_window.js +++ b/addons/mail/static/src/js/chat_window.js @@ -37,9 +37,9 @@ return Widget.extend({ display_needactions: false, display_stars: this.options.display_stars, }); - this.thread.on('toggle_star_status', this, function (message_id) { - this.trigger('toggle_star_status', message_id); - }); + this.thread.on('toggle_star_status', null, this.trigger.bind(this, 'toggle_star_status')); + this.thread.on('redirect_to_channel', null, this.trigger.bind(this, 'redirect_to_channel')); + this.thread.on('redirect', null, this.trigger.bind(this, 'redirect')); this.fold(); var def = this.thread.appendTo(this.$content); @@ -67,8 +67,8 @@ return Widget.extend({ height: this.folded ? "28px" : "333px" }); }, - toggle_fold: function () { - this.folded = !this.folded; + toggle_fold: function (fold) { + this.folded = _.isBoolean(fold) ? fold : !this.folded; if (!this.folded) { this.unread_msgs = 0; this.trigger('messages_read'); @@ -82,10 +82,9 @@ return Widget.extend({ content: this.$input.val(), attachment_ids: [], partner_ids: [], - channel_id: this.channel_id, }; this.$input.val(''); - this.trigger('post_message', message); + this.trigger('post_message', message, this.channel_id); } }, on_click_close: function (event) { |
