diff --git a/README.md b/README.md index 068d099d..36a3b26c 100644 --- a/README.md +++ b/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 diff --git a/mail_full_expand/README.rst b/mail_full_expand/README.rst index 34da9eb5..8ce21532 100644 --- a/mail_full_expand/README.rst +++ b/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 ===== diff --git a/mail_read_new_window/README.rst b/mail_read_new_window/README.rst new file mode 100644 index 00000000..d60b9e46 --- /dev/null +++ b/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 `_. +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 +------------ + +* Peter Hahn + +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_read_new_window/__init__.py b/mail_read_new_window/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/mail_read_new_window/__openerp__.py b/mail_read_new_window/__openerp__.py new file mode 100644 index 00000000..2fb91c2e --- /dev/null +++ b/mail_read_new_window/__openerp__.py @@ -0,0 +1,26 @@ +# -*- coding: utf-8 -*- +# © 2015 initOS GmbH () +# 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', + ], +} diff --git a/mail_read_new_window/i18n/de.po b/mail_read_new_window/i18n/de.po new file mode 100644 index 00000000..7d6bb2cb --- /dev/null +++ b/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" diff --git a/mail_read_new_window/mail_read_new_window_view.xml b/mail_read_new_window/mail_read_new_window_view.xml new file mode 100644 index 00000000..c1339307 --- /dev/null +++ b/mail_read_new_window/mail_read_new_window_view.xml @@ -0,0 +1,13 @@ + + + + + + + + diff --git a/mail_read_new_window/static/description/icon.png b/mail_read_new_window/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/mail_read_new_window/static/description/icon.png differ diff --git a/mail_read_new_window/static/src/css/mail_read_new_window.css b/mail_read_new_window/static/src/css/mail_read_new_window.css new file mode 100644 index 00000000..14d02947 --- /dev/null +++ b/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); +} diff --git a/mail_read_new_window/static/src/js/mail_read_new_window.js b/mail_read_new_window/static/src/js/mail_read_new_window.js new file mode 100644 index 00000000..152df744 --- /dev/null +++ b/mail_read_new_window/static/src/js/mail_read_new_window.js @@ -0,0 +1,30 @@ +/* © 2015 initOS GmbH () +* 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); + } + }); +} diff --git a/mail_read_new_window/static/src/xml/mail_read_new_window.xml b/mail_read_new_window/static/src/xml/mail_read_new_window.xml new file mode 100644 index 00000000..17e8e367 --- /dev/null +++ b/mail_read_new_window/static/src/xml/mail_read_new_window.xml @@ -0,0 +1,10 @@ + +