forked from Techsystech/web
[MIG] web_send_message_popup: Migration to 14.0
parent
41e94da9bd
commit
aed09706be
|
@ -2,7 +2,7 @@
|
||||||
# License AGPL-3.0 or later (http://gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://gnu.org/licenses/agpl).
|
||||||
{
|
{
|
||||||
"name": "Web Send Message as Popup",
|
"name": "Web Send Message as Popup",
|
||||||
"version": "13.0.1.0.0",
|
"version": "14.0.1.0.0",
|
||||||
"author": "Camptocamp, Odoo Community Association (OCA)",
|
"author": "Camptocamp, Odoo Community Association (OCA)",
|
||||||
"maintainer": "Camptocamp",
|
"maintainer": "Camptocamp",
|
||||||
"license": "AGPL-3",
|
"license": "AGPL-3",
|
||||||
|
|
|
@ -3,3 +3,4 @@
|
||||||
* Nicolas JEUDY <https://github.com/njeudy>
|
* Nicolas JEUDY <https://github.com/njeudy>
|
||||||
* Artem Kostyuk <a.kostyuk@mobilunity.com>
|
* Artem Kostyuk <a.kostyuk@mobilunity.com>
|
||||||
* Stéphane Mangin <stephane.mangin@camptocamp.com>
|
* Stéphane Mangin <stephane.mangin@camptocamp.com>
|
||||||
|
* Helly kapatel <helly.kapatel@initos.com>
|
||||||
|
|
|
@ -1,17 +1,27 @@
|
||||||
/* Copyright 2019-2021 Camptocamp SA
|
/* Copyright 2019-2021 Camptocamp SA
|
||||||
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
|
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
|
||||||
odoo.define("web_send_message_popup.Chatter", function (require) {
|
odoo.define("web_send_message_popup/static/src/js/chatter.js", function (require) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
var Chatter = require("mail.Chatter");
|
const components = {
|
||||||
|
Composer: require("mail/static/src/components/chatter_topbar/chatter_topbar.js"),
|
||||||
|
};
|
||||||
|
const {patch} = require("web.utils");
|
||||||
|
|
||||||
Chatter.include({
|
patch(components.Composer, "web_send_message_popup/static/src/js/chatter.js", {
|
||||||
_onOpenComposerMessage: function () {
|
/**
|
||||||
|
* Overwrite to always launch full composer instead of quick messages
|
||||||
|
*/
|
||||||
|
_onClickSendMessage() {
|
||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
var self = this;
|
if (
|
||||||
this._suggestedPartnersProm.then(function () {
|
this.chatter.composer &&
|
||||||
self._composer._onOpenFullComposer();
|
this.chatter.isComposerVisible &&
|
||||||
});
|
!this.chatter.composer.isLog
|
||||||
|
) {
|
||||||
|
this.chatter.update({isComposerVisible: false});
|
||||||
|
this.chatter.composer.openFullComposer();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue