diff --git a/mail_full_expand/__openerp__.py b/mail_full_expand/__manifest__.py similarity index 86% rename from mail_full_expand/__openerp__.py rename to mail_full_expand/__manifest__.py index 75b6c125..bfc17969 100644 --- a/mail_full_expand/__openerp__.py +++ b/mail_full_expand/__manifest__.py @@ -5,9 +5,9 @@ { "name": "Mail full expand", "summary": "Expand mail in a big window", - "version": "8.0.3.0.0", + "version": "10.0.1.0.0", "category": "Social Network", - "website": "http://www.grupoesoc.es, https://odoo-community.org/", + "website": "http://www.grupoesoc.es/", "author": "Grupo ESOC, Odoo Community Association (OCA)", "license": "AGPL-3", "application": False, diff --git a/mail_full_expand/static/src/css/mail_full_expand.css b/mail_full_expand/static/src/css/mail_full_expand.css deleted file mode 100644 index 18c21cc8..00000000 --- a/mail_full_expand/static/src/css/mail_full_expand.css +++ /dev/null @@ -1,12 +0,0 @@ -/* © 2014-2015 Grupo ESOC - * 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); -} diff --git a/mail_full_expand/static/src/css/mail_full_expand.less b/mail_full_expand/static/src/css/mail_full_expand.less new file mode 100644 index 00000000..93b6ea54 --- /dev/null +++ b/mail_full_expand/static/src/css/mail_full_expand.less @@ -0,0 +1,25 @@ +/* © 2014-2015 Grupo ESOC + * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + */ + +.o_mail_thread .o_thread_message { + .o_full_expand { + cursor: pointer; + opacity: 0; + margin-right: -5px; + padding: 4px; + } + + &.o_thread_selected_message .o_full_expand { + opacity: 0.6; + } + + &:hover { + .o_full_expand { + opacity: 0.6; + &:hover { + opacity: 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 index 76fd2a52..15dd6cd1 100644 --- a/mail_full_expand/static/src/js/mail_full_expand.js +++ b/mail_full_expand/static/src/js/mail_full_expand.js @@ -1,26 +1,29 @@ /* © 2014-2015 Grupo ESOC * License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). */ + odoo.define('mail_full_expand.expand', function (require) { +"use strict"; -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); - }, +var Thread = require('mail.ChatThread'); - 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; +Thread.include({ + events: _.defaults({ + "click .o_full_expand": "on_message_full_expand", + }, Thread.prototype.events), + + on_message_full_expand: function(event) { + // Get the action data and execute it to open the full view + var do_action = this.do_action, + msg_id = $(event.currentTarget).data('message-id'); - this.rpc("/web/action/load", { - "action_id": "mail_full_expand.act_window", - }) - .done(function(action) { - action.res_id = msg_id; - do_action(action); - }); - } - }); -}; + this.rpc("/web/action/load", { + "action_id": "mail_full_expand.mail_message_action", + }) + .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 index 4027ae9c..f76ca394 100644 --- a/mail_full_expand/static/src/xml/mail_full_expand.xml +++ b/mail_full_expand/static/src/xml/mail_full_expand.xml @@ -4,11 +4,10 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> diff --git a/mail_full_expand/views/assets.xml b/mail_full_expand/views/assets.xml index 0c472e48..6b3b5b6c 100644 --- a/mail_full_expand/views/assets.xml +++ b/mail_full_expand/views/assets.xml @@ -11,7 +11,7 @@ inherit_id="web.assets_backend"> + href="/mail_full_expand/static/src/css/mail_full_expand.less"/>