[IMP] mail: Add icon in chat windows to expand in discuss
This commit is contained in:
committed by
Yannick Tivisse
parent
b0185e15cc
commit
c9fa92a083
@@ -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),
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user