diff options
| author | Sébastien Theys <seb@odoo.com> | 2020-06-09 10:58:52 +0000 |
|---|---|---|
| committer | Sébastien Theys <seb@odoo.com> | 2020-06-09 10:58:52 +0000 |
| commit | 87f49b0616d67ea00e4e15db81459ed33310abec (patch) | |
| tree | 6feb9b26bdfbdcfa22139257c5ebba5c48ab0fbc /addons/im_support/static/src/js/systray_messaging_menu.js | |
| parent | 302bf7c1bba0f647666e90010a4159884fa48d0f (diff) | |
[REM] im_support: remove im_support module
The goal of the module was to communicate with livechat operators on our
production server, except the feature is disabled on our prod and we don't plan
to reactivate it any time soon.
closes odoo/odoo#52691
Related: odoo/upgrade#1313
Signed-off-by: Christophe Simonis <chs@odoo.com>
Diffstat (limited to 'addons/im_support/static/src/js/systray_messaging_menu.js')
| -rw-r--r-- | addons/im_support/static/src/js/systray_messaging_menu.js | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/addons/im_support/static/src/js/systray_messaging_menu.js b/addons/im_support/static/src/js/systray_messaging_menu.js deleted file mode 100644 index faec67fbb9d..00000000000 --- a/addons/im_support/static/src/js/systray_messaging_menu.js +++ /dev/null @@ -1,71 +0,0 @@ -odoo.define('im_support.systray.MessagingMenu', function (require) { -"use strict"; - -var MessagingMenu = require('mail.systray.MessagingMenu'); - -var config = require('web.config'); -var core = require('web.core'); -var session = require('web.session'); - -var _t = core._t; -var SUPPORT_CHANNEL_ID = 'SupportChannel'; - -// Disable Support in mobile for design purposes (for now at least), and don't -// add it to the messaging dropdown if it isn't available -if (config.device.isMobile || !session.support_token || !session.support_origin) { - return; -} - -/** - * This module adds a fake Support channel in the messaging menu of the systray. - */ -MessagingMenu.include({ - /** - * @override - */ - init: function () { - this._super.apply(this, arguments); - this.supportChannel = { - id: SUPPORT_CHANNEL_ID, - name: _t("Odoo Live Support"), - title: _t("Odoo Live Support"), - imageSRC: '/mail/static/src/img/odoo_o.png', - }; - }, - /** - * Overrides to add a className to the bottom part of the dropdown - * (containing the Support channel), so that the css rules apply. This - * className can't be added directly in the template, otherwise - * this.$channels_preview would be a nodeset containing the bottom part as - * well, and it will cause rendering issues when the dropdown is rerendered. - * - * @override - */ - start: function () { - var self = this; - return this._super.apply(this, arguments).then(function () { - self.$('.o_mail_systray_dropdown_bottom').addClass('o_mail_systray_dropdown_items'); - }); - }, - - //-------------------------------------------------------------------------- - // Handlers - //-------------------------------------------------------------------------- - - /** - * Overrides to handle the click on the fake Support channel. - * - * @override - * @private - */ - _onClickPreview: function (ev) { - var id = $(ev.currentTarget).data('preview-id'); - if (id === SUPPORT_CHANNEL_ID) { - this.call('mail_service', 'startSupportLivechat'); - } else { - this._super.apply(this, arguments); - } - }, -}); - -}); |
