Commit Graph
38 Commits
Author SHA1 Message Date
jpr-odoo 46699c5214 [IMP] mail: Add a preview popup for attachments
Purpose
=======

The goal is that when you click on an attachment, you should get a preview of it and then you get the possibility to download it.
2017-09-05 15:52:15 +02:00
qsm-odoo 24ea61163d [REF] mail: review new chatter design
- Use classes instead of repeated mixins
- Add real user avatar instead of fake one
- Reorganize LESS rules
2017-09-05 12:13:55 +02:00
stefanorigano 12b818d375 [REF] mail: introduce new chatter/discuss design
- Improve overall design
- Better use of UI colours
- Replace planned activities icon
- Vertically align kanban icons
- Remove the 'bell shtcut' and followers caret
- Use a mixin to style the chatter (inline, not inline, compact)
2017-09-05 12:13:55 +02:00
Dhaval Panchal db41366b67 [IMP] discuss: action buttons always visible on touch screens
We add the o_touch_device css class to the body (it was done in enterprise only), and various other small changes to make sure that the action buttons (in discuss, next to the message title) are always visible (not only on hover) when we are on a touch device. (pr (#15459, closes task 31208)
2017-05-17 14:39:09 +02:00
Denis Ledoux 60a59b607a [FIX] mail: handle undefined customer_email_data
`customer_email_data` can be undefined.
It must therefore be checked before testing
its length

e.g. use the /helpdesk command with an anonymous visitor
of the livechat

opw-690301
2016-10-05 16:46:55 +02:00
Thibault Delavallée 8acd298a56 [FIX][IMP] mail: make tracking great again
When changing tracking mecanism in v9 'always' tracked fields lost their meaning.
They were managed like 'onchange' fields. This commit sets the old behavior back.

 * 'onchange' fields are displayed in tracking every time they change
 * 'always' fields are displayed in tracking every time they change or whenever
   other tracking exist; those are used to display some contextual
   information
2016-09-30 14:39:31 +02:00
Thibault Delavallée 72dfcae2a4 [IMP] mail: improve notification management for customers
Currently it is impossible in Discuss to know whether an email has been sent
to a customer and whether it failed or bounced. A notified partner has an
entry in the needaction m2m table. In this commit we decorate this table to
add fields about the email notification: is an email sent, did it failed, did
it bounce.

This information is kept only for customers. Internal users does not use this
information. Moreover their notification is deleted once the message is read
in the Chatter. This avoids having a notification table that grows quickly.

Chatter now holds a new icon for email details. It allows to know on a thread
status of emails sent to customers.
2016-09-01 12:57:56 +02:00
Jeremy Kersten 4a4c4e1b95 [FIX] mail: display date and datetime in tracking value with the right timzeone.
When tracking value is converted to be rendered as a message_post, we convert
the date/datetime with the current local from momentjs.

Related to #12327

Courtesy of @aab-odoo for help and review.
2016-06-08 15:43:52 +02: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
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
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
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 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
Goffin Simon 8c3eb91e57 [FIX] mail: display block for message body
The message body must be inside a tag div because when the message was short
with a @author, there was no tag div around the body and it was displayed
inine.

opw:666840
2016-01-15 16:51:51 +01:00
Martin Trigaux ce2d94207b [FIX] mail,web: : untranslated term in view
_t(...) in xml qweb views do not work, not exported, not evaluted.
No reason to use t-att-*, just using simple attribute is enough.
2016-01-13 15:48:09 +01:00
Géry Debongnie a53bd87585 [FIX] mail: various UI improvements to chat interface
- don't display user name in chat windows
- scroll to the new messages separator if it exists (in client action)
- increase sidebar width
- add correct link href in threads
- hide chat window in mobile mode
- mail: ignore o_mail_redirect or o_channel_redirect, but redirect anyway
2015-12-11 14:04:59 +01:00
Aaron Bohy ad14862907 [FIX] mail: various ui improvements/fixes
- display full content of messages in Discuss
- no content helpers in inbox and starred improved
- mark as read tooltip instead of mark ad done
- decrease font size in chat windows
- increase chat windows dimensions
- display avatars in chat windows
- chat window background is now white
- notes are displayed with a darker background
2015-12-09 11:20:25 +01:00
Géry Debongnie 27a455fc92 [IMP] mail: various improvement
- don't display subject for messages coming from chatter
- better tooltip on the leave channel button in client action sidebar
- don't squash nearby messages in chatter
- reduce margin of date separator in chat windows
2015-12-07 16:14:46 +01:00
Aaron Bohy e7cb3dcaa8 [FIX] mail: don't redirect to user's own partner form view
Clicking on the author of a message opens a DM with the corresponding user if
there is one, and opens the corresponding partner's form view otherwise.

When the author is the current user, obviously we don't want to open a DM with
ourself, but we probably don't want to open our partner form view either, which
was exactly the behavior before this rev.
2015-12-03 11:21:47 +01:00
Géry Debongnie 2c84cd4181 [FIX] mail: various improvements/fixes
- display appropriate message when no results are found in a search
- don't display 'you have been invited' notif when creating private channel
- correctly join when a user was invited in a public channel
- display a message when a user join a channel through an invitation
- don't display subject for message of type notification (still a
  mystery why it happens in test.odoo.com for channel of type mailing)
- better heuristic on when to display message subject
- tweak sidebar text color (slightly whiter)
- add ... to the placeholder of the text area in the composer
- invert send and icons for attach/smiley in composer
- don't display 'read less' on expanded messages
- exclude livechat channels from channel mention suggestions
2015-11-27 11:47:34 +01:00
Géry Debongnie 7137891a8a [FIX] mail, im_livechat: correctly displayed message date
Messages are required to be displayed in a smarter way: relative to the
current date, if it's a recent message, or absolute if not.  This
commits rework most of the date processing code to comply with these
requirements.

Messages were preprocessed each time a thread is rendered, which is
stupid.  It should be preprocessed only when the message is created.
This was a small problem because livechat does not use the chat manager,
so a simplified version of the preprocessing had to be done.
2015-11-26 14:27:11 +01:00
Thibault Delavallée 2e583eb7c9 [FIX] mail: chatter: re-re-add the read more / less
The read more / read less in chatter has been removed in the new timeline and
then cleaned timeline introduced at cc6d2aa995.
This feature has been brought back at revision 486aab5098.
However a new cleaning removed the feature at revision 2a5f07e0b9.

This commit brings back this feature for the second time. Next one brings free
cookies.
2015-11-18 13:48:27 +01:00
Thibault Delavallée e01e24aa9c [FIX] mail: chatter: subtype when tracking
When having a tracking, the subtype description should be displayed. This is
used for tracking linked to a subtype like Task Opened, Task Blocked, ...

This feature was forgotten when refactoring the chatter for v9 and is now
back.
2015-11-18 13:48:27 +01:00
Géry Debongnie bac5a19451 [FIX] mail: various small UI tweaks/fixes
- put the mentionned partners and the attachment above the composer
  instead of below
- debounce some links in thread.js to prevent double loading views when
  double-clicking
- readd the # in front of the channelname of the title of the client action
- give the channel_id to the thread in a chat window, so it does not
  display the channel name everytime it displays a message
- correctly close dm chat window when the dm channel is closed in the
  main sidebar
- simplify the help messages when a channel is empty
2015-11-12 08:51:56 +01:00
Aaron Bohy 5264ccf0d0 [IMP] mail: needactions and messages read
Mainly concern the client action:
	- Display needactions per channels
	- For all channels except Inbox, clear needactions when opening the channel
	- Add snackbar to undo needactions clearing
	- Display a separator between read and unread messages in threads
	- Fix active channel (for Inbox and Starred) display in sidebar

Various minor changes in chat_manager:
	- Code refactoring of bus notification handler
	- get_channel() don't fallback anymore on first channel
2015-11-12 08:51:56 +01:00
Géry Debongnie 622bd038e4 [FIX] mail: various ui improvements
- display star/mark as read icon next to the message title instead on
  the far right
- display unstar all message in channel starred
- enable/disable the 'unstar all' and 'mark read' buttons depending on
  the number of messages in the corresponding channels
- display star on the left sidebar in 'squashed messages'
- tweaks to padding in client action
- display hash in channel name in lighter tone
- light opacity in sidebar
- star icon in message sidebar is clickable + small less refactoring
- message sidebar is aligned with the message now
- messages are not squashed in inbox/starred
2015-11-09 16:36:52 +01:00
Géry Debongnie d17f656de4 [IMP] mail: various ui improvements
- less tweaks
- improve default channel name
- clean origin channel names in Inbox and Starred
- reduce fadeout duration in threads
2015-11-06 09:43:49 +01:00
Aaron Bohy 388f7a7db9 [IMP] mail: composer: mention channels feature
Generalizes the mention mechanism to allow mentionning partners (@) and
channels (#).

When a user clicks on a mentionned channel, it subscribes to it and joins it.
If the mention is in a chatter, the user is redirected to the Discuss client
action.

Moves the RPCs to get the menu and action id of the Discuss client action from
systray.js to chat_managaer.js as they are now needed in the chatter as well.

Also fixes the on_channel_clicked redirection for notification message
(created/joined/left #channel). Those three messages are now of type
notification, and correctly redirect on click.
2015-11-03 16:19:35 +01:00
Géry Debongnie f99231a8f4 [IMP] mail: various ui improvements
- display hash before text in create channel input
- increase limit for message fetching from 20 to 100
- 'Show more messages' renamed ino 'Show older messages'
- remove border top and bottom on selected messages
2015-11-03 16:19:35 +01:00
Géry Debongnie e2dc7b27ee [IMP] mail: add link to origin channel from message 2015-10-22 14:43:14 +02:00
Géry Debongnie 4d54a8c0ff [IMP] mail: various ui improvements
including:
- reset scroll position to bottom when leaving channel
- allow clicking on the avatar image
- hide stars when message is of type notification
- sort channel names
- add # before channel names
- rename Whole company channel in general
- replace \n and \r in messages by <br/>
- lighten the hover color of sidebar items in the client action
- Display @ before mentions
2015-10-22 14:43:13 +02:00
Aaron Bohy be5fc7b1a4 [IMP] mail: redirect to DM on user clicked
When clicking on a partner in the thread of messages, it opens the DM with the
associated user if there is one (and if this user isn't the current user).
Otherwise, or when clicking on a record of any other model, the user is
redirected to that record's form view.

This change required a minor change in chat_manager: create_channel now
returns the created channel, as the client action needs it to switch to it.

Moreover, in the thread, when there is no partner associated with a message
(only an email address), we simply use html's mailto mechanism. This fixes a
bug as we formerly tried to open an unexisting record of res.partner.
2015-10-16 15:52:02 +02:00
Aaron Bohy 4c7ab52a67 [IMP] mail: thread: hide avatar, author and date of consecutive messages
... from the same author, written within 1 minute (restricted to comments).

Also:
 - Display stars and needactions on hover only
 - Display the date of messages without avatar and info in the margin on hover
 - Add 'selected' state of messages (mainly for touch screens to replace hover)
 - Fix typo (msg_type -> message_type) on the computation of the avatar url
2015-10-16 15:52:01 +02:00
Géry Debongnie b8badd6263 [IMP] mail: various small ui improvements
including:
- decrease vertical spacing between user name and text
- decrease vertical spacing between messages
- align avatar width with first line of message
- bold channels more visible (color is actually white)
- decrease online status icon size and change its color
- hide the DM unpin icon, and show it only when hovering
- the add channel icons are less white
- offline user icon is now white
- the unpin icon is now visible when hovering on user name
- correctly display notifications in inbox
2015-10-16 15:52:00 +02:00
Aaron Bohy aab4ef752e [IMP] mail: thread: parameterize the display of messages' star
To allow hiding it in livechat windows on the website.
2015-10-06 16:24:09 +02:00
Aaron Bohy 212bbf1f7e [FIX] mail: thread: messages' date displayed in browser's timezone 2015-10-06 16:23:56 +02:00
Aaron Bohy 512287cac1 [REF] mail: first part of the chat refactoring (client side)
Joint work with ged
2015-10-01 14:00:18 +02:00