diff options
| author | Pankaj Kamani <pam@odoo.com> | 2017-12-06 15:36:12 +0530 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2018-05-28 11:14:20 +0200 |
| commit | 1a7815f8b77f429643c30bb2f1e7fc272d8f8e43 (patch) | |
| tree | f1435c161dfb880a48ad8c430848e170d23e736b /addons/web/static/src/js/chrome/abstract_web_client.js | |
| parent | f65528a74e8d3f11cadd8658f5495bba21338199 (diff) | |
[IMP] web,base_setup: add option to disable special effects
Some people prefer not to be disturbed by any flashy information. In
this commit, we add an option to do just that. When the 'show_effect'
option is set to false, then the messages that would be displayed by an
effect will be displayed in a notification.
Task #37712
Co-authored-by: Mohammed Shekha <msh@openerp.com>
Diffstat (limited to 'addons/web/static/src/js/chrome/abstract_web_client.js')
| -rw-r--r-- | addons/web/static/src/js/chrome/abstract_web_client.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/addons/web/static/src/js/chrome/abstract_web_client.js b/addons/web/static/src/js/chrome/abstract_web_client.js index 612d04c577a..7d3f19c1639 100644 --- a/addons/web/static/src/js/chrome/abstract_web_client.js +++ b/addons/web/static/src/js/chrome/abstract_web_client.js @@ -437,7 +437,12 @@ var AbstractWebClient = Widget.extend(ServiceProviderMixin, KeyboardNavigationMi var data = e.data || {}; var type = data.type || 'rainbow_man'; if (type === 'rainbow_man') { - new RainbowMan(data).appendTo(this.$el); + if (session.show_effect) { + new RainbowMan(data).appendTo(this.$el); + } else { + // For instance keep title blank, as we don't have title in data + this.notification_manager.notify('', data.message, true); + } } else { throw new Error('Unknown effect type: ' + type); } |
