Browse Source

Move mail_full_expand from [odoo-grupoesoc-addons][1].

[1]: https://github.com/grupoesoc/odoo-grupoesoc-addons
pull/13/head
Jairo Llopis 9 years ago
parent
commit
1e8cbfd99f
  1. 67
      mail_full_expand/README.rst
  2. 0
      mail_full_expand/__init__.py
  3. 26
      mail_full_expand/__openerp__.py
  4. 35
      mail_full_expand/i18n/es.po
  5. 34
      mail_full_expand/i18n/mail_full_expand.pot
  6. BIN
      mail_full_expand/static/description/icon.png
  7. 12
      mail_full_expand/static/src/css/mail_full_expand.css
  8. 26
      mail_full_expand/static/src/js/mail_full_expand.js
  9. 14
      mail_full_expand/static/src/xml/mail_full_expand.xml
  10. 21
      mail_full_expand/views/assets.xml
  11. 46
      mail_full_expand/views/mail_full_expand.xml

67
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 <https://github.com/OCA/social/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 <https://github.com/OCA/social/issues/new?body=module:%20mail_full_expand%0Aversion:%208.0.3.0.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits
=======
Contributors
------------
* Jairo Llopis <j.llopis@grupoesoc.es>
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.

0
mail_full_expand/__init__.py

26
mail_full_expand/__openerp__.py

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# © 2014-2015 Grupo ESOC <http://www.grupoesoc.es>
# 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",
],
}

35
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 <j.llopis@grupoesoc.es>\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"

34
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 ""

BIN
mail_full_expand/static/description/icon.png

After

Width: 100  |  Height: 100  |  Size: 3.9 KiB

12
mail_full_expand/static/src/css/mail_full_expand.css

@ -0,0 +1,12 @@
/* © 2014-2015 Grupo ESOC <http://www.grupoesoc.es>
* License AGPL-3.0 or later (http://www.gnu.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);
}

26
mail_full_expand/static/src/js/mail_full_expand.js

@ -0,0 +1,26 @@
/* © 2014-2015 Grupo ESOC <http://www.grupoesoc.es>
* 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);
});
}
});
};

14
mail_full_expand/static/src/xml/mail_full_expand.xml

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- © 2014-2015 Grupo ESOC <http://www.grupoesoc.es>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<template>
<t t-extend="mail.thread.message">
<t t-jquery=".oe_msg_icons" t-operation="append">
<span class="oe_full_expand">
<a title="Fully expand" class="oe_e">Ñ</a>
</span>
</t>
</t>
</template>

21
mail_full_expand/views/assets.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- © 2014-2015 Grupo ESOC <http://www.grupoesoc.es>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<openerp>
<data>
<template id="assets_backend"
name="mail_full_expand assets"
inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet"
href="/mail_full_expand/static/src/css/mail_full_expand.css"/>
<script type="text/javascript"
src="/mail_full_expand/static/src/js/mail_full_expand.js"/>
</xpath>
</template>
</data>
</openerp>

46
mail_full_expand/views/mail_full_expand.xml

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- © 2014-2015 Grupo ESOC <http://www.grupoesoc.es>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<openerp>
<data>
<record id="view" model="ir.ui.view">
<field name="name">mail.message.full_expand</field>
<field name="model">mail.message</field>
<field name="arch" type="xml">
<form string="Message" version="7.0">
<group>
<field name="author_id" readonly="1"/>
<field name="email_from" readonly="1"/>
<field name="date" readonly="1"/>
<field name="partner_ids"
widget="many2many_tags"
readonly="1"/>
<field name="notified_partner_ids"
widget="many2many_tags"
readonly="1"/>
</group>
<h1><field name="subject" readonly="1"/></h1>
<field name="body" readonly="1"/>
<field name="attachment_ids"
widget="many2many_binary"
readonly="1"/>
</form>
</field>
</record>
<record id="act_window" model="ir.actions.act_window">
<field name="name">Read Full Email</field>
<field name="res_model">mail.message</field>
<field name="src_model">mail.message</field>
<field name="type">ir.actions.act_window</field>
<field name="view_id" ref="view"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</openerp>
Loading…
Cancel
Save