Commit Graph
1667 Commits
Author SHA1 Message Date
Géry Debongnie c5c3ab927e [IMP] mail: load audio file lazily 2016-03-09 13:01:34 +01:00
Géry Debongnie e877d59d21 [REM] mail: remove old announcement bar 2016-03-09 13:01:34 +01:00
Géry Debongnie a127a7aed2 [FIX] mail: only update timestamps periodically
the messages in a thread were previously rerendered every minutes to
update their timestamps.  This commit only update the timestamps, not
all the message.  This will allow us to keep expanded/folded state in
messages without collapsing them every minutes.

[IMP] mail: add read more/read less support client side

Messages are cleaned up and tagged server sides, with a attribute
data-o-mail-quote.  This commit replace their content with a clickable
read more link, which toggle its display.
2016-03-03 15:45:05 +01:00
Thibault Delavallée ba74e9ffec [CLEAN] tools, mail: remove html_email_clean
Remove html_email_clean in tools. Remove shorten in mail.
2016-03-03 15:44:57 +01:00
Aaron Bohy 27e92415a9 [FIX] mail: followers: allow edit subtypes even if not follower
Before this rev., editing the subtypes of other followers was only possible if
the current user already opened a record of the same model of which he is
himself follower.
2016-03-02 13:39:16 +01:00
Aaron Bohy dc81e5f664 [REF] mail: code refactoring
- extended_chat_window feature in its own files: as it is only available in the
  backend, we don't want it in the frontend assets (which contain the 'basic'
  chat_window)
- move followers feature in its own files
- creation of the 'mail.utils' module in utils.js
- creation of systray.less to define the style of the mail item and dropdown
  in the navbar
- use of chat_manager's search_partner function in PartnerInviteDialog
- some code linting
2016-03-02 13:39:16 +01:00
Aaron Bohy 1e0bc5920f [IMP] mail: follower: remove an RPC when user is follower
When loading a form_view with the follower widgets, an RPC was performed to get
the followers info (name, email...), and if the user is one of the followers,
a second RPC was done to retrieve the subtypes.

This rev. batches those two RPCs. Also simplifies read_subscription_data() as
it is now always called with a follower_id.

A few code refactoring as well.
2016-03-02 13:39:16 +01:00
Fabien Pinckaers 4c8e908b49 [IMP] Speed up app switcher loading: 645k --> 137k lossless compression for all icons 2016-02-26 11:39:38 +01:00
qsm-odoo 58c5ff1d4f [REF] website*: frontend user navbar
* Remove use of bootstrap navbar
* Add navbar.less file for compatibility with enterprise
* Modify the location of the "new page/product/..." elements
2016-02-24 13:47:36 +01:00
Christophe Simonis 60c9cac46b [MERGE] forward port of branch saas-9 up to 87a01c7 2016-02-17 18:07:21 +01:00
Christophe Simonis 87a01c75ef [MERGE] forward port of branch saas-7 up to 5be43b8 2016-02-17 18:01:11 +01:00
Christophe Simonis 5be43b8d9a [MERGE] forward port of branch 9.0 up to 27058c4 2016-02-17 17:48:03 +01:00
Géry Debongnie 12d5667830 [FIX] mail: use the domain to determine message to mark as read
The button 'mark all as read' used to mark all messages as read, which
is not usually what the user wants when there is an active filter in the
search view.  This commit make sure that the domain is send to the
server and used correctly.
2016-02-17 14:26:54 +01:00
Aaron Bohy b87b6cc613 [FIX] mail: allow to extend make_message() and make_channel()
to load and display more fields of the corresponding model.
2016-02-16 11:27:11 +01:00
Denis Ledoux 493705bb77 [MERGE] forward port of branch 9.0 up to c40070f 2016-02-15 17:00:11 +01:00
Aaron Bohy 2f58e95a8d [FIX] mail: composer: correctly erase mentions
The problem was that mentions weren't correctly erased with DELETE key (in some
conditions), or when replacing mention text. When this happened, the mention
didn't appear in the message, but the message was even tough sent to the erased
mentioned people.

With this rev., we don't try to detect erasing on the fly anymore, but we
rather validate mentions before sending the message with the content of the
input.

opw 669362
2016-02-15 12:18:44 +01:00
Aaron Bohy 26f1d75606 [FIX] mail: followers: can't access res.partner case
When the user can't read the model res.partner, former code tried to determine
whether or not the user was follower of the document. This was wrong for three
reasons.

First, it performed an RPC to get the partner_id of the current user, but this
info is already stored in the session so the RPC was useless.
Second, the partner_id isn't helpful to know if the user is a follower because
everything we have is the follower_ids, which aren't ids of the res_partner
model, but ids of the mail_follower model (compare apples and oranges...).
Third, we anyway didn't use that information at all as the button indicating
whether or not the user is a follower wasn't displayed.

This rev. simply removes that useless RPC and only displays the count of
followers as previously.
2016-02-12 12:10:08 +01:00
Aaron Bohy a4dade389b [IMP] mail: batch RPCs at init
Remove the RPC to retrieve the action_id of the client action as do_action()
can take directly the xml_id, and batch the RPC to retrieve the menu_id with
the initial RPC used to fetch channel slots, emojis...
2016-02-12 12:04:02 +01:00
Aaron Bohy 452bf80aff [IMP] mail: remove 'Send Mail' button in Discuss
as it was more confusing than useful.
2016-02-12 12:04:01 +01:00
Géry Debongnie f201cb5b7e [FIX] mail: various ui improvements
- swap reply-to and mark-as-unread buttons in threads
- remove blockquote from stripped html in channel previews
- readd padding to no-content message in threads, also to no match found
  message
- add 1 to chat window z-index to prevent control panel buttons to show
  through it
2016-02-11 15:49:10 +01:00
Christophe Simonis d70fde0330 [MERGE] forward port of branch saas-7 up to cab5c48 2016-02-10 18:37:01 +01:00
Denis Ledoux c2d230ad68 [MERGE] forward port of branch 9.0 up to 47bb1bd 2016-02-10 15:55:48 +01:00
Denis Ledoux 911112c322 [FIX] mail: announcement bar URl displayed on print
On printing, the announcement bar URL was displayed
in the printing result.
e.g.
`https://services.openerp.com/openerp-enterprise/ab/register/...`
was displayed at the top of the print.

This is related to the revision 50a4ca31f8.

This is due to this simple typo, the according CSS rule was
never applied because of it.
2016-02-10 10:51:13 +01:00
Denis Ledoux a9c9f78ed9 Revert "[IMP] mail: remove deprecated annoucement bar"
This reverts commit 50a4ca31f8.
This causes retro-compatibility issues if you do not
update the `assets_backend` qweb views.

Closes #10853
2016-02-10 10:50:56 +01:00
Christophe Simonis 50a4ca31f8 [IMP] mail: remove deprecated annoucement bar
This bar was never displayed as the remote css was always empty.

When using the enterprise web client, the printing stylesheet show the
target of links (<a> tags) between parentheses, including the one from
the annoucement bar that should be kept hidden.
2016-02-09 16:23:38 +01:00
Denis Ledoux eb2346ba46 [MERGE] forward port of branch 9.0 up to 0b7990c 2016-02-08 16:08:32 +01:00
Aaron Bohy 4010c09e68 [FIX] mail: automatically open DM and livechat on new message
When a new message arrives in a DM or a livechat, the channel is automatically
open in a chat window if we aren't currently in Discuss.

Don't apply this behavior in mobile and we probably don't want to see a full
screen chat window everytime someone sends us a message.
2016-02-08 08:47:10 +01:00
Aaron Bohy ad02d23bf3 [FIX] mail: hide chat windows in discuss
Thus also remove the 'Detach' button in Discuss's control panel as we can now
directly detach channels with the messaging menu.

Also removed unused handler on 'messages_read' since rev. 30c26d7.
2016-02-08 08:29:53 +01:00
Aaron Bohy 5ba53f3b11 [FIX] mail: display user status in chat windows 2016-02-08 08:29:53 +01:00
Aaron Bohy 79a8eeb17d [FIX] mail: unread counter on new message in non pinned DM
When a new message arrived in a non pinned DM, the unread counter was
incremented twice ; once because the channel info (along with its unread
counter) was fetched from the server as the channel wasn't in the JS cache yet,
and once when adding the message in the JS.

With this rev., we only increment the unread counter when a new message arrives
if its channel is already in the JS cache.
2016-02-08 08:29:53 +01:00
Aaron Bohy 2b43624666 [FIX] mail: don't display subject of messages written in a chatter
This was working fine until rev. 4bab99bd which accidentaly changes the
condition.
2016-02-08 08:29:52 +01:00
Aaron Bohy 377bcd202f [FIX] mail: overlapping calls to get_channel_preview
Problem occured when the first call to get_channel_preview was directly
followed by others, before the channels_preview_def was resolved. In that case,
the other calls all returned an empty array, as only the channels_preview
array was only filled with the RPC result for the first call to
get_channel_preview (the one which initiated the RPC).
2016-02-08 08:29:52 +01:00
Aaron Bohy 021f9aeec7 [FIX] mail: systray items must wait for chat_manager
Those items might have been rendered and inserted into the DOM before the chat
manager initialization was completed. As those items rely on chat manager's
data, they should wait for it before executing their action (inbox redirection
and channels preview display).
2016-02-08 08:29:52 +01:00
Géry Debongnie bc03c915d4 [FIX] mail: various UI fixes
- correct template for undo snackbar
- better padding for chat windows
- recent messages now display 'now' instead of 'a few seconds ago'
2016-02-05 15:23:27 +01:00
Géry Debongnie 9e31b5de2a [FIX] mail: discuss notifications small fixes
- discuss notifications are always sent natively if possible
- clicking on native notifications focus the tab
- clicking on native notifications closes them
- granting notification permissions will display a confirmation
  notification
2016-02-05 14:09:19 +01:00
Olivier Dony d67d24d8b4 [MERGE] Forward-port 9.0 up to 93e8bf8ccf 2016-02-03 17:19:16 +01:00
Géry Debongnie 5465dccd69 [FIX] mail: prevent the composer to break layout in client action
The composer can grow vertically.  It will eventually grow out of the
chat content, which breaks the layout.  This commit fixes the issue.
2016-02-03 14:36:30 +01:00
Géry Debongnie 90d4f76100 [FIX] mail: users can now reply directly in documents from channels
A missing feature in discuss was the possibility to directly reply to a
message from a channel without opening the document.  This commit add
that feature.  Now, there is a small 'reply' icon in channels (including
inbox/starred) if the message comes from another document.  This icon
opens an extended composer, which will post the message in the document
chatter.
2016-02-03 14:36:30 +01:00
Christophe Simonis 469e04e97c [MERGE] forward port of branch saas-8 up to 2611a81 2016-02-02 14:52:15 +01:00
Christophe Simonis 2611a8198e [MERGE] forward port of branch saas-7 up to e765569 2016-02-02 14:48:31 +01:00
Christophe Simonis e765569d04 [MERGE] forward port of branch 9.0 up to f0a63e5 2016-02-02 14:44:39 +01:00
Aaron Bohy 017c4b0a4d [FIX] mail: keep expanded messages expanded after refresh
Commit c04103f re-renders the thread every minute to update messages' date.
As a consequence, the expanded messages are lost (they are shortened again).
This rev. makes sure to keep those messages expanded.
2016-02-02 08:49:54 +01:00
Aaron Bohy 0de35ffa7f [FIX] mail,web: don't block chat windows when blocking ui
One will still be able to chat in chat windows during long RPCs...
2016-02-01 11:31:36 +01:00
Aaron Bohy db4cb5b74e [FIX] mail: set tabindex of composer's elements
Also focus the subject's input by default in extended composer.
2016-02-01 11:31:09 +01:00
Aaron Bohy 4bab99bdaf [FIX] mail: don't notify 'join/left' messages
Messages of type 'notification' and whose model is 'mail.channel' are
considered as 'system notifications'. This is the case of 'join/left' messages.
They aren't taken into account when computing unread messages anymore.

Also use the same heuristic to decide whether or not to display the message's
star, so from now on pure notifications (not system notifications), like status
change on a document, can be starred.
2016-02-01 11:31:09 +01:00
Aaron Bohy ef77e6821a [FIX] mail: systray: move Inbox counter to its own item
Clicking on that item redirects to the Inbox in Discuss.

The messaging menu's counter is now the number of conversations (public or
private channels, dm and livechat) in which there is at least one unread
message. Moreover, it is emphasized when one of those conversations is a chat.

Also make mass-mailing channels available through the messaging menu (for
consistency as its counter takes those channels into account) and allow to open
them in chat windows without input.
2016-02-01 11:31:09 +01:00
Denis Ledoux c66588174a [MERGE] forward port of branch 9.0 up to 6c8bbc3 2016-01-29 17:23:19 +01:00
Aaron Bohy 5e79439dee [FIX] mail: chatter: keep mentions
Message's body is kept when switching from 'New message' to 'Log a note' since
rev. f35b48aa. However, mentionned partners or channels were lost. This rev.
makes sure to preserve both message's body and mentions when switching between
composers.
2016-01-29 13:21:02 +01:00
Aaron Bohy c04103f4da [FIX] mail: various UI fixes/improvements
- don't print chat windows
- add missing 'width: 100%' on composer and Discuss sidebar inputs (required
  for community edition)
- center the Discuss sidebar inputs
- Discuss sidebar items layout: one line, text ellipsis if name is too long
- hide chatter in 'create' mode (messages wrote in the chatter need a res_model
  and a res_id, the latter is not yet existing if we are in 'create' mode)
- revert 2d2dacc: print chatter by default (classname 'hidden-print' can be
  used for specific models for which we don't want the chatter to be printed)
- thread: ensure the displayed message's date is in the past
- re-render threads every minutes to update dates
- don't squash messages in mass mailing channels
2016-01-29 13:21:02 +01:00
Christophe Simonis 78d20b552b [MERGE] forward port of branch saas-8 up to 7e44ddc 2016-01-27 12:24:04 +01:00