diff --git a/mail_read_new_window/README.rst b/mail_read_new_window/README.rst new file mode 100644 index 00000000..a308839b --- /dev/null +++ b/mail_read_new_window/README.rst @@ -0,0 +1,56 @@ +.. 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. + +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..7c3012c3 --- /dev/null +++ b/mail_read_new_window/__openerp__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################### +# +# Copyright (C) 2015 initOS GmbH (). +# +# 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': 'Mail open in new window', + 'summary': 'Open mail in new window', + 'version': '1.0', + "category": "Social Network", + 'website': 'http://www.initos.com, 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/i18n/mail_read_new_window.pot b/mail_read_new_window/i18n/mail_read_new_window.pot new file mode 100644 index 00000000..6b489f4a --- /dev/null +++ b/mail_read_new_window/i18n/mail_read_new_window.pot @@ -0,0 +1,31 @@ +# 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 11:19+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_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 "" + +#. 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 "" + 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..8c06554f --- /dev/null +++ b/mail_read_new_window/static/src/js/mail_read_new_window.js @@ -0,0 +1,27 @@ + +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 @@ + +