diff options
| author | Christophe Simonis <chs@odoo.com> | 2017-01-23 14:33:53 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2017-01-23 14:33:53 +0100 |
| commit | 6c4389df41fb29f9707b205a8dcca13b3bf8a322 (patch) | |
| tree | b06358fdcff3268574c9ccda8cb36d9f94eb09dd /addons/mail/static | |
| parent | 255de893300d73670a15a102e85162ae48084d7c (diff) | |
| parent | 6804085b8ceb1411a23db65477f84a959f8c5bf7 (diff) | |
[MERGE] forward port branch 10.0 up to 6804085b8ce
Diffstat (limited to 'addons/mail/static')
| -rw-r--r-- | addons/mail/static/src/js/client_action.js | 8 | ||||
| -rw-r--r-- | addons/mail/static/src/js/utils.js | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/addons/mail/static/src/js/client_action.js b/addons/mail/static/src/js/client_action.js index 1e7196600cc..822f87dc0a2 100644 --- a/addons/mail/static/src/js/client_action.js +++ b/addons/mail/static/src/js/client_action.js @@ -127,8 +127,12 @@ var ChatAction = Widget.extend(ControlPanelMixin, { this.$(".o_mail_annoying_notification_bar").slideUp(); var def = window.Notification.requestPermission(); if (def) { - def.then(function () { - utils.send_notification('Permission granted', 'Odoo has now the permission to send you native notifications on this device.'); + def.then(function (value) { + if (value === 'denied') { + utils.send_notification(_t('Permission denied'), _t('Odoo will not have the permission to send native notifications on this device.')); + } else { + utils.send_notification(_t('Permission granted'), _t('Odoo has now the permission to send you native notifications on this device.')); + } }); } }, diff --git a/addons/mail/static/src/js/utils.js b/addons/mail/static/src/js/utils.js index db82b976945..2c30a82701e 100644 --- a/addons/mail/static/src/js/utils.js +++ b/addons/mail/static/src/js/utils.js @@ -130,7 +130,6 @@ var accented_letters_mapping = { 'oe': 'œ', 'u': '[ùúûűü]', 'y': '[ýÿ]', - ' ': '[()\\[\\]]', }; function unaccent (str) { _.each(accented_letters_mapping, function (value, key) { |
