Browse Source

Merge pull request #30 from initOS/8.0-mail_read_new_window

[ADD] mail_read_new_window addon
pull/37/head
Holger Brunn 9 years ago
parent
commit
84ae652455
  1. 1
      README.md
  2. 3
      mail_full_expand/README.rst
  3. 60
      mail_read_new_window/README.rst
  4. 0
      mail_read_new_window/__init__.py
  5. 26
      mail_read_new_window/__openerp__.py
  6. 32
      mail_read_new_window/i18n/de.po
  7. 13
      mail_read_new_window/mail_read_new_window_view.xml
  8. BIN
      mail_read_new_window/static/description/icon.png
  9. 9
      mail_read_new_window/static/src/css/mail_read_new_window.css
  10. 30
      mail_read_new_window/static/src/js/mail_read_new_window.js
  11. 10
      mail_read_new_window/static/src/xml/mail_read_new_window.xml

1
README.md

@ -16,6 +16,7 @@ addon | version | summary
[mail_compose_select_lang](mail_compose_select_lang/) | 8.0.1.0.0 | Select language in mail compose window
[mail_forward](mail_forward/) | 8.0.7.0.0 | Add option to forward messages
[mail_full_expand](mail_full_expand/) | 8.0.3.0.0 | Expand mail in a big window
[mail_read_new_window](mail_read_new_window/) | 8.0.1.0.0 | Open mail in a new window
[mail_restrict_follower_selection](mail_restrict_follower_selection/) | 8.0.1.0.0 | Define a domain from which followers can be selected
[mail_sent](mail_sent/) | 8.0.1.0.0 | Provide a view of sent mails
[marketing_security_group](marketing_security_group/) | 8.0.1.0.0 | Marketing extra security rules

3
mail_full_expand/README.rst

@ -19,6 +19,9 @@ 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 their full contents.
See also:
'mail_read_new_window' module to open mail in a new browser window.
Usage
=====

60
mail_read_new_window/README.rst

@ -0,0 +1,60 @@
.. 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 open in new window
=======================
This module was written to extend the functionality of messaging to support
opening messages in a new window and allow you to read its full content.
This module adds a button to all messages to open them in a new browser window
with their full contents.
See also:
'mail_full_expand' module to open mail in a new modal dialog on top of your
current window.
Usage
=====
To use this module, you need to:
* Go to any view with a message thread.
* Click the *Open in new window* button (two overlayed windows indicating a new window).
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%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
Credits
=======
Contributors
------------
* Peter Hahn <peter.hahn@initos.com>
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_read_new_window/__init__.py

26
mail_read_new_window/__openerp__.py

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# © 2015 initOS GmbH (<http://www.initos.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Mail open in new window',
'summary': 'Open mail in new window',
'version': '8.0.1.0.0',
"category": "Social Network",
'website': 'https://odoo-community.org',
'author': 'initOS GmbH, Odoo Community Association (OCA)',
"license": "AGPL-3",
'application': False,
'installable': True,
'auto_install': False,
'depends': [
'mail',
'web',
],
'data': [
'mail_read_new_window_view.xml',
],
'qweb': [
'static/src/xml/mail_read_new_window.xml',
],
}

32
mail_read_new_window/i18n/de.po

@ -0,0 +1,32 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mail_read_new_window
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-12-17 11:19+0000\n"
"PO-Revision-Date: 2015-12-17 12:21+0100\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 1.5.4\n"
"Language: de\n"
"X-Poedit-SourceCharset: UTF-8\n"
#. module: mail_read_new_window
#. openerp-web
#: code:addons/mail_read_new_window/static/src/xml/mail_read_new_window.xml:6
#, python-format
msgid "Open in new window"
msgstr "In neuem Fenster öffnen"
#. module: mail_read_new_window
#. openerp-web
#: code:addons/mail_read_new_window/static/src/js/mail_read_new_window.js:18
#, python-format
msgid "Open message in new window"
msgstr "Nachricht in neuem Fenster öffnen"

13
mail_read_new_window/mail_read_new_window_view.xml

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>
<template id="assets_backend" name="custom bar assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/mail_read_new_window/static/src/css/mail_read_new_window.css"/>
<script type="text/javascript" src="/mail_read_new_window/static/src/js/mail_read_new_window.js"></script>
</xpath>
</template>
</data>
</openerp>

BIN
mail_read_new_window/static/description/icon.png

After

Width: 128  |  Height: 128  |  Size: 9.2 KiB

9
mail_read_new_window/static/src/css/mail_read_new_window.css

@ -0,0 +1,9 @@
.openerp .oe_mail .oe_msg .oe_msg_icons .oe_mail_open:hover a {
color: #ffa1a1;
text-shadow: 0px 1px #ff0000,
0px -1px #ff0000,
-1px 0px #ff0000,
1px 0px #ff0000,
0px 3px 3px rgba(0,0,0,0.1);
}

30
mail_read_new_window/static/src/js/mail_read_new_window.js

@ -0,0 +1,30 @@
/* © 2015 initOS GmbH (<http://www.initos.com>)
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
*/
openerp.mail_read_new_window = function (instance) {
var _t = instance.web._t,
_lt = instance.web._lt;
instance.mail.ThreadMessage.include({
bind_events: function(){
this._super.apply(this, arguments);
this.$('.oe_mail_open').on('click', this.on_read_new_window)
},
on_read_new_window: function(event){
var self = this;
var _url = _.str.sprintf('#id=%s&view_type=form&model=mail.message',
this.id);
var action = {
name: _t('Open message in new window'),
type: 'ir.actions.act_url',
url: _url,
target: 'new',
};
self.do_action(action);
}
});
}

10
mail_read_new_window/static/src/xml/mail_read_new_window.xml

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<template>
<t t-extend="mail.thread.message">
<t t-jquery=".oe_msg_icons" t-operation="append">
<span t-attf-class="oe_mail_open">
<a title="Open in new window" class="oe_e">ò</a>
</span>
</t>
</t>
</template>
Loading…
Cancel
Save