diff options
| author | Rohan Patel <rop@odoo.com> | 2016-10-25 18:43:53 +0530 |
|---|---|---|
| committer | Yannick Tivisse <yti@odoo.com> | 2016-12-22 14:40:22 +0100 |
| commit | c9fa92a08383c7adbabc07dced5cbb4abbd42e28 (patch) | |
| tree | 8a379ad2f035dd113ed5f3ce333307f6346fac79 /addons/mail/static/src/js | |
| parent | b0185e15ccde6cf9d4cb82a230cd4180db89e3b2 (diff) | |
[IMP] mail: Add icon in chat windows to expand in discuss
Diffstat (limited to 'addons/mail/static/src/js')
| -rw-r--r-- | addons/mail/static/src/js/extended_chat_window.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/extended_chat_window.js b/addons/mail/static/src/js/extended_chat_window.js index 02fe2b5f907..b4ec3fa9282 100644 --- a/addons/mail/static/src/js/extended_chat_window.js +++ b/addons/mail/static/src/js/extended_chat_window.js @@ -1,13 +1,17 @@ odoo.define('mail.ExtendedChatWindow', function (require) { "use strict"; +var core = require('web.core'); + var chat_manager = require('mail.chat_manager'); var ChatWindow = require('mail.ChatWindow'); var composer = require('mail.composer'); return ChatWindow.extend({ template: "mail.ExtendedChatWindow", - + events: _.extend({}, ChatWindow.prototype.events, { + "click .o_chat_window_expand": "on_click_expand", + }), start: function () { var self = this; var def; @@ -44,6 +48,13 @@ return ChatWindow.extend({ on_keydown: function (event) { event.stopPropagation(); }, + on_click_expand: _.debounce(function () { + event.preventDefault(); + var options = {clear_breadcrumbs: true, active_id: this.channel_id}; + this.do_action('mail.mail_channel_action_client_chat', options).then(function () { + core.bus.trigger('change_menu_section', chat_manager.get_discuss_menu_id()); + }); + }, 1000, true), }); }); |
