[FIX] mail : fix style (css, js and xml) of topbar button of mail.compose.message

This commit is contained in:
Jérome Maes
2014-12-24 15:50:03 +01:00
parent c26c2a601e
commit 8667b2a57d
3 changed files with 12 additions and 32 deletions
+2 -22
View File
@@ -1,29 +1,9 @@
/* ------------ TOPBAR MAIL BUTTON --------------- */
/* FIXME this css is not very pretty because it uses a
* 'button' element wich comes with a lot of inappropriate
* styling. Entypo is also a headache to center properly
* */
.openerp .oe_topbar_item.oe_topbar_compose_full_email{
padding: 0px;
width: 32px;
height: 32px;
}
.oe_topbar_item.oe_topbar_compose_full_email button{
.oe_topbar_item.oe_topbar_compose_full_email *{
position: relative;
top: -3px; /* centering entypo ... urgh */
box-sizing: border-box;
border: none;
box-shadow: none;
color: white;
background: none;
text-shadow: 0px 1px 2px black;
width: 32px;
height: 32px;
padding: 0px;
margin: 0px
border-radius: 0px;
}
/* ------------ MAIL WIDGET --------------- */
.openerp .oe_mail, .openerp .oe_mail *{
-webkit-box-sizing: border-box;
+6 -8
View File
@@ -2045,6 +2045,7 @@ openerp.mail = function (session) {
*/
openerp.mail.suggestions(session, mail); // import suggestion.js (suggestion widget)
/**
* ------------------------------------------------------------
* UserMenu
@@ -2053,15 +2054,12 @@ openerp.mail = function (session) {
* Add a link on the top user bar for write a full mail
*/
session.web.ComposeMessageTopButton = session.web.Widget.extend({
template:'mail.ComposeMessageTopButton',
start: function () {
this.$('button').on('click', this.on_compose_message );
this._super();
template:'mail.compose_message_top_button',
events: {
"click": "on_compose_message",
},
on_compose_message: function (event) {
event.stopPropagation();
on_compose_message: function (ev) {
ev.preventDefault();
var action = {
type: 'ir.actions.act_window',
res_model: 'mail.compose.message',
+4 -2
View File
@@ -325,9 +325,11 @@
mail.compose_message.button_top_bar
render of the button on the user bar for open wizard compose message
-->
<t t-name="mail.ComposeMessageTopButton">
<t t-name="mail.compose_message_top_button">
<li title='Compose new Message' class="oe_topbar_item oe_topbar_compose_full_email">
<button class="fa fa-envelope-o fa-fw"></button>
<a href="#">
<i class="fa fa-envelope-o fa-fw"></i>
</a>
</li>
</t>