From 303f7a0aae8795ef5e16c4c9e211d2aeb15ad397 Mon Sep 17 00:00:00 2001 From: Guewen Baconnier Date: Fri, 25 Apr 2014 11:08:41 +0200 Subject: [PATCH 1/9] Add module web_send_message_popup changing the 'Send a message' link to open directly the full featured message popup --- web_send_message_popup/__init__.py | 1 + web_send_message_popup/__openerp__.py | 49 +++++++++++++++++++ .../static/src/xml/mail.xml | 11 +++++ 3 files changed, 61 insertions(+) create mode 100644 web_send_message_popup/__init__.py create mode 100644 web_send_message_popup/__openerp__.py create mode 100644 web_send_message_popup/static/src/xml/mail.xml diff --git a/web_send_message_popup/__init__.py b/web_send_message_popup/__init__.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/web_send_message_popup/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/web_send_message_popup/__openerp__.py b/web_send_message_popup/__openerp__.py new file mode 100644 index 00000000..2cbc0557 --- /dev/null +++ b/web_send_message_popup/__openerp__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Guewen Baconnier +# Copyright 2014 Camptocamp SA +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +{'name': 'Web Send Message as Popup', + 'version': '1.0', + 'author': 'Camptocamp', + 'maintainer': 'Camptocamp', + 'license': 'AGPL-3', + 'category': 'Hidden', + 'depends': ['web', + ], + 'description': """ +Web Send Message as Popup +========================= + +In the email/notes threads below the form views, the link 'Send a +message' unfold a text field. From there, a button allows to open the +text field in a full featured email popup with the subject, templates, +attachments and followers. + +This module changes the link 'Send a message' so it opens directly the +full featured popup instead of the text field, avoiding an extra click +if the popup is always wanted. + + """, + 'website': 'http://www.camptocamp.com', + 'qweb': ['static/src/xml/mail.xml', + ], + 'installable': True, + 'auto_install': False, +} diff --git a/web_send_message_popup/static/src/xml/mail.xml b/web_send_message_popup/static/src/xml/mail.xml new file mode 100644 index 00000000..21029a47 --- /dev/null +++ b/web_send_message_popup/static/src/xml/mail.xml @@ -0,0 +1,11 @@ + + From 7c2cd54f16fc0211363aac6bed68d14087bf74f6 Mon Sep 17 00:00:00 2001 From: Holger Brunn Date: Mon, 7 Jul 2014 13:11:28 +0200 Subject: [PATCH 2/9] move all addons to __unported__, set all addons as not installable --- web_send_message_popup/__init__.py | 1 - web_send_message_popup/__openerp__.py | 49 ------------------- .../static/src/xml/mail.xml | 11 ----- 3 files changed, 61 deletions(-) delete mode 100644 web_send_message_popup/__init__.py delete mode 100644 web_send_message_popup/__openerp__.py delete mode 100644 web_send_message_popup/static/src/xml/mail.xml diff --git a/web_send_message_popup/__init__.py b/web_send_message_popup/__init__.py deleted file mode 100644 index 40a96afc..00000000 --- a/web_send_message_popup/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/web_send_message_popup/__openerp__.py b/web_send_message_popup/__openerp__.py deleted file mode 100644 index 2cbc0557..00000000 --- a/web_send_message_popup/__openerp__.py +++ /dev/null @@ -1,49 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################## -# -# Author: Guewen Baconnier -# Copyright 2014 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - -{'name': 'Web Send Message as Popup', - 'version': '1.0', - 'author': 'Camptocamp', - 'maintainer': 'Camptocamp', - 'license': 'AGPL-3', - 'category': 'Hidden', - 'depends': ['web', - ], - 'description': """ -Web Send Message as Popup -========================= - -In the email/notes threads below the form views, the link 'Send a -message' unfold a text field. From there, a button allows to open the -text field in a full featured email popup with the subject, templates, -attachments and followers. - -This module changes the link 'Send a message' so it opens directly the -full featured popup instead of the text field, avoiding an extra click -if the popup is always wanted. - - """, - 'website': 'http://www.camptocamp.com', - 'qweb': ['static/src/xml/mail.xml', - ], - 'installable': True, - 'auto_install': False, -} diff --git a/web_send_message_popup/static/src/xml/mail.xml b/web_send_message_popup/static/src/xml/mail.xml deleted file mode 100644 index 21029a47..00000000 --- a/web_send_message_popup/static/src/xml/mail.xml +++ /dev/null @@ -1,11 +0,0 @@ - - From b1810db7d7d29a4b96ad0c6d73f04734c44bf7a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Tue, 13 Oct 2015 16:59:21 +0200 Subject: [PATCH 3/9] [MOV] move addons out of __unported__ (they remain not installable) --- web_send_message_popup/__init__.py | 1 + web_send_message_popup/__openerp__.py | 49 +++++++++++++++++++ .../static/src/xml/mail.xml | 11 +++++ 3 files changed, 61 insertions(+) create mode 100644 web_send_message_popup/__init__.py create mode 100644 web_send_message_popup/__openerp__.py create mode 100644 web_send_message_popup/static/src/xml/mail.xml diff --git a/web_send_message_popup/__init__.py b/web_send_message_popup/__init__.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/web_send_message_popup/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/web_send_message_popup/__openerp__.py b/web_send_message_popup/__openerp__.py new file mode 100644 index 00000000..605174de --- /dev/null +++ b/web_send_message_popup/__openerp__.py @@ -0,0 +1,49 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Author: Guewen Baconnier +# Copyright 2014 Camptocamp SA +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + +{'name': 'Web Send Message as Popup', + 'version': '1.0', + 'author': "Camptocamp,Odoo Community Association (OCA)", + 'maintainer': 'Camptocamp', + 'license': 'AGPL-3', + 'category': 'Hidden', + 'depends': ['web', + ], + 'description': """ +Web Send Message as Popup +========================= + +In the email/notes threads below the form views, the link 'Send a +message' unfold a text field. From there, a button allows to open the +text field in a full featured email popup with the subject, templates, +attachments and followers. + +This module changes the link 'Send a message' so it opens directly the +full featured popup instead of the text field, avoiding an extra click +if the popup is always wanted. + + """, + 'website': 'http://www.camptocamp.com', + 'qweb': ['static/src/xml/mail.xml', + ], + 'installable': False, + 'auto_install': False, +} diff --git a/web_send_message_popup/static/src/xml/mail.xml b/web_send_message_popup/static/src/xml/mail.xml new file mode 100644 index 00000000..21029a47 --- /dev/null +++ b/web_send_message_popup/static/src/xml/mail.xml @@ -0,0 +1,11 @@ + + From 8962fd3375b81d9db210ee8f67f38d35e719c287 Mon Sep 17 00:00:00 2001 From: Yannick Vaucher Date: Thu, 2 Jun 2016 17:18:17 +0200 Subject: [PATCH 4/9] [9.0] [PORT] web_send_message_popup --- web_send_message_popup/README.rst | 59 +++++++++++++++++++ web_send_message_popup/__openerp__.py | 46 +++------------ .../static/src/js/chatter.js | 29 +++++++++ .../static/src/xml/mail.xml | 11 ---- .../views/web_send_message_popup.xml | 8 +++ 5 files changed, 103 insertions(+), 50 deletions(-) create mode 100644 web_send_message_popup/README.rst create mode 100644 web_send_message_popup/static/src/js/chatter.js delete mode 100644 web_send_message_popup/static/src/xml/mail.xml create mode 100644 web_send_message_popup/views/web_send_message_popup.xml diff --git a/web_send_message_popup/README.rst b/web_send_message_popup/README.rst new file mode 100644 index 00000000..4dd04b23 --- /dev/null +++ b/web_send_message_popup/README.rst @@ -0,0 +1,59 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +========================= +Web Send Message as Popup +========================= + +In the email/notes threads below the form views, the link 'Send a +message' unfold a text field. From there, a button allows to open the +text field in a full featured email popup with the subject, templates, +attachments and followers. + +This module changes the link 'Send a message' so it opens directly the +full featured popup instead of the text field, avoiding an extra click +if the popup is always wanted. + + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/162/9.0 + + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Guewen Baconnier +* Yannick Vaucher + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/web_send_message_popup/__openerp__.py b/web_send_message_popup/__openerp__.py index 605174de..0a820d6b 100644 --- a/web_send_message_popup/__openerp__.py +++ b/web_send_message_popup/__openerp__.py @@ -1,49 +1,17 @@ # -*- coding: utf-8 -*- -############################################################################## -# -# Author: Guewen Baconnier -# Copyright 2014 Camptocamp SA -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as -# published by the Free Software Foundation, either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Affero General Public License for more details. -# -# You should have received a copy of the GNU Affero General Public License -# along with this program. If not, see . -# -############################################################################## - +# © 2014-2016 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). {'name': 'Web Send Message as Popup', - 'version': '1.0', - 'author': "Camptocamp,Odoo Community Association (OCA)", + 'version': '9.0.1.0.0', + 'author': "Camptocamp, Odoo Community Association (OCA)", 'maintainer': 'Camptocamp', 'license': 'AGPL-3', 'category': 'Hidden', 'depends': ['web', ], - 'description': """ -Web Send Message as Popup -========================= - -In the email/notes threads below the form views, the link 'Send a -message' unfold a text field. From there, a button allows to open the -text field in a full featured email popup with the subject, templates, -attachments and followers. - -This module changes the link 'Send a message' so it opens directly the -full featured popup instead of the text field, avoiding an extra click -if the popup is always wanted. - - """, 'website': 'http://www.camptocamp.com', - 'qweb': ['static/src/xml/mail.xml', + 'data': ['views/web_send_message_popup.xml' ], - 'installable': False, + 'installable': True, 'auto_install': False, -} + } diff --git a/web_send_message_popup/static/src/js/chatter.js b/web_send_message_popup/static/src/js/chatter.js new file mode 100644 index 00000000..d15dfd97 --- /dev/null +++ b/web_send_message_popup/static/src/js/chatter.js @@ -0,0 +1,29 @@ +/* © 2016 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 core = require('web.core'); +var composer = require('mail.composer'); +var Chatter = core.form_widget_registry.get('mail_thread'); + +Chatter.include({ + on_open_composer_new_message: function () { + var self = this; + this.open_composer(); + // wait for composer input to be initialized + // taken from http://stackoverflow.com/questions/7307983/while-variable-is-not-defined-wait + function checkVariable() { + if (typeof self.composer !== 'undefined' && typeof self.composer.$input !== 'undefined') { + self.composer.on_open_full_composer(); + } + else { + setTimeout(function() { + checkVariable(); + }, 50); + } + } + checkVariable(); + } +}); +}); diff --git a/web_send_message_popup/static/src/xml/mail.xml b/web_send_message_popup/static/src/xml/mail.xml deleted file mode 100644 index 21029a47..00000000 --- a/web_send_message_popup/static/src/xml/mail.xml +++ /dev/null @@ -1,11 +0,0 @@ - - diff --git a/web_send_message_popup/views/web_send_message_popup.xml b/web_send_message_popup/views/web_send_message_popup.xml new file mode 100644 index 00000000..4acc483e --- /dev/null +++ b/web_send_message_popup/views/web_send_message_popup.xml @@ -0,0 +1,8 @@ + + + + From 68077a31cf9d7621bd36e30ec668401fa77a8882 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 6 Oct 2016 16:12:54 +0200 Subject: [PATCH 5/9] [MIG] Make modules uninstallable --- web_send_message_popup/__openerp__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_send_message_popup/__openerp__.py b/web_send_message_popup/__openerp__.py index 0a820d6b..b5473afd 100644 --- a/web_send_message_popup/__openerp__.py +++ b/web_send_message_popup/__openerp__.py @@ -12,6 +12,6 @@ 'website': 'http://www.camptocamp.com', 'data': ['views/web_send_message_popup.xml' ], - 'installable': True, + 'installable': False, 'auto_install': False, } From 383facfce1bb304cda980a8d7ad3074e07c71c7b Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 6 Oct 2016 16:13:01 +0200 Subject: [PATCH 6/9] [MIG] Rename manifest files --- web_send_message_popup/{__openerp__.py => __manifest__.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename web_send_message_popup/{__openerp__.py => __manifest__.py} (100%) diff --git a/web_send_message_popup/__openerp__.py b/web_send_message_popup/__manifest__.py similarity index 100% rename from web_send_message_popup/__openerp__.py rename to web_send_message_popup/__manifest__.py From 18adf56e584ab257b1bff24daf47fbd7455c92b0 Mon Sep 17 00:00:00 2001 From: Nicolas JEUDY Date: Mon, 12 Dec 2016 23:48:00 +0100 Subject: [PATCH 7/9] [MIG] web_send_message_popup 10.0 migration (#504) * Intitial manifest changes * [FIX] small README tricks --- web_send_message_popup/README.rst | 5 ++++- web_send_message_popup/__manifest__.py | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/web_send_message_popup/README.rst b/web_send_message_popup/README.rst index 4dd04b23..686ec9c5 100644 --- a/web_send_message_popup/README.rst +++ b/web_send_message_popup/README.rst @@ -18,12 +18,14 @@ if the popup is always wanted. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/162/9.0 + :target: https://runbot.odoo-community.org/runbot/162/10.0 Bug Tracker =========== +This module was tested on Odoo 10.0 community and enterprise. + Bugs are tracked on `GitHub Issues `_. In case of trouble, please check there if your issue has already been reported. If you spotted it first, @@ -42,6 +44,7 @@ Contributors * Guewen Baconnier * Yannick Vaucher +* Nicolas JEUDY Maintainer ---------- diff --git a/web_send_message_popup/__manifest__.py b/web_send_message_popup/__manifest__.py index b5473afd..cc26c63f 100644 --- a/web_send_message_popup/__manifest__.py +++ b/web_send_message_popup/__manifest__.py @@ -2,7 +2,7 @@ # © 2014-2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). {'name': 'Web Send Message as Popup', - 'version': '9.0.1.0.0', + 'version': '10.0.1.0.0', 'author': "Camptocamp, Odoo Community Association (OCA)", 'maintainer': 'Camptocamp', 'license': 'AGPL-3', @@ -12,6 +12,6 @@ 'website': 'http://www.camptocamp.com', 'data': ['views/web_send_message_popup.xml' ], - 'installable': False, + 'installable': True, 'auto_install': False, } From 215037800c0020d544e5b612ede9dc3186bb95ef Mon Sep 17 00:00:00 2001 From: oca-travis Date: Sun, 24 Jun 2018 01:39:36 +0000 Subject: [PATCH 8/9] [UPD] Update web_send_message_popup.pot --- .../i18n/web_send_message_popup.pot | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 web_send_message_popup/i18n/web_send_message_popup.pot diff --git a/web_send_message_popup/i18n/web_send_message_popup.pot b/web_send_message_popup/i18n/web_send_message_popup.pot new file mode 100644 index 00000000..b662aad9 --- /dev/null +++ b/web_send_message_popup/i18n/web_send_message_popup.pot @@ -0,0 +1,14 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + From 70f347784f65df6a7416aad517bed663d8de83a1 Mon Sep 17 00:00:00 2001 From: Artem Kostyuk Date: Fri, 28 Sep 2018 17:42:15 +0300 Subject: [PATCH 9/9] [11.0][MIG] web_send_message_popup: Migrate to 11.0 --- web_send_message_popup/README.rst | 62 ------------------- web_send_message_popup/__init__.py | 1 - web_send_message_popup/__manifest__.py | 35 ++++++----- .../i18n/web_send_message_popup.pot | 14 ----- .../readme/CONTRIBUTORS.rst | 4 ++ web_send_message_popup/readme/DESCRIPTION.rst | 8 +++ web_send_message_popup/readme/ROADMAP.rst | 3 + .../static/src/js/chatter.js | 45 +++++++------- .../assets.xml} | 2 +- 9 files changed, 56 insertions(+), 118 deletions(-) delete mode 100644 web_send_message_popup/README.rst delete mode 100644 web_send_message_popup/i18n/web_send_message_popup.pot create mode 100644 web_send_message_popup/readme/CONTRIBUTORS.rst create mode 100644 web_send_message_popup/readme/DESCRIPTION.rst create mode 100644 web_send_message_popup/readme/ROADMAP.rst rename web_send_message_popup/{views/web_send_message_popup.xml => templates/assets.xml} (88%) diff --git a/web_send_message_popup/README.rst b/web_send_message_popup/README.rst deleted file mode 100644 index 686ec9c5..00000000 --- a/web_send_message_popup/README.rst +++ /dev/null @@ -1,62 +0,0 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - -========================= -Web Send Message as Popup -========================= - -In the email/notes threads below the form views, the link 'Send a -message' unfold a text field. From there, a button allows to open the -text field in a full featured email popup with the subject, templates, -attachments and followers. - -This module changes the link 'Send a message' so it opens directly the -full featured popup instead of the text field, avoiding an extra click -if the popup is always wanted. - - -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/162/10.0 - - -Bug Tracker -=========== - -This module was tested on Odoo 10.0 community and enterprise. - -Bugs are tracked on `GitHub Issues -`_. In case of trouble, please -check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed feedback. - -Credits -======= - -Images ------- - -* Odoo Community Association: `Icon `_. - -Contributors ------------- - -* Guewen Baconnier -* Yannick Vaucher -* Nicolas JEUDY - -Maintainer ----------- - -.. image:: https://odoo-community.org/logo.png - :alt: Odoo Community Association - :target: https://odoo-community.org - -This module is maintained by the OCA. - -OCA, or the Odoo Community Association, is a nonprofit organization whose -mission is to support the collaborative development of Odoo features and -promote its widespread use. - -To contribute to this module, please visit https://odoo-community.org. diff --git a/web_send_message_popup/__init__.py b/web_send_message_popup/__init__.py index 40a96afc..e69de29b 100644 --- a/web_send_message_popup/__init__.py +++ b/web_send_message_popup/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/web_send_message_popup/__manifest__.py b/web_send_message_popup/__manifest__.py index cc26c63f..5d3de433 100644 --- a/web_send_message_popup/__manifest__.py +++ b/web_send_message_popup/__manifest__.py @@ -1,17 +1,18 @@ -# -*- coding: utf-8 -*- -# © 2014-2016 Camptocamp SA -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -{'name': 'Web Send Message as Popup', - 'version': '10.0.1.0.0', - 'author': "Camptocamp, Odoo Community Association (OCA)", - 'maintainer': 'Camptocamp', - 'license': 'AGPL-3', - 'category': 'Hidden', - 'depends': ['web', - ], - 'website': 'http://www.camptocamp.com', - 'data': ['views/web_send_message_popup.xml' - ], - 'installable': True, - 'auto_install': False, - } +# Copyright 2014-2018 Camptocamp SA +# License AGPL-3.0 or later (http://gnu.org/licenses/agpl). +{ + 'name': 'Web Send Message as Popup', + 'version': '11.0.1.0.0', + 'author': "Camptocamp, Odoo Community Association (OCA)", + 'maintainer': 'Camptocamp', + 'license': 'AGPL-3', + 'category': 'Hidden', + 'depends': [ + 'web', + 'mail', + ], + 'website': 'https://github.com/OCA/web', + 'data': [ + 'templates/assets.xml', + ], +} diff --git a/web_send_message_popup/i18n/web_send_message_popup.pot b/web_send_message_popup/i18n/web_send_message_popup.pot deleted file mode 100644 index b662aad9..00000000 --- a/web_send_message_popup/i18n/web_send_message_popup.pot +++ /dev/null @@ -1,14 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 10.0\n" -"Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - diff --git a/web_send_message_popup/readme/CONTRIBUTORS.rst b/web_send_message_popup/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..614c0f83 --- /dev/null +++ b/web_send_message_popup/readme/CONTRIBUTORS.rst @@ -0,0 +1,4 @@ +* Guewen Baconnier +* Yannick Vaucher +* Nicolas JEUDY +* Artem Kostyuk diff --git a/web_send_message_popup/readme/DESCRIPTION.rst b/web_send_message_popup/readme/DESCRIPTION.rst new file mode 100644 index 00000000..c661e1b3 --- /dev/null +++ b/web_send_message_popup/readme/DESCRIPTION.rst @@ -0,0 +1,8 @@ +In the email/notes threads below the form views, the link 'Send a +message' unfold a text field. From there, a button allows to open the +text field in a full featured email popup with the subject, templates, +attachments and followers. + +This module changes the link 'Send a message' so it opens directly the +full featured popup instead of the text field, avoiding an extra click +if the popup is always wanted. diff --git a/web_send_message_popup/readme/ROADMAP.rst b/web_send_message_popup/readme/ROADMAP.rst new file mode 100644 index 00000000..ca2a85a2 --- /dev/null +++ b/web_send_message_popup/readme/ROADMAP.rst @@ -0,0 +1,3 @@ +* works even if bit flickering as it renders 1st the std widget and then shows the + other one. @simahawk checked the code and unfortunately seems there's no good + way to hook if not overriding whole big functions. diff --git a/web_send_message_popup/static/src/js/chatter.js b/web_send_message_popup/static/src/js/chatter.js index d15dfd97..89f88544 100644 --- a/web_send_message_popup/static/src/js/chatter.js +++ b/web_send_message_popup/static/src/js/chatter.js @@ -1,29 +1,28 @@ -/* © 2016 Camptocamp SA +/* 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"; + "use strict"; -var core = require('web.core'); -var composer = require('mail.composer'); -var Chatter = core.form_widget_registry.get('mail_thread'); + var Chatter = require('mail.Chatter'); -Chatter.include({ - on_open_composer_new_message: function () { - var self = this; - this.open_composer(); - // wait for composer input to be initialized - // taken from http://stackoverflow.com/questions/7307983/while-variable-is-not-defined-wait - function checkVariable() { - if (typeof self.composer !== 'undefined' && typeof self.composer.$input !== 'undefined') { - self.composer.on_open_full_composer(); - } - else { - setTimeout(function() { - checkVariable(); - }, 50); - } + 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(); + }); } - checkVariable(); - } -}); + }); }); diff --git a/web_send_message_popup/views/web_send_message_popup.xml b/web_send_message_popup/templates/assets.xml similarity index 88% rename from web_send_message_popup/views/web_send_message_popup.xml rename to web_send_message_popup/templates/assets.xml index 4acc483e..6634d738 100644 --- a/web_send_message_popup/views/web_send_message_popup.xml +++ b/web_send_message_popup/templates/assets.xml @@ -2,7 +2,7 @@