Browse Source

[MIG] mail_full_expand: Migrated to 10.0

pull/112/head
Damien Bouvy 8 years ago
parent
commit
a15f826b95
No known key found for this signature in database GPG Key ID: 1D0AB759B4B928E3
  1. 4
      mail_full_expand/__manifest__.py
  2. 12
      mail_full_expand/static/src/css/mail_full_expand.css
  3. 25
      mail_full_expand/static/src/css/mail_full_expand.less
  4. 23
      mail_full_expand/static/src/js/mail_full_expand.js
  5. 9
      mail_full_expand/static/src/xml/mail_full_expand.xml
  6. 2
      mail_full_expand/views/assets.xml
  7. 20
      mail_full_expand/views/mail_full_expand.xml

4
mail_full_expand/__manifest__.py

@ -5,13 +5,13 @@
{
"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/",
"author": "Grupo ESOC, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
'installable': False,
'installable': True,
"depends": [
"mail",
"web",

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

@ -1,12 +0,0 @@
/* © 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);
}

25
mail_full_expand/static/src/css/mail_full_expand.less

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

23
mail_full_expand/static/src/js/mail_full_expand.js

@ -1,21 +1,23 @@
/* © 2014-2015 Grupo ESOC <http://www.grupoesoc.es>
* 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() {
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 = this.id;
msg_id = $(event.currentTarget).data('message-id');
this.rpc("/web/action/load", {
"action_id": "mail_full_expand.act_window",
"action_id": "mail_full_expand.mail_message_action",
})
.done(function(action) {
action.res_id = msg_id;
@ -23,4 +25,5 @@ openerp.mail_full_expand = function (instance) {
});
}
});
};
});

9
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). -->
<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-extend="mail.ChatThread.Message">
<t t-jquery=".o_thread_message_needaction" t-operation="after">
<i class="fa o_full_expand fa-arrows-alt"
t-att-data-message-id="message.id" title="Fully Expand"/>
</t>
</t>
</template>

2
mail_full_expand/views/assets.xml

@ -11,7 +11,7 @@
inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link rel="stylesheet"
href="/mail_full_expand/static/src/css/mail_full_expand.css"/>
href="/mail_full_expand/static/src/css/mail_full_expand.less"/>
<script type="text/javascript"
src="/mail_full_expand/static/src/js/mail_full_expand.js"/>
</xpath>

20
mail_full_expand/views/mail_full_expand.xml

@ -3,14 +3,13 @@
<!-- © 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">
<odoo>
<record id="mail_message_view_form" model="ir.ui.view">
<field name="name">mail.message.full_expand</field>
<field name="model">mail.message</field>
<field name="priority">30</field>
<field name="arch" type="xml">
<form string="Message" version="7.0">
<form string="Message">
<group>
<field name="author_id" readonly="1"/>
<field name="email_from" readonly="1"/>
@ -18,9 +17,6 @@
<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"/>
@ -31,16 +27,14 @@
</field>
</record>
<record id="act_window" model="ir.actions.act_window">
<record id="mail_message_action" 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_id" ref="mail_message_view_form"/>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</openerp>
</odoo>
Loading…
Cancel
Save