diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-12-21 12:29:50 +0100 |
|---|---|---|
| committer | Alexandre Kühn <alex.e.kuhn@gmail.com> | 2018-02-01 14:51:58 +0100 |
| commit | 02ec09cb1c3e2d7bc7968f40c18f2208d7f3f498 (patch) | |
| tree | 10d91136786b13666e78cfb94b12f1609d6f883d /addons/mail/static/src/xml | |
| parent | 0cd656b5af38051df3f7d6319e99705150bb1cd8 (diff) | |
[REF][IMP] *: mail js refactoring
This commit improves the JS code of the mail module,
which comes maily from the new coding guidelines
and the addition of "JS services".
JS services are important objects that do not fit
well in the component tree, such as chat_manager
or ajax.
The benefits of JS services are improved readability
of the code, reduced coupling, and more testable
modules. In particular, discuss was hard to
Summary of the changes:
- ClientAction has been renamed into Discuss
- Clear instantiation of chatManager
- New coding guidelines in most mail modules
- JS Services can interact with each other
- Chat Manager and Window Manager are services
- Window Manager renamed to Chat Window Manager
- bus.bus is now encapsulated in Bus Service (a service)
- The test infrastructure has been tweaked with JS Services
- Chat Mixin has been removed
A future improvement would be to translate some 'trigger' into 'trigger_up'.
Diffstat (limited to 'addons/mail/static/src/xml')
| -rw-r--r-- | addons/mail/static/src/xml/discuss.xml (renamed from addons/mail/static/src/xml/client_action.xml) | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/mail/static/src/xml/client_action.xml b/addons/mail/static/src/xml/discuss.xml index 22baf631c09..fba59c59a04 100644 --- a/addons/mail/static/src/xml/client_action.xml +++ b/addons/mail/static/src/xml/discuss.xml @@ -1,8 +1,8 @@ <?xml version="1.0" encoding="UTF-8"?> <templates xml:space="preserve"> - <!-- Client Action --> - <t t-name="mail.client_action"> + <!-- Discuss --> + <t t-name="mail.discuss"> <div class="o_mail_chat"> <div class="o_mail_chat_sidebar"/> <div class="o_mail_chat_content"> @@ -147,7 +147,7 @@ <!-- Mobile templates --> - <t t-name="mail.client_action_mobile"> + <t t-name="mail.discuss_mobile"> <div class="o_mail_chat"> <div class="o_mail_chat_mobile_control_panel"/> <div class="o_mail_chat_mobile_inbox_buttons"> @@ -193,7 +193,7 @@ </div> </t> - <!-- The ChannelPreview template is used by the client action in mobile, and by the systray menu --> + <!-- The ChannelPreview template is used by the discuss in mobile, and by the systray menu --> <t t-name="mail.chat.ChannelPreview"> <div t-attf-class="o_mail_channel_preview #{channel.unread_counter ? 'o_channel_unread' : ''}" t-att-data-channel_id="channel.id" t-att-data-res_id="channel.res_id" t-att-data-res_model="channel.model"> |
