summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/thread_widget.js
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2018-12-05 14:35:02 +0000
committerAlexandre Kühn <aku@odoo.com>2018-12-06 14:51:28 +0000
commit7ad45a04e1a368f132fcc83bbe992ce0e98ed3d2 (patch)
tree5b106206817e1f73251374879f6d18d174704559 /addons/mail/static/src/js/thread_widget.js
parent9117d968e056d7c4e1112079e7e0ea0dd63cf9a5 (diff)
[IMP] im_livechat, mail: improved "is typing" notification
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
Diffstat (limited to 'addons/mail/static/src/js/thread_widget.js')
-rw-r--r--addons/mail/static/src/js/thread_widget.js28
1 files changed, 0 insertions, 28 deletions
diff --git a/addons/mail/static/src/js/thread_widget.js b/addons/mail/static/src/js/thread_widget.js
index e6da87c6dba..da74028903e 100644
--- a/addons/mail/static/src/js/thread_widget.js
+++ b/addons/mail/static/src/js/thread_widget.js
@@ -185,12 +185,6 @@ var ThreadWidget = Widget.extend({
dateFormat: time.getLangDatetimeFormat(),
}));
- // must be after mail.widget.Thread rendering, so that there is the
- // DOM element for the 'is typing' notification bar
- if (thread.hasTypingNotification()) {
- this.renderTypingNotificationBar(thread);
- }
-
_.each(messages, function (message) {
var $message = self.$('.o_thread_message[data-message-id="'+ message.getID() +'"]');
$message.find('.o_mail_timestamp').data('date', message.getDate());
@@ -254,28 +248,6 @@ var ThreadWidget = Widget.extend({
return done;
},
/**
- * Render the 'is typing...' text on the typing notification bar of the
- * thread. This is called when there is a change in the list of users
- * typing something on this thread.
- *
- * @param {mail.model.AbstractThread} thread with ThreadTypingMixin
- */
- renderTypingNotificationBar: function (thread) {
- if (this._currentThreadID === thread.getID()) {
- var shouldScrollToBottomAfterRendering = this.isAtBottom();
-
- // typing notification bar rendering
- var $typingBar = this.$('.o_thread_typing_notification_bar');
- var text = thread.getTypingMembersToText();
- $typingBar.toggleClass('o_hidden', !text); // hide if no text, because of padding
- $typingBar.text(text);
-
- if (shouldScrollToBottomAfterRendering) {
- this.scrollToBottom();
- }
- }
- },
- /**
* Scroll to the bottom of the thread
*/
scrollToBottom: function () {