summaryrefslogtreecommitdiff
path: root/addons/im_support/static/src/js/thread_window.js
diff options
context:
space:
mode:
authorSébastien Theys <seb@odoo.com>2020-06-09 10:58:52 +0000
committerSébastien Theys <seb@odoo.com>2020-06-09 10:58:52 +0000
commit87f49b0616d67ea00e4e15db81459ed33310abec (patch)
tree6feb9b26bdfbdcfa22139257c5ebba5c48ab0fbc /addons/im_support/static/src/js/thread_window.js
parent302bf7c1bba0f647666e90010a4159884fa48d0f (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/thread_window.js')
-rw-r--r--addons/im_support/static/src/js/thread_window.js67
1 files changed, 0 insertions, 67 deletions
diff --git a/addons/im_support/static/src/js/thread_window.js b/addons/im_support/static/src/js/thread_window.js
deleted file mode 100644
index 9173ef21d41..00000000000
--- a/addons/im_support/static/src/js/thread_window.js
+++ /dev/null
@@ -1,67 +0,0 @@
-odoo.define('im_support.ThreadWindow', function (require) {
-"use strict";
-
-/**
- * This module includes ThreadWindow to handle the case of the Support channel.
- */
-var ThreadWindow = require('mail.ThreadWindow');
-
-ThreadWindow.include({
- /**
- * Overrides to tweak the options in the case of the Support channel (no
- * star).
- *
- * @override
- */
- init: function () {
- this._super.apply(this, arguments);
- var channel = this.call('mail_service', 'getChannel', this._getThreadID());
- if (channel && channel.getType() === 'support_channel') {
- this.options.displayStars = false;
- }
- },
- /**
- * Overrides to remove the attachment button in the Support channel as this
- * feature does not work in that channel.
- *
- * @note: this feature could be enabled by storing the attachments on the
- * Support server.
- * @override
- */
- start: function () {
- var def = this._super.apply(this, arguments);
- var channel = this.call('mail_service', 'getChannel', this._getThreadID());
- if (channel && channel.getType() === 'support_channel') {
- this.$('.o_composer .o_composer_button_add_attachment').remove();
- if (!channel.isAvailable()) {
- this.$('.o_thread_composer').remove();
- }
- }
- return def;
- },
-
- //--------------------------------------------------------------------------
- // Private
- //--------------------------------------------------------------------------
-
- /**
- * Overrides to prevent from displaying a composer if there is no operator
- * available.
- *
- * @override
- * @private
- */
- _needsComposer: function () {
- var channel = this.call('mail_service', 'getChannel', this._getThreadID());
- if (
- channel &&
- channel.getType() === 'support_channel' &&
- !channel.isAvailable()
- ) {
- return false;
- }
- return this._super.apply(this, arguments);
- },
-});
-
-});