summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/discuss.js
diff options
context:
space:
mode:
authorAlexandre Kühn <aku@odoo.com>2018-08-30 17:35:03 +0200
committerAlexandre Kühn <aku@odoo.com>2018-08-31 10:22:56 +0200
commit0a3d08c44311d6f6b9455d3fd3937ddb5a31e06a (patch)
tree41f878acbf768bab67113a9a5a8ac5fbe68bf27a /addons/mail/static/src/js/discuss.js
parent2e78aa4f56e6dd5f85a1f8de37b47e30d112b2db (diff)
[REM] mail: no push notifications permission request in Discuss
This has been replaced with "OdooBot has a request" in the systray messaging menu (see https://github.com/odoo/odoo/commit/f80bbb4b2a1230ba543e97d3da01c7b2c52d24cc). Task-ID 1877502
Diffstat (limited to 'addons/mail/static/src/js/discuss.js')
-rw-r--r--addons/mail/static/src/js/discuss.js33
1 files changed, 0 insertions, 33 deletions
diff --git a/addons/mail/static/src/js/discuss.js b/addons/mail/static/src/js/discuss.js
index 258b5a32c0a..d1b954a0453 100644
--- a/addons/mail/static/src/js/discuss.js
+++ b/addons/mail/static/src/js/discuss.js
@@ -185,11 +185,9 @@ var Discuss = AbstractAction.extend(ControlPanelMixin, {
'click .o_mail_sidebar_title .o_add': '_onAddThread',
'blur .o_mail_add_thread input': '_onAddThreadBlur',
'click .o_mail_channel_settings': '_onChannelSettingsClicked',
- 'click .o_mail_annoying_notification_bar .fa-close': '_onCloseNotificationBar',
'click .o_mail_discuss_item': '_onDiscussItemClicked',
'keydown': '_onKeydown',
'click .o_mail_open_channels': '_onPublicChannelsClick',
- 'click .o_mail_request_permission': '_onRequestNotificationPermission',
'click .o_mail_partner_unpin': '_onUnpinChannel',
},
@@ -203,10 +201,6 @@ var Discuss = AbstractAction.extend(ControlPanelMixin, {
this.action = action;
this.action_manager = parent;
this.dataset = new data.DataSetSearch(this, 'mail.message');
- this.displayNotificationBar = (
- window.Notification &&
- window.Notification.permission === 'default'
- );
this.domain = [];
this.options = options || {};
@@ -1165,12 +1159,6 @@ var Discuss = AbstractAction.extend(ControlPanelMixin, {
/**
* @private
*/
- _onCloseNotificationBar: function () {
- this.$('.o_mail_annoying_notification_bar').slideUp();
- },
- /**
- * @private
- */
_onComposerFocused: function () {
var composer = this._thread.isMassMailing() ? this._extendedComposer : this._basicComposer;
var commands = this._thread.getCommands();
@@ -1366,27 +1354,6 @@ var Discuss = AbstractAction.extend(ControlPanelMixin, {
},
/**
* @private
- * @param {MouseEvent} ev
- */
- _onRequestNotificationPermission: function (ev) {
- var self = this;
- ev.preventDefault();
- this.$('.o_mail_annoying_notification_bar').slideUp();
- var def = window.Notification && window.Notification.requestPermission();
- if (def) {
- def.then(function (value) {
- if (value !== 'granted') {
- self.call('bus_service', 'sendNotification', _t("Permission denied"),
- _t("Odoo will not have the permission to send native notifications on this device."));
- } else {
- self.call('bus_service', 'sendNotification', _t("Permission granted"),
- _t("Odoo has now the permission to send you native notifications on this device."));
- }
- });
- }
- },
- /**
- * @private
* @param {OdooEvent} ev
*/
_onSearch: function (ev) {