[IMP] mail: compose textarea auto-resizes, various small fixes
bzr revid: fva@openerp.com-20121025124320-ztzcdf4bkgjjs57h
This commit is contained in:
parent
5eac688ef0
commit
0805371fa9
|
@ -37,6 +37,9 @@
|
|||
margin:1px;
|
||||
border-radius:2px;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg .oe_subtle{
|
||||
color: #B7B7D5;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_indented .oe_msg_center{
|
||||
margin-left:34px;
|
||||
}
|
||||
|
@ -58,14 +61,9 @@
|
|||
.openerp .oe_mail .oe_msg .oe_msg_footer{
|
||||
padding-left: 4px;
|
||||
overflow: hidden;
|
||||
font-size: 11px;
|
||||
opacity:0.8;
|
||||
-webkit-transition: opacity 0.2s linear;
|
||||
}
|
||||
.openerp .oe_mail .oe_thread:hover .oe_msg_footer{
|
||||
opacity: 1;
|
||||
-webkit-transition: opacity 0.2s linear;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg .oe_msg_content{
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
|
@ -73,7 +71,7 @@
|
|||
padding-bottom:1px;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg .oe_msg_content .oe_msg_title{
|
||||
font-size: 16px;
|
||||
font-size: 13px;
|
||||
margin-bottom: 0px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
@ -124,10 +122,11 @@
|
|||
}
|
||||
.openerp .oe_mail .oe_msg .oe_msg_content textarea{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: 32px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
resize: vertical;
|
||||
|
||||
padding: 4px;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg.oe_msg_composer_compact, .openerp .oe_mail .oe_msg.oe_msg_expandable{
|
||||
|
@ -220,11 +219,15 @@
|
|||
border: none;
|
||||
text-shadow: none;
|
||||
}
|
||||
.openerp .oe_mail .oe_attach_label{
|
||||
color: #7C7BAD;
|
||||
margin-left: -3px;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg_footer .oe_attachment_file .oe_form_binary_file{
|
||||
display: inline-block;
|
||||
margin-left: -23px;
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
margin-left: -47px;
|
||||
height: 28px;
|
||||
width: 52px;
|
||||
margin-top: -6px;
|
||||
}
|
||||
.openerp .oe_mail .oe_mail_list_recipients{
|
||||
|
|
|
@ -293,6 +293,7 @@ openerp.mail = function(session) {
|
|||
/* stack for don't close the compose form if the user click on a button */
|
||||
this.$render_expandable.on('focus, mouseup', 'textarea', function () { self.stay_open = false; });
|
||||
this.$render_expandable.on('mousedown', function () { self.stay_open = true; });
|
||||
this.$render_expandable.find('textarea').autosize();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -1662,8 +1663,8 @@ openerp.mail = function(session) {
|
|||
|
||||
bind_events: function(){
|
||||
var self=this;
|
||||
this.$("button.oe_write_full:first").click(function(){ self.root.thread.ComposeMessage.on_compose_fullmail(); });
|
||||
this.$("button.oe_write_onwall:first").click(function(){ self.root.thread.on_compose_message(); });
|
||||
this.$(".oe_write_full").click(function(){ self.root.thread.ComposeMessage.on_compose_fullmail(); });
|
||||
this.$(".oe_write_onwall").click(function(){ self.root.thread.on_compose_message(); });
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -15,16 +15,17 @@
|
|||
for main thread composition form in document form view.
|
||||
-->
|
||||
<t t-name="mail.compose_message">
|
||||
<div class="oe_msg oe_msg_composer">
|
||||
<div class="oe_msg #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''} oe_msg_composer">
|
||||
<div class="oe_msg_left">
|
||||
<img class="oe_msg_icon" alt="User img" t-attf-src="#{widget.avatar}"/>
|
||||
</div>
|
||||
<div class="oe_msg_center">
|
||||
<div class="oe_msg_content">
|
||||
<t t-call="mail.thread.list_recipients"/>
|
||||
<textarea class="field_text" placeholder=""/>
|
||||
</div><div class="oe_msg_footer">
|
||||
<div class="oe_msg_attachment_list"/>
|
||||
<textarea class="field_text"></textarea>
|
||||
</div>
|
||||
<div class="oe_msg_footer">
|
||||
<div class="oe_msg_attachment_list"></div>
|
||||
<button class="oe_post">Post</button>
|
||||
<t t-call="mail.compose_message.add_attachment"/>
|
||||
<!--<a class="oe_cancel oe_e">X</a>-->
|
||||
|
@ -40,7 +41,7 @@
|
|||
mail.compose_message when focus on textarea
|
||||
-->
|
||||
<t t-name="mail.compose_message.compact">
|
||||
<div class="oe_msg oe_msg_composer_compact">
|
||||
<div class="oe_msg #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''} oe_msg_composer_compact">
|
||||
<textarea class="field_text oe_compact" placeholder="Write a reply..."/>
|
||||
</div>
|
||||
</t>
|
||||
|
@ -53,7 +54,8 @@
|
|||
<span class="oe_attachment_file">
|
||||
<span class="oe_add">
|
||||
<!-- uploader of file -->
|
||||
<button class="oe_attach"><span class="oe_e">'</span></button>
|
||||
<button class="oe_attach"><span class="oe_e">'</span></button>
|
||||
<span class='oe_attach_label'>File</span>
|
||||
<t t-call="HiddenInputFile">
|
||||
<t t-set="fileupload_id" t-value="widget.fileupload_id"/>
|
||||
<t t-set="fileupload_action">/web/binary/upload_attachment</t>
|
||||
|
@ -162,10 +164,10 @@
|
|||
<button type="button" class="oe_write_full oe_highlight">
|
||||
Compose a new message
|
||||
</button>
|
||||
or
|
||||
<button type="button" class="oe_write_onwall" help="Your followers can read this message">
|
||||
Write to your followers
|
||||
</button>
|
||||
<span class='oe_alternative'>
|
||||
or
|
||||
<a href='#' class='oe_write_onwall oe_bold' help='Your followers can read this message'>Write to your followers</a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -227,12 +229,14 @@
|
|||
</t>
|
||||
</div>
|
||||
<div class="oe_msg_footer">
|
||||
from <a t-if="widget.author_id" t-attf-href="#model=res.partner&id=#{widget.author_id[0]}"><t t-raw="widget.author_id[1]"/></a>
|
||||
<a t-if="widget.author_id" t-attf-href="#model=res.partner&id=#{widget.author_id[0]}"><t t-raw="widget.author_id[1]"/></a>
|
||||
<span class='oe_subtle'>•</span>
|
||||
<span t-att-title="widget.date"><t t-raw="widget.timerelative"/></span>
|
||||
<a t-if="widget.attachment_ids.length > 0" class="oe_mail_msg_view_attachments">
|
||||
<t t-if="widget.attachment_ids.length == 1">1 Attachment</t>
|
||||
<t t-if="widget.attachment_ids.length > 1"><t t-raw="widget.attachment_ids.length"/> Attachments</t>
|
||||
</a>
|
||||
<span class='oe_subtle'>•</span>
|
||||
<t t-call="mail.thread.message.vote"/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -241,7 +245,7 @@
|
|||
|
||||
<!-- expandable message layout -->
|
||||
<t t-name="mail.thread.expandable">
|
||||
<div t-attf-class="oe_msg oe_msg_#{widget.type} oe_msg_unread">
|
||||
<div t-attf-class="oe_msg #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''} oe_msg_#{widget.type} oe_msg_unread">
|
||||
<div class="oe_msg_content oe_msg_more_message">
|
||||
<a t-if="widget.nb_messages === 1" class="oe_msg_fetch_more">load one more message</a>
|
||||
<a t-if="widget.nb_messages !== 1" class="oe_msg_fetch_more">load <t t-raw="widget.nb_messages" /> more messages</a>
|
||||
|
@ -263,27 +267,24 @@
|
|||
Template used to display Like/Unlike in a mail.message
|
||||
-->
|
||||
<span t-name="mail.thread.message.vote">
|
||||
<!--
|
||||
<span class="oe_left oe_mail_vote_count">
|
||||
|
||||
<span class="oe_mail_vote_count">
|
||||
<t t-if='widget.has_voted'>
|
||||
You
|
||||
</t>
|
||||
<t t-if='(widget.vote_nb - (widget.has_voted ? 1 : 0)) > 0'>
|
||||
<t t-if='widget.has_voted'> and </t>
|
||||
<t t-raw="(widget.vote_nb - (widget.has_voted ? 1 : 0))"/>
|
||||
<t t-esc="widget.vote_nb"/> people
|
||||
</t>
|
||||
<t t-if='(widget.vote_nb - (widget.has_voted ? 1 : 0)) > 0'>
|
||||
<t t-raw="(widget.vote_nb - (widget.has_voted ? 1 : 0))"/>
|
||||
concur
|
||||
<t t-if='widget.vote_nb'>
|
||||
like
|
||||
</t>
|
||||
</span>
|
||||
<button t-attf-class="oe_msg_vote oe_tag">
|
||||
<span>
|
||||
<t t-if="!widget.has_voted">Concur</t>
|
||||
<t t-if="widget.has_voted">Respectfully disagree</t>
|
||||
</span>
|
||||
</button>
|
||||
-->
|
||||
<a href='#' t-attf-class="oe_msg_vote">
|
||||
<t t-if="!widget.has_voted">like</t>
|
||||
<t t-if="widget.has_voted">unlike</t>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<!-- mail.thread.message.star
|
||||
|
|
Loading…
Reference in New Issue