diff options
| author | Sébastien Theys <seb@odoo.com> | 2020-06-15 18:12:21 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2020-06-15 18:12:21 +0000 |
| commit | 3fea5b2136627c1d7e83b2a5e111952fe3eb10a1 (patch) | |
| tree | 5eefad07972a87ce4689b83260f981bc87aadad4 /addons/mail/static/src/xml/abstract_thread_window.xml | |
| parent | 0a82848606151ef60eb6523e9c4c161171f214e7 (diff) | |
[REF] mail, *: refactor messaging with OWL
This commit is a significant rewriting of client-side discuss, chatter,
chat window, and messaging menu using OWL. The behavior should be broadly
the same, with some slight functional changes here and there.
From a technical standpoint, the code of messaging is mainly organized in 2
main groups of modules:
- models, which are logical entities that depict the client-side state of
messaging as a whole.
- components, which are in charge of displaying information from models.
This refactoring also introduces new JS guidelines regarding folder structure
(/static) and naming rules for JS modules.
Community PR: https://github.com/odoo/odoo/pull/39023
Enterprise PR: https://github.com/odoo/enterprise/pull/6249
Task-1914207
This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier,
with the precious help of Lucas to speed it up towards the end.
closes odoo/odoo#39023
Related: odoo/enterprise#6249
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Alexandre Kühn <aku@odoo.com>
Co-authored-by: Julien Giannone <jgi@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Co-authored-by: Xavier Dubuc <xdu@odoo.com>
Diffstat (limited to 'addons/mail/static/src/xml/abstract_thread_window.xml')
| -rw-r--r-- | addons/mail/static/src/xml/abstract_thread_window.xml | 85 |
1 files changed, 0 insertions, 85 deletions
diff --git a/addons/mail/static/src/xml/abstract_thread_window.xml b/addons/mail/static/src/xml/abstract_thread_window.xml deleted file mode 100644 index ae29a21b5ba..00000000000 --- a/addons/mail/static/src/xml/abstract_thread_window.xml +++ /dev/null @@ -1,85 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<templates xml:space="preserve"> - - <!-- - @param {mail.AbstractThreadWindow} widget - --> - <t t-name="mail.AbstractThreadWindow"> - <div class="o_thread_window o_in_home_menu" t-att-data-thread-id="widget.getID()"> - <div class="o_thread_window_header"> - <t t-call="mail.AbstractThreadWindow.HeaderContent"> - <t t-set="status" t-value="widget.getThreadStatus()"/> - <t t-set="title" t-value="widget.getTitle()"/> - <t t-set="unreadCounter" t-value="widget.getUnreadCounter()"/> - <t t-set="thread" t-value="widget.getThread()"/> - </t> - </div> - <div class="o_thread_window_content"> - </div> - <div t-if="widget.needsComposer()" class="o_thread_composer o_chat_mini_composer"> - <input class="o_composer_text_field" t-att-placeholder="widget.options.placeholder"/> - </div> - </div> - </t> - - <!-- - @param {boolean} [open=false] tell whether the hidden thread window - dropdown menu is open or not. - @param {mail.ThreadWindow[]} threadWindows list of thread windows - that are hidden, i.e. put in the hidden window dropdown menu. - @param {integer} [unreadCounter] the total unread counter of all - threads which are linked to the thread windows that are put in the - hidden thread window dropdown menu. - --> - <t t-name="mail.HiddenThreadWindowsDropdown"> - <div t-attf-class="o_thread_window o_in_home_menu o_thread_window_dropdown dropup #{open ? 'open' : ''}"> - <span role="alert" class="o_thread_window_dropdown_toggler dropdown-toggle" data-toggle="dropdown" title="Unread messages"> - <i class="fa fa-comments-o" role="img" aria-label="Messages"/> <t t-esc="threadWindows.length"/> - <span class="o_total_unread_counter"> - <t t-if="unreadCounter"><t t-esc="unreadCounter"/></t> - </span> - </span> - <ul class="dropdown-menu" role="menu"> - <t t-foreach="threadWindows" t-as="threadWindow"> - <li role="menuitem" class="o_thread_window_header" t-att-data-thread-id="threadWindow.getID()"> - <t t-call="mail.AbstractThreadWindow.HeaderContent"> - <t t-set="status" t-value="threadWindow.getThreadStatus()"/> - <t t-set="title" t-value="threadWindow.getTitle()"/> - <t t-set="unreadCounter" t-value="threadWindow.getUnreadCounter()"/> - </t> - </li> - </t> - </ul> - </div> - </t> - - <!-- - @param {string} [status] e.g. 'online', 'offline'. - @param {string} title the title of the thread window, e.g. the record - name of the document. - @param {integer} [unreadCounter] the number of unread messages on the - thread. - @param {mail.model.Thread|undefined} thread - @param {Object} widget - @param {function} widget.isMobile function without any param that - states whether it should render for desktop or mobile screen. - --> - <t t-name="mail.AbstractThreadWindow.HeaderContent"> - <span t-if="widget.isMobile()"> - <a href="#" class="o_thread_window_close fa fa-1x fa-arrow-left" aria-label="Close chat window" title="Close chat window"/> - </span> - <div t-if="thread and thread.getType() === 'dm_chat'" class="o_thread_window_avatar"> - <img alt="" t-att-src="'/web/image/res.partner/' + thread.getDirectPartnerID() + '/image_128'"/> - <t t-call="mail.UserStatus"/> - </div> - <span class="o_thread_window_title"> - <t t-esc="title"/> - <span t-if="unreadCounter"> (<t t-esc="unreadCounter"/>)</span> - <t t-if="thread and thread.hasTypingNotification() and thread.isSomeoneTyping()" t-call="mail.ThreadTypingIcon"/> - </span> - <span t-if="!widget.isMobile()" class="o_thread_window_buttons"> - <a href="#" class="o_thread_window_close fa fa-close"/> - </span> - </t> - -</templates> |
