summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/thread_widget.js
AgeCommit message (Collapse)Author
2019-03-25[MERGE] forward port branch saas-12.2 up to 230ad8c381eChristophe Simonis
closes odoo/odoo#32088 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-14[MERGE] forward port branch 12.0 up to a26496b6e79Christophe Simonis
2019-03-14[MERGE] forward port branch saas-11.3 up to f5ab04ce509Christophe Simonis
2019-03-13[MERGE] forward port branch saas-12.2 up to c9f832d9f03Christophe Simonis
closes odoo/odoo#31790 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-08[MERGE] forward port branch 12.0 up to c023d0784f2Christophe Simonis
2019-03-06[REF] mail: adapt code after jQuery updateVincent Schippefilt
Part of task 1896658 Co-authored-by: Aaron Bohy <aab@odoo.com> Co-authored-by: Christophe Matthieu <chm@odoo.com> Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com> Co-authored-by: David Monjoie <dmo@odoo.com> Co-authored-by: Martin Geubelle <mge@odoo.com> Co-authored-by: svs-odoo <svs@odoo.com> Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-02-21[MERGE] forward port branch 12.0 up to 84143a34b31Christophe Simonis
2019-02-04[FIX] bus, mail, web: missing super() call in destroy overridesXavier Morel
closes odoo/odoo#30792
2019-01-28[IMP] mail: adds delete and upload to chatterThanh Dodeur
backport of 73d9b9588f24788766c66aacd69ed436bb0223f4 This commit adds the ability to upload and delete attachments from the chatter. closes odoo/odoo#30636
2018-12-21[IMP] mail: adds delete and upload to chatterThanh Dodeur
This commit adds the ability to upload and delete attachments from the chatter. Task: #1911277 closes odoo/odoo#29702
2018-12-06[IMP] mail: channel seen icon indication ('v' and 'vv')Alexandre Kühn
This commit adds the seen icon next to a message for all channels except livechat. It tracks received and seen messages for all members of the channel. Icon is either 1 or 2 check(s) ('v' or 'vv'). Those are the different states of this 'seen' icon: ICON: DESCRIPTION: no check .................. no one has received the message. 1 check ................... some members have received the message, no one has seen it. 2 checks (greyed-out) ..... some members have seen the message, some or everyone has received it 2 checks (green) .......... all members have seen the message This icon is not shown for messages preceding the last message seen by everyone, in order to reduce visual noise. Task-ID 1881001
2018-12-06[IMP] im_livechat, mail: improved "is typing" notificationAlexandre Kühn
With this commit, the UI for "is typing..." notifications has changed. ** before **: In Discuss & chat windows, "is typing..." notification bar at the bottom of the thread, inside the conversation. ** after ** In chat windows, animated '...' next to conversation name. In Discuss, animated '...' next to conversation name in sidebar, and text below the composer. Task-ID 1881001
2019-03-05[FIX] mail: popover email icon without any customer email datajev
Before this commit, when hovering on a email icon of a message in chatter without any customer email data, there was a crash with the following error message: "No enumerator given to foreach" This was caused by `undefined` being passed to `t-foreach` when there are no customer email data on the message. Since `undefined == null`, it raised the error above. closes odoo/odoo#31587 Signed-off-by: =?utf-8?b?QWxleGFuZHJlIEvDvGhuIChha3Up?= <aku@odoo.com>
2018-11-07[FIX] mail: traceback reply button typo cd34f6de72Nicolas Lempereur
There was a typo with msgID at one part called messageID in another. opw-1904029 closes #28465
2018-10-19[FIX] mail: ignore popover if bootstrap not availableMohammed Shekha
Before this commit, there may be a silent crash when accessing the livechat from the customer URL, e.g. `http://mycompany.odoo.com/im_livechat/support/1`. This issue occurs when bootstrap popover lib is not available. This does not occur if one tab of the current browser has this lib loaded. To reproduce this issue, open the customer URL from another browser: 1. Access to `/web` from any browser (e.g. Chrome) 2. Go to Live Chat app 3. Select a livechat channel 4. Go to sheet page "Widget" 5. Copy text of the customer URL (2nd "Copy Text") 6. Paste the URL in a different browser (e.g. Firefox) 7. Open the livechat menu 8. Inspect dev tools => It will complain that `popover` is not a function. We would like to keep the livechat lib as small as possible, so instead of importing the boostrap lib, we simply prevent the logic that generates the issue. Task-ID 1885445
2018-10-16[FIX] mail: no moderation in chat windowAlexandre Kühn
Before this commit, a moderator of a moderated channel could see commands on 'pending moderation' messages in a chat window, although none of them work in chat windows. Those commands only work in Discuss. Making them work in chat windows is not trivial, because some code must be redesigned for this. This commit disables moderation commands in chat window. Moderators of such channel now see 'Pending moderation' on such messages in chat window, and mouse-hovering on this annotation tells the user to moderate those messages in the Discuss app. Task-ID 1887963
2018-09-12[FIX] mail: filter messages in thread (Discuss)Alexandre Kühn
Revision on https://github.com/odoo/odoo/commit/ec8c505bc1c9ec21939e9ffef53a9cc6f63f30c7 The commit above changes the way threads are rendered: the template now uses a thread object, instead of a list of messages. However, it was not handling messages that have been filtered from the searchview. As a result, it was not possible to filter messages at all. This commit re-adds the possibility to filter messages, by providing information on the domain of the thread in the template. Task-ID 1877502
2018-09-07[MERGE] forward port branch saas-11.4 up to d78f23df848Christophe Simonis
2018-08-30[IMP] mail: improve envelop icon tooltip styleSiddarth Gajjar
This commit improves the style of the tooltip on the mail envelop icon next to a message related to an email. To do so, we have removed existing CSS and custom tooltip UI and replaced them with boostrap popover. This commit also removes most flickering issue when mouse hovering on gaps between the tooltip and message icons. Note that there are still corner cases that produce flickers. This is unfortunately a known issue with bootstrap 4, as this glitch can also be observed on bootstrap website. Task-ID 1879282 Closes #26546
2018-08-17[FIX] mail: correct meaning for ASC/DESC thread orderingAlexandre Kühn
Revision on https://github.com/odoo/odoo/commit/f2302dfb27dd7f6a0dee7c65ab75b62a01706264 The commit above improved the rendering of thread. However, it wrongly defined ASC and DESC. This commit fixes this issue by re-arranging so that their definitions match the meaning of 'ascending' and 'descending'. Orders are defined from top to bottom. Visually: _____________ _____________ | | | | | message 1 | | message n | | message 2 | | ... | | ... | | message 2 | | message n | | message 1 | |_____________| |_____________| ORDER: ASC DESC
2018-08-13[IMP] mail, im_livechat: 'is typing...' indicator on mail channelsAlexandre Kühn
With this commit, most threads show an indicator when a member is typing something. e.g. "Mitchell Stephens is typing..." Supported threads: - DM - (public & private) channels - Livechat (Website & Backend) Unsupported threads: - mailboxes (e.g. 'Inbox') - document thread (= 'Chatter') - support channel (with `im_support` module) Some technical details: - This is a mix between 'start'/'stop' and 'regular notify' strategies. - On typing text in composer: notify 'start typing' to all members of thread. - On clearing text in composer: notify 'stop typing' to all members of thread. - A member can only notify once every 2.5 seconds to the server when he starts or stops typing something (throttled, buffered notify call). - On receiving a message from someone that is typing: determine that he is no longer typing. - On non-empty and unchanged composer text for 5.0 seconds: automatically notifies all members of thread that he is no longer typing anything. (This is like a 'soft / cooperative sender' timeout). - On non-receiving a typing notification of someone after 60 seconds: determine that he is not longer typing something (This is like a 'hard / receiver assumption' timeout). - When some types for more than 50 seconds straight: notify that he is still typing something (again and again every 50 seconds). - When two or more people are typing something (Multi-User channels), it displays at most 2 typing users (ordering rule: longer typers first): "Mitchell Stephens, Marc Brown and more are typing..." - Timing summary: - Usually 2.5 seconds uncertainty. - Up to 5.0 seconds uncertainty on typer inactivity. - Up to 60 seconds uncertainty on typer page reload / browser tab closed / etc. Future Improvements: - Detect page reload or browser tab close with loose of longpolling connection Task-ID 28188
2018-08-13[REF][FIX] mail, im_livechat: various improvements (JS)Alexandre Kühn
This commit makes a lot of small improvements of the JS of mail and related modules. A. Mail Manager --------------- im_support: - [REF] Slightly more robust way to determine a support message, so that it more reliably falls back on default kind of message (i.e. support channel UUID should be clearly set). mail: - [REF] Improved method names for readability purposes. Some examples: - `fetchFromServer` becomes `fetchMailStateFromServer` - `_initialize{*}` becomes `_update{*}FromServer` - `_isModerator` becomes `_isMyselfModerator` - [REF] Use 'template' pattern design to make Include on Mail Manager much more robust. In particular, the flow is always as follow: 1. Initialize internal state. 2. Listen on buses. 3. Fetch mail data from server. - [REF] Improved workflow for thread window workflow (Shorter & more readable). B. Mail Tests ------------- - [REF] Thread Window Tests crashes with clean message when there are some thread windows open before running the tests. C. (Model) Message ------------------ - [REF] Improved method names for readability purposes (e.g. `isAuthor` becomes `isMyselfAuthor`). D. (Model) Thread ----------------- - [REF] Improved `init` parameters on each kind of thread. - [REF] 'Thread With Cache' has been renamed to 'Searchable Thread': it embraces all kinds of threads that can be used with the search view. - [REF] 'DM' has been renamed to 'DM Chat' (for clarity). - [IMP] New Livechat model in the backend. - [REF] No more direct instances of the Channel class: public and private channels are now 'Multi-User' channels, while DM Chat and Livechat are 'Two-User' channels: This change has been made so that instances of classes always have direct classes as "leaf" in the Class modeling. It eases making changes to a certain model without being too constrained by another model. - [REF] As a consequence of above changed, the method `isChat` has been renamed to `isTwoUserThread`. This is to avoid confusion with the terminology 'chat', which is more like a shortcut for 'quick real- time conversation'. In other words, the property of 'chat' depends of the way to interact on a thread, not of the intrinsic type of the thread. Still, some parts have kept the terminology 'chat', such as in the systray messagin menu. - [IMP] Added `message_added` and `message_posted` hooks, which may be useful to easily hook on those events. E. Thread Widget ---------------- - [REF] Now uses a `mail.model.AbstractThread` for the rendering of a thread, instead of a list of `{mail.model.AbstractMessage}`. - [FIX] Stick thread scroll height to bottom on new rendering, if it was previously at the bottom of the thread. - [REF] Option ORDER has its meaning changed: it now refers to the chronological order of messages in the thread, in which DESC means 'from top to bottom', while ASC means 'from bottom to top'. - [REF] Improved doc on templates, in particular with the option `ORDER`. F. Thread Window ---------------- - [REF] Moved more logic to thread windows, which were previously in Mail Window Manager. - [REF] Now hides the thread widget attribute. So instead of `threadWindow.threadWidget.isAtBottom()`, it uses `threadWindow.isAtBottom()`. - [FIX] New received messages when not having focus on Odoo tab should always make the corresponding thread windows "passive" (i.e. windows that keep threads unread until click on them). - [FIX] Blank thread window (i.e. 'New message' TW) correctly opens Discuss with 'Inbox' when clicking on 'Expand' Button in the title - [FIX] Do not display the composer for channels with property 'mass-mailing' set in thread windows. G. (Website) Livechat --------------------- - [REF] Some `trigger` have been turned into `trigger_up`. - [REF] Some logic has been moved to models (e.g. `{im_livechat.model.WebsiteLivechat}`), from `{im_livechat.im_livechat.LivechatButton}`. - [FIX] New messages should be received in real-time. The longpolling was broken with a recent refactoring on bus service (6448420c5dd160470e465dee7729d19d8d5e7bab).
2018-07-19[IMP] im_livechat, mail: website livechat modelAlexandre Kühn
Make use of a website livechat model, so that im_livechat can make use of this model. This provides an almost similar model for threads in the backend and in the frontend. As a consequence, im_livechat and website livechat windows have been adapted to handle a website livechat model.
2018-07-19[IMP] mail, *: template rendering with abstract thread, adapt thread ↵Alexandre Kühn
instantiation, thread `getMessages`/`fetchMessages`, and create mode document thread. * = im_livechat, im_support - thread widget now uses abstract thread in `render` method - thread models have their `init` parameters changed, so that the parent may be optional - reworked 'creating a new record...' in chatter in create mode: > new model CreateModeDocumentThread, which basically is a fake document thread with a fake message for its rendering in create mode of the chatter > special rendering method of thread_widget for such case: `renderChatterCreateMode` - renamed thread methods previously named `getMessages` to `fetchMessages`: > in order to not conflict with `getMessages`, used for rendering > now, `getMessages` always get messages that are locally, while `fetchMessages` may fetch messages. TODO: - special thread model for im_livechat (rendering is broken ATM)
2018-07-19[IMP] mail: abstract thread in thread templateAlexandre Kühn
With this commit, the template for thread uses a {mail.model.AbstractThread} object, instead of a list of {mail.model.AbstractMessage[]}.
2018-07-19[RENAME] im_livechat,mail: rename widget 'thread.js' file to 'thread_widget.js'Alexandre Kühn
It is a bit annoying to have two files named 'thread.js', one being the widget and the other the mail model.