Former algorithm to display chat windows was pretty basic: each window was positionned 5 pixels to the left of the previous one, starting from the bottom right corner of the screen. Thus, when there were too many chat windows to fit in the screen, they overflowed to the left. This rev. handles this case by hidding overflowing chat windows and making them available in a dropdown positionned 5 pixels to the left of the last visible chat window.
54 lines
2.0 KiB
XML
54 lines
2.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<templates xml:space="preserve">
|
|
|
|
<t t-name="mail.ChatWindow">
|
|
<div class="o_chat_window">
|
|
<div class="o_chat_header">
|
|
<t t-call="mail.ChatWindowHeaderContent">
|
|
<t t-set="title" t-value="widget.title"/>
|
|
<t t-set="unread_counter" t-value="widget.unread_msgs"/>
|
|
</t>
|
|
</div>
|
|
<div class="o_chat_content">
|
|
</div>
|
|
<div class="o_chat_input">
|
|
<input t-att-placeholder="widget.placeholder"/>
|
|
</div>
|
|
</div>
|
|
</t>
|
|
|
|
<t t-name="mail.ChatWindowsDropdown">
|
|
<div t-attf-class="o_chat_window o_chat_window_dropdown dropup #{open ? 'open' : ''}">
|
|
<span class="o_chat_window_dropdown_toggler dropdown-toggle" data-toggle="dropdown">
|
|
<i class="fa fa-comments-o"/> <t t-esc="sessions.length"/>
|
|
<span class="o_total_unread_counter">
|
|
<t t-if="unread_counter"><t t-esc="unread_counter"/></t>
|
|
</span>
|
|
</span>
|
|
<ul class="dropdown-menu">
|
|
<t t-foreach="sessions" t-as="session">
|
|
<li class="o_chat_header" t-att-data-session-id="session.id">
|
|
<t t-call="mail.ChatWindowHeaderContent">
|
|
<t t-set="title" t-value="session.name"/>
|
|
<t t-set="unread_counter" t-value="session.window.unread_msgs"/>
|
|
</t>
|
|
</li>
|
|
</t>
|
|
</ul>
|
|
</div>
|
|
</t>
|
|
|
|
<t t-name="mail.ChatWindowHeaderContent">
|
|
<span class="o_chat_title">
|
|
<t t-esc="title"/>
|
|
<span class="o_unread_counter">
|
|
<t t-if="unread_counter">(<t t-esc="unread_counter"/>)</t>
|
|
</span>
|
|
</span>
|
|
<span>
|
|
<a href="#" class="o_chat_window_close fa fa-close"/>
|
|
</span>
|
|
</t>
|
|
|
|
</templates>
|