c5dc0b2f39 disabled send button on composer sent.
But this is only needed for chatter composer, other composers directly
send the message and are not refreshed asynchronously.
So for other composer, the send button worked one time but then was
disabled and the only way to sent was ENTER (on basic composer) or
CTRL+ENTER (on extended composer).
With this fix, disabling the button is done only for chatter composer.
11.0 backport of 12.0 #28474
issue found when checking opw-1904029
closes#28506
Backport of 17bb0ca443
Before this commit, the user could not receive any notification
from the chatter of a document when having Notification Management
set to "Handle with Odoo".
This problem occurs when the user opens (or has opened) the document.
Any messages received from the document are automatically marked
as read, so it removes the notification right after receiving it.
In order to no longer have this issue, the user had to reload all
pages that have opened this document.
This commit slightly changes the behaviour of the chatter, so that
it automatically marks it as read only when accessing the document,
but not when the document is open (or has been opened). Consequently,
if the user has opened the document and then receives a notification
from this document, it won't automatically mark it as read.
Task-ID 1895359
opw-1890556
closesodoo/odoo#28113
Before that, the body of the message was never displayed if the message had tracking values. This was annoying for account_asset module, were we prompt the user for some justification when she modifies the depreciation data of an asset, and then call message_post with this text as body, and tracking values reflecting the change that was made.
Spamming the "send" button on the chatter send multiple times the
same message. This PR simply disable the send button to fordib the
spam.
opw-1895511
closes#27233closesodoo/odoo#28078
This widget claims to support one2many fields but it doesn't work in most cases.
This was triggering warnings when this widget was set on another field or in another
view (i.e. in Studio).
opw-1905803
closesodoo/odoo#28413
On an activity, click Mark as done, the popover pops over
Now write some text in it, but click somewhere else, like to copy/paste something
The popover looses focus, and your text disappears
After this commit, we store the value of the popover when hiding it,
then, when when showing back the popover, the value is reinjected
OPW 1873999
closes#26315
Before this commit, it was not possible to upload again a file on the
browser from the composer, when it was added then removed from the attachments.
When a file is uploaded on the browser, it writes on a special input
some data to identify this file. In order to detect a new upload,
the code listens on the JQuery event `change` on this input. Since the
value of this input was not cleared after an attachment removal, the
user couldn't reupload the same file, because the value of the input
will be unchanged.
This commit solves this issue by clearing the special input when removing
an attachment, so that adding the same file again will trigger a `change`
on this input.
Before this commit, we could not remove an attachment in the composer
by clicking on the white-cross icon that is shown on mouse hover.
This was due to the handler function picking the wrong DOM element
as target for reading on the attachment ID: it should pick the target
of this handler function, and not the specific target below the mouse
on click. For instance, let's consider this HTML snippet for the button:
```
<div class='delete' data-attachment-id=100>
<span class='cross-icon'>X</span>
</div>
```
where the handler function is called when clicking on `div.delete`.
When we click on `span.cross-icon`, it triggers the handler function
of `div.delete`. The MouseEvent object contains the following property
values:
- `target`: the `<span>` element
- `currentTarget`: the `<div>` element
The handler function of `div.delete` deletes an attachment by looking
into the `data-attachment-id` attribute of `div.delete`. It should
always pick `div.delete`, even when the user clicks on `span.cross-icon`.
In the discuss composer on google chrome, when when the smileys have
more width than available, they stayed on one line and would increase
page size (adding an horizontal scrollbar).
This happened really easily in saas-11.3 because we have more smileys,
but still happened in 11.0 depending on the screen size.
opw-1861191
closes#25507
Co-authored-by: qsm-odoo <qsm@odoo.com>
In the mocked version of the longpolling bus used in tests, the
is_odoo_focused function should be defined to prevent crashes when
we simulate incoming messages.
Since the ChatWindowManager is a service, this is no longer
necessary to set the webclient as parent of ChatWindow's instances.
This rev. sets the ChatWindowManager itself as parent, which makes
much more sense, and which allows to properly mock the whole
ChatManager-ChatWindowManager environment in tests.
Before this commit, the user could lost some unsaved changes in a record when
posting a message in the chatter.
This is due to reloading the data on the record, which is necessary because
a `message_post` may make some changes on the record [1].
With this commit, a dialog will warn the user that the record will be reloaded
in the following cases:
a) posting a message in the basic composer that will reload the record
b) opening the full-composer when the record is dirty
Indeed, any operation after opening the full-composer will always refresh the
record (even closing the dialog).
Known issues:
- a record is not considered as dirty if we only make changes in its
description from a pad.
> the content of the pad will be erased without any warning...
[1] https://github.com/odoo-dev/odoo/commit/803d5cf04835fcf8e7ddb143e1ab140408beef93
opw-1825005
User B mentions @UserA in a channel on discuss
User A gets two notifications: one for direct chat,the other for the channel
User A clicks on the notification for the channel
Before this commit the form view of the channel was opened
After this commit, the channel is opened in discuss
OPW 1849577
closes#25074
When opening the activity dropdown in the kanban view
of the opportunities,
the activity type names were not translated in the user language.
In addition, when marking it as done, the message
posted in the discussion thread of the opportunity
was not translated either.
opw-1847908
- The code to remove mentionned users on the chatter isn't robust enough.
It crashes when trying to remove a link added from a copy/paste as if it was a mention.
Mentions have an id defined on their "a" html node, linked copied and pasted don't.
Which crashes the javascript code because it is trying to use the id.
This fix, make sure to delete the node without using its id (we already have the node) and make sure to remove it only if it starts with a '@' (meaning it is a mention).
content_subtype was a parameter to message_post allowing to give plaintext
content instead of html content. It has been removed at 74d4b3902d. This
commit cleans some leftover bits referencing this now removed parameter.
Revision on dd8e95cb1a12603940cc32a3d840b6097515df85
The intent of the commit above was to fix the style of the composer,
which was broken when turning the textarea input into a contenteditable
div. While fixing the style for the composer in Discuss or in the Chatter,
it misplaced the initial position of the caret in a chat window.
This commit fixes the issue on chat windows, while also improving the
previous fix.
Known issues:
In a chat window with more messages than it could be displayed at once,
when at the bottom of the thread, the line separator of the composer
and the thread is off by 1 or 2 pixels (vertically).
> Fixing this issue breaks a lot the alignment of items in the composer
of Discuss and Chatter, so this small visual glitch is preferred.
If document viewer is opened from chat window and when document viewer is opened then focus
remains on it's modal, pressing escape should set focus back to chat window's input element,
if file selecor dialog is opened and if user press ESCAPE on file selector dialog to cancel file selector
dialog then it should not close chat window instead it should set focus on chat window input and on
second ESCAPE key chat window should be closed
also increase z-index of document viewer dialog so image remain on top of cht window
OPW: 1777937