summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/chat_manager.js
diff options
context:
space:
mode:
authorDharmraj Jhala <dja@openerp.com>2017-05-11 17:15:15 +0530
committerGéry Debongnie <ged@odoo.com>2017-07-12 13:43:08 +0200
commit4330ea02676a4afd88707bb463a007e7de3c8686 (patch)
treef547124a18fd30e09433a65cd9aa7b5a6645131a /addons/mail/static/src/js/chat_manager.js
parent578edf73b9f637b0d27708c511b542a27bd7a3b8 (diff)
[ADD] web, *: add rainbowification
This commit introduces the 'rainbowification' feature to the web client (and to some affected addons). This feature is essentially a way to display a nice friendly message when some business event happens. For example, a encouraging message is displayed when the user clear her/his inbox, or when a salesman closes a deal. The mechanism currently only displays a 'rainbowman', but could be extended later to add other kind of animation. There are a few different ways to display a 'rainbowman': - any JS code can simply trigger_up an event ('show_effect') with some options: for example this.trigger_up('show_effect', { type: 'rainbow_man', fadeout: 'no', message: $done, click_close: false, }); - an action returned by the server can have an 'effect' key, with some options - the do_execute_action method accepts a 'effect' option. This is useful when one wants to specify a rainbow on an action button in a form view Joint work with: dbh <dbh@odoo.com>, ged <ged@odoo.com>
Diffstat (limited to 'addons/mail/static/src/js/chat_manager.js')
-rw-r--r--addons/mail/static/src/js/chat_manager.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/chat_manager.js b/addons/mail/static/src/js/chat_manager.js
index ce44841533c..d0c41ad67b3 100644
--- a/addons/mail/static/src/js/chat_manager.js
+++ b/addons/mail/static/src/js/chat_manager.js
@@ -511,7 +511,7 @@ function on_mark_as_read_notification (data) {
if (message) {
invalidate_caches(message.channel_ids);
remove_message_from_channel("channel_inbox", message);
- chat_manager.bus.trigger('update_message', message);
+ chat_manager.bus.trigger('update_message', message, data.type);
}
});
if (data.channel_ids) {