You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.0 KiB
28 lines
1.0 KiB
/* Copyright 2018 Camptocamp SA
|
|
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */
|
|
odoo.define('web_send_message_popup.Chatter', function (require) {
|
|
"use strict";
|
|
|
|
var Chatter = require('mail.Chatter');
|
|
|
|
Chatter.include({
|
|
_onOpenComposerMessage: function () {
|
|
// wait for composer input to be initialized
|
|
// taken from http://stackoverflow.com/questions/7307983/while-variable-is-not-defined-wait
|
|
var self = this;
|
|
$.when(this._super.apply(this, arguments)).then(function () {
|
|
function checkVariable() {
|
|
if (typeof self.composer !== 'undefined' && typeof self.composer.$input !== 'undefined') {
|
|
self.composer.on_open_full_composer();
|
|
}
|
|
else {
|
|
setTimeout(function () {
|
|
checkVariable();
|
|
}, 50);
|
|
}
|
|
}
|
|
checkVariable();
|
|
});
|
|
}
|
|
});
|
|
});
|