[IMP] css: global mail compose button is beautifuller and better integrated

bzr revid: fva@openerp.com-20121029165211-dzd1najj6btorzi9
This commit is contained in:
Frédéric van der Essen 2012-10-29 17:52:11 +01:00
parent 4afb656390
commit c25c94b8d9
3 changed files with 40 additions and 10 deletions

View File

@ -1,3 +1,30 @@
/* ------------ 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;
}
.openerp .oe_topbar_item.oe_topbar_compose_full_email button{
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 *{
@ -158,7 +185,7 @@
}
.openerp .oe_mail .oe_msg .oe_msg_content textarea{
width: 100%;
height: 32px;
height: 64px;
margin: 0px;
padding: 0px;
resize: vertical;

View File

@ -1681,13 +1681,16 @@ openerp.mail = function (session) {
},
});
session.web.UserMenu = session.web.UserMenu.extend({
start: function (parent, params) {
var render = new session.web.ComposeMessageTopButton();
render.insertAfter(this.$el);
this._super(parent, params);
}
session.web.UserMenu.include({
do_update: function(){
var self = this;
this._super.apply(this, arguments);
this.update_promise.then(function() {
var mail_button = new session.web.ComposeMessageTopButton();
mail_button.appendTo(session.webclient.$el.find('.oe_systray'));
});
},
});
};

View File

@ -248,8 +248,8 @@
render of the button on the user bar for open wizard compose message
-->
<t t-name="mail.compose_message.button_top_bar">
<div class="oe_topbar_compose_full_email">
<!-- <button class="oe_button oe_highlight">Write an email</button> -->
<div title='Compose new Message' class="oe_topbar_item oe_topbar_compose_full_email">
<button class="oe_e">%</button>
</div>
</t>