From 7ad45a04e1a368f132fcc83bbe992ce0e98ed3d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20K=C3=BChn?= Date: Wed, 5 Dec 2018 14:35:02 +0000 Subject: [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 --- addons/mail/static/src/js/thread_widget.js | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'addons/mail/static/src/js/thread_widget.js') 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()); @@ -253,28 +247,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 */ -- cgit v1.2.3