From 1e8cbfd99f69b1f16902ce2993381a7ddf93e43f Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Mon, 14 Sep 2015 10:18:17 +0200 Subject: [PATCH 1/3] Move mail_full_expand from [odoo-grupoesoc-addons][1]. [1]: https://github.com/grupoesoc/odoo-grupoesoc-addons --- mail_full_expand/README.rst | 67 ++++++++++++++++++ mail_full_expand/__init__.py | 0 mail_full_expand/__openerp__.py | 26 +++++++ mail_full_expand/i18n/es.po | 35 +++++++++ mail_full_expand/i18n/mail_full_expand.pot | 34 +++++++++ mail_full_expand/static/description/icon.png | Bin 0 -> 4023 bytes .../static/src/css/mail_full_expand.css | 12 ++++ .../static/src/js/mail_full_expand.js | 26 +++++++ .../static/src/xml/mail_full_expand.xml | 14 ++++ mail_full_expand/views/assets.xml | 21 ++++++ mail_full_expand/views/mail_full_expand.xml | 46 ++++++++++++ 11 files changed, 281 insertions(+) create mode 100644 mail_full_expand/README.rst create mode 100644 mail_full_expand/__init__.py create mode 100644 mail_full_expand/__openerp__.py create mode 100644 mail_full_expand/i18n/es.po create mode 100644 mail_full_expand/i18n/mail_full_expand.pot create mode 100644 mail_full_expand/static/description/icon.png create mode 100644 mail_full_expand/static/src/css/mail_full_expand.css create mode 100644 mail_full_expand/static/src/js/mail_full_expand.js create mode 100644 mail_full_expand/static/src/xml/mail_full_expand.xml create mode 100644 mail_full_expand/views/assets.xml create mode 100644 mail_full_expand/views/mail_full_expand.xml diff --git a/mail_full_expand/README.rst b/mail_full_expand/README.rst new file mode 100644 index 00000000..e24b5557 --- /dev/null +++ b/mail_full_expand/README.rst @@ -0,0 +1,67 @@ +.. 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 + +================ +Mail full expand +================ + +This module was written to extend the functionality of messaging to support +expanding messages in a big window and allow you to read its full content. + +Odoo automatically tries to remove blockquotes and signatures from received +mails. That is useful because it removes lots of distraction, but sometimes it +removes important information. + +Also, messages are narrow to fit in the conversations views, but sometimes you +receive a mail with predefined width and cannot read it. + +This module adds a button to all messages to read them in a floating window +with its full contents. + +Usage +===== + +To use this module, you need to: + +* Go to any view with a message thread. +* Click the *Fully expand* button (two arrows indicating separate directions). + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/205/8.0 + +For further information, please visit: + +* https://www.odoo.com/forum/help-1 + +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 +`here `_. + +Credits +======= + +Contributors +------------ + +* Jairo Llopis + +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 http://odoo-community.org. diff --git a/mail_full_expand/__init__.py b/mail_full_expand/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/mail_full_expand/__openerp__.py b/mail_full_expand/__openerp__.py new file mode 100644 index 00000000..75b6c125 --- /dev/null +++ b/mail_full_expand/__openerp__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# © 2014-2015 Grupo ESOC +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "Mail full expand", + "summary": "Expand mail in a big window", + "version": "8.0.3.0.0", + "category": "Social Network", + "website": "http://www.grupoesoc.es, https://odoo-community.org/", + "author": "Grupo ESOC, Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "depends": [ + "mail", + "web", + ], + "data": [ + "views/mail_full_expand.xml", + "views/assets.xml", + ], + "qweb": [ + "static/src/xml/mail_full_expand.xml", + ], +} diff --git a/mail_full_expand/i18n/es.po b/mail_full_expand/i18n/es.po new file mode 100644 index 00000000..8c993fc2 --- /dev/null +++ b/mail_full_expand/i18n/es.po @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_full_expand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 7.0-20140522-231211\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-14 10:17+0200\n" +"PO-Revision-Date: 2015-09-14 10:17+0200\n" +"Last-Translator: Jairo Llopis \n" +"Language-Team: \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: \n" +"X-Generator: Poedit 1.8.4\n" + +#. module: mail_full_expand +#. openerp-web +#: code:addons/mail_full_expand/static/src/xml/mail_full_expand.xml:10 +#, python-format +msgid "Fully expand" +msgstr "Expandir completamente" + +#. module: mail_full_expand +#: view:mail.message:mail_full_expand.view +msgid "Message" +msgstr "Mensaje" + +#. module: mail_full_expand +#: model:ir.actions.act_window,name:mail_full_expand.act_window +msgid "Read Full Email" +msgstr "Leer correo completo" diff --git a/mail_full_expand/i18n/mail_full_expand.pot b/mail_full_expand/i18n/mail_full_expand.pot new file mode 100644 index 00000000..6b6e4dd9 --- /dev/null +++ b/mail_full_expand/i18n/mail_full_expand.pot @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * mail_full_expand +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0-20150814\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-09-14 08:16+0000\n" +"PO-Revision-Date: 2015-09-14 08:16+0000\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" + +#. module: mail_full_expand +#. openerp-web +#: code:addons/mail_full_expand/static/src/xml/mail_full_expand.xml:10 +#, python-format +msgid "Fully expand" +msgstr "" + +#. module: mail_full_expand +#: view:mail.message:mail_full_expand.view +msgid "Message" +msgstr "" + +#. module: mail_full_expand +#: model:ir.actions.act_window,name:mail_full_expand.act_window +msgid "Read Full Email" +msgstr "" + diff --git a/mail_full_expand/static/description/icon.png b/mail_full_expand/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..4d83e27947f1f6e7c070f9ffcb41aaadd1cfabb4 GIT binary patch literal 4023 zcmV;o4@mHdP)=J33O~D1Q6_CY5BgPp=O`T&BgX8FoiDT*< zPUbjT#FLm~JWO1IRupv%8ubVmK!G4KlDM!aOUq)@AWQE{EnQXby*q!r>Y`hgbX8Y1 z)!p@-^G+?N-hH>e-}{z(-+kYMw4{`XzWAqnYjVs&QEXDvvxK5dMKBL3N(3@rLIK8> z2lx@xf~Z5vI-o`%{w7d2=+e|Egb3Of)d$l+;*`+3e5;B+9Vu=^Fbm1dxc{T%5JGGN zxlsuDk$qv~@idSa#J@KGc7gmC3D*LS1UJ7ESTCe_&c3+*Xd1|cK)hQ}f+AOgEC(`@ zcqkpHLGts=#SO2dfqY9EHWewhKzN}*ybR>@YcM7OQ8cfR~GdnU&0L4@oBK%DODfZKs$sDfd_y`A`s4(^wJQrBSh~25|X_Mh|_HWN+Z_r2wl0*BqYcD*@)g@A+0$# zHivo#5T|=Ca0{^H!WQvuAUc)Jg?Pg@%!-Cg-Gwq5urC2=TGBxj1J469f!z3p>Vl6O zikVY%l(23}RUjddpLe$rCCM;u06qs6#tkE4CEIFCF$+DF-Bn1@%_$1R>CVULeiYaU z4C?;KP_q8ia8i6-Usc9UwZ~Eqh|@hA_zSQsaYJ>sVU{-`k^T^ zCJ{hbS6H_9nimt*rYV7z@j;K)%A#V;DCiSAhP=sXp{+X;iQr13XeIufai)bNE zcPa2%Wb{o>L8%Q4U~63|bBd}dwtG>f(xV_U%po4#dkyXbGe9cs$)63FMtQ}1?Ap}a z^FWN5*(ZVdJ@33FwZTl@JT{Jzjz-2h8hXTinS@Sb$j+i|x3TKz<;F2PA9gU1OL@h5 zc5Tv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org/licenses/agpl.html). + */ + +.openerp .oe_mail .oe_msg .oe_msg_icons .oe_full_expand:hover a{ + color: #BBBAFF; + text-shadow: 0px 1px #7C7BAD, + 0px -1px #7C7BAD, + -1px 0px #7C7BAD, + 1px 0px #7C7BAD, + 0px 3px 3px rgba(0, 0, 0, 0.1); +} diff --git a/mail_full_expand/static/src/js/mail_full_expand.js b/mail_full_expand/static/src/js/mail_full_expand.js new file mode 100644 index 00000000..76fd2a52 --- /dev/null +++ b/mail_full_expand/static/src/js/mail_full_expand.js @@ -0,0 +1,26 @@ +/* © 2014-2015 Grupo ESOC + * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + */ + +openerp.mail_full_expand = function (instance) { + instance.mail.ThreadMessage.include({ + bind_events: function () { + this._super.apply(this, arguments); + this.$('.oe_full_expand').on('click', this.on_message_full_expand); + }, + + on_message_full_expand: function() { + // Get the action data and execute it to open the full view + var do_action = this.do_action, + msg_id = this.id; + + this.rpc("/web/action/load", { + "action_id": "mail_full_expand.act_window", + }) + .done(function(action) { + action.res_id = msg_id; + do_action(action); + }); + } + }); +}; diff --git a/mail_full_expand/static/src/xml/mail_full_expand.xml b/mail_full_expand/static/src/xml/mail_full_expand.xml new file mode 100644 index 00000000..4027ae9c --- /dev/null +++ b/mail_full_expand/static/src/xml/mail_full_expand.xml @@ -0,0 +1,14 @@ + + + + + diff --git a/mail_full_expand/views/assets.xml b/mail_full_expand/views/assets.xml new file mode 100644 index 00000000..0c472e48 --- /dev/null +++ b/mail_full_expand/views/assets.xml @@ -0,0 +1,21 @@ + + + + + + + +