Skip to content
Snippets Groups Projects
Commit 41d24700 authored by qsm-odoo's avatar qsm-odoo
Browse files

[FIX] mail: properly suggest users to chat with

Before this commit, it was not possible to choose the user you want to
chat with in a chat window anymore. This was because the dropdown that
suggest the users appeared under the chat windows since commit
https://github.com/odoo/odoo/commit/7b965a9673a9124e6e045b8a290a156eed402ad5

Indeed, the mentioned commit changed the z-indexes so that chat windows
are still usable when a modal is opened. This was done by making the
chat windows always have the greatest z-index... forgetting this would
make them appear on top of their own autocomplete dropdowns.

This commit restores the feature while keeping the ability to talk while
a modal is opened. See code comments for details.

opw-785162
parent ecbf7aa4
Branches
Tags
No related merge requests found
......@@ -3,7 +3,7 @@
@o-mail-chatter-gap: 10px; // has to be defined here as this file is both in
// backend and other assets (livechat)
@o-chat-header-height: 46px;
@o-chat-window-zindex: 1101; // blockUI's z-index is 1100 > @zindex-modal
@o-chat-window-zindex: @zindex-modal + 1;
.o_chat_window {
.o-flex-display();
......@@ -145,6 +145,17 @@
}
}
.o_ui_blocked .o_chat_window {
// We cannot put the z-index of chat windows directly to be greater than
// blockUI's as ui-autocomplete dropdowns (which are below blockUI) would
// appear under the chat windows (and ui-autocomplete is used to choose the
// person you want to chat with). So we only raise the z-index value when
// the ui is really blocked (in that case, the ui-autocomplete dropdowns
// will disappear under the chat windows but this is not really an issue as
// there should not be any at that time).
z-index: 1101; // blockUI's z-index is 1100
}
.o_no_chat_window .o_chat_window {
display: none;
}
......@@ -59,12 +59,14 @@ function blockUI() {
var throbber = new Throbber();
throbbers.push(throbber);
throbber.appendTo($(".oe_blockui_spin_container"));
$(document.body).addClass('o_ui_blocked');
return tmp;
}
function unblockUI() {
_.invoke(throbbers, 'destroy');
throbbers = [];
$(document.body).removeClass('o_ui_blocked');
return $.unblockUI.apply($, arguments);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment