mirror of https://github.com/OCA/social.git
[MIG] mail_full_expand: Migrated to 10.0
parent
e8a1a588cd
commit
6a91201c09
|
@ -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,
|
|
@ -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);
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,26 +1,29 @@
|
|||
/* © 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;
|
||||
do_action(action);
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
|
||||
});
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"/>
|
||||
|
@ -29,18 +25,16 @@
|
|||
readonly="1"/>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</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>
|
||||
</record>
|
||||
</odoo>
|
||||
|
|
Loading…
Reference in New Issue