Skip to content
Snippets Groups Projects
Commit c9fa92a0 authored by Rohan Patel's avatar Rohan Patel Committed by Yannick Tivisse
Browse files

[IMP] mail: Add icon in chat windows to expand in discuss

parent b0185e15
No related branches found
No related tags found
No related merge requests found
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),
});
});
......@@ -47,7 +47,7 @@
.o-text-overflow();
}
.o_chat_window_close {
.o_chat_window_close, .o_chat_window_expand {
color: white;
padding: 3px;
margin-left: 5px;
......
......@@ -10,4 +10,11 @@
</t>
</t>
<t t-extend="mail.ChatWindowHeaderContent">
<t t-jquery=".o_chat_window_close" t-operation="before">
<a href="#" class="o_chat_window_expand fa fa-expand" title="
Open in Discuss"/>
</t>
</t>
</templates>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment