Files
odoo_source/addons/mail/static/src/main.js
T
Alexandre Kühn 315a0d6b5b [IMP] mail: introduce PopoverManager, and some code cleaning
1. Remove useless props category on component `ChannelMemberListCategory`
2. Make fields of model `DiscussSidebarCategory` more declarative,
   i.e. by defining values from compute of field rather than imperative
   code somewhere in the code of discuss.
3. Introduce a new model `PopoverManager`, which eases use of `PopoverView`s
   as they are automatically added in the DOM in a similar way than `Dialog`s
   with `DialogManager` or `ChatWindow`s with `ChatWindowManager`.
   Doing so also make these popover view no longer deep child in component tree:
   this fixes an issue in which popover views could be cut due to DOM tree.

Task-2871688

closes odoo/odoo#92896

Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2022-06-03 18:34:53 +02:00

30 lines
1.5 KiB
JavaScript

/** @odoo-module **/
import { ChatWindowManagerContainer } from '@mail/components/chat_window_manager_container/chat_window_manager_container';
import { DialogManagerContainer } from '@mail/components/dialog_manager_container/dialog_manager_container';
import { DiscussContainer } from '@mail/components/discuss_container/discuss_container';
import { PopoverManagerContainer } from '@mail/components/popover_manager_container/popover_manager_container';
import { messagingService } from '@mail/services/messaging_service';
import { systrayService } from '@mail/services/systray_service';
import { makeMessagingToLegacyEnv } from '@mail/utils/make_messaging_to_legacy_env';
import { registry } from '@web/core/registry';
const messagingValuesService = {
start() {
return {};
}
};
const serviceRegistry = registry.category('services');
serviceRegistry.add('messaging', messagingService);
serviceRegistry.add('messagingValues', messagingValuesService);
serviceRegistry.add('systray_service', systrayService);
serviceRegistry.add('messaging_service_to_legacy_env', makeMessagingToLegacyEnv(owl.Component.env));
registry.category('actions').add('mail.action_discuss', DiscussContainer);
registry.category('main_components').add('DialogManagerContainer', { Component: DialogManagerContainer });
registry.category('main_components').add('ChatWindowManagerContainer', { Component: ChatWindowManagerContainer });
registry.category('main_components').add('PopoverManagerContainer', { Component: PopoverManagerContainer });