[MERGE] mail: convert compact textarea in div for id rendering
bzr revid: chm@openerp.com-20121227135948-81vcv8737ztsyc6n
This commit is contained in:
commit
50ceb88012
|
@ -59,6 +59,10 @@
|
|||
left:0; top: 0; bottom: 0; width: 40px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg .oe_msg_left a,
|
||||
.openerp .oe_mail .oe_msg .oe_msg_left img{
|
||||
border: 0;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg .oe_msg_icon{
|
||||
width: 32px;
|
||||
margin: 4px;
|
||||
|
@ -184,7 +188,7 @@
|
|||
transition: all 0.1s linear;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg .oe_msg_icons .oe_star:hover a{
|
||||
color: #FFF6C0;
|
||||
color: #FFF670;
|
||||
text-shadow: 0px 1px #FFA162,0px -1px #FFA162, -1px 0px #FFA162, 1px 0px #FFA162, 0px 3px 3px rgba(0,0,0,0.1);
|
||||
}
|
||||
.openerp .oe_mail .oe_msg .oe_msg_icons .oe_star.oe_starred a{
|
||||
|
@ -220,6 +224,21 @@
|
|||
height: 24px;
|
||||
width: 100%;
|
||||
}
|
||||
.openerp .oe_mail .oe_msg.oe_msg_composer_compact .oe_compact{
|
||||
height: 24px;
|
||||
width: 100%;
|
||||
padding: 2px 4px;
|
||||
border: 1px solid #CCC;
|
||||
-moz-border-radius: 3px;
|
||||
-webkit-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
background: white;
|
||||
font-size: 14px;
|
||||
color: #AAA;
|
||||
font-style: italic;
|
||||
word-spacing: 3px;
|
||||
cursor: text;
|
||||
}
|
||||
|
||||
/* d) I.E. tweaks for Message action icons */
|
||||
|
||||
|
|
|
@ -471,7 +471,7 @@ openerp.mail = function (session) {
|
|||
bind_events: function () {
|
||||
var self = this;
|
||||
|
||||
this.$('textarea.oe_compact').on('focus', _.bind( this.on_compose_expandable, this));
|
||||
this.$('.oe_compact').on('click', _.bind( this.on_compose_expandable, this));
|
||||
|
||||
// set the function called when attachments are added
|
||||
this.$('input.oe_form_binary_file').on('change', _.bind( this.on_attachment_change, this) );
|
||||
|
@ -479,18 +479,16 @@ openerp.mail = function (session) {
|
|||
this.$('.oe_cancel').on('click', _.bind( this.on_cancel, this) );
|
||||
this.$('.oe_post').on('click', _.bind( this.on_message_post, this) );
|
||||
this.$('.oe_full').on('click', _.bind( this.on_compose_fullmail, this, this.id ? 'reply' : 'comment') );
|
||||
|
||||
/* stack for don't close the compose form if the user click on a button */
|
||||
this.$('.oe_msg_left, .oe_msg_center').on('mousedown', _.bind( function () { this.stay_open = true; }, this));
|
||||
this.$('.oe_msg_left, .oe_msg_content').on('mouseup', _.bind( function () { this.$('textarea').focus(); }, this));
|
||||
|
||||
var ev_stay = {};
|
||||
ev_stay.mouseup = ev_stay.keydown = ev_stay.focus = function () { self.stay_open = false; };
|
||||
this.$('textarea:not(.oe_compact)').on(ev_stay);
|
||||
this.$('textarea:not(.oe_compact)').autosize();
|
||||
this.$('textarea').on(ev_stay);
|
||||
this.$('textarea').autosize();
|
||||
|
||||
// auto close
|
||||
this.$('textarea:not(.oe_compact)').on('blur', _.bind( this.on_compose_expandable, this));
|
||||
this.$('textarea').on('blur', _.bind( this.on_compose_expandable, this));
|
||||
|
||||
// event: delete child attachments off the oe_msg_attachment_list box
|
||||
this.$(".oe_msg_attachment_list").on('click', '.oe_delete', this.on_attachment_delete);
|
||||
|
|
|
@ -39,9 +39,11 @@
|
|||
</div>
|
||||
</div>
|
||||
<div t-if="widget.show_compact_message and !widget.show_composer and !widget.options.readonly" t-attf-class="oe_msg oe_msg_composer_compact #{widget.thread_level and widget.options.display_indented_thread > -1 ? 'oe_msg_indented' : ''}">
|
||||
<textarea t-if="widget.options.compose_placeholder" class="field_text oe_compact" t-att-placeholder="widget.options.compose_placeholder"/>
|
||||
<textarea t-if="!widget.options.compose_placeholder and !widget.options.view_mailbox" class="field_text oe_compact" placeholder="Write to the followers of this document..."/>
|
||||
<textarea t-if="!widget.options.compose_placeholder and widget.options.view_mailbox" class="field_text oe_compact" placeholder="Share with my followers..."/>
|
||||
<div class="field_text oe_compact">
|
||||
<t t-if="widget.options.compose_placeholder" t-raw="widget.options.compose_placeholder"/>
|
||||
<t t-if="!widget.options.compose_placeholder and !widget.options.view_mailbox">Write to the followers of this document...</t>
|
||||
<t t-if="!widget.options.compose_placeholder and widget.options.view_mailbox">Share with my followers...</t>
|
||||
</div>
|
||||
</div>
|
||||
<span t-if="!(widget.show_compact_message and !widget.show_composer) and !widget.show_composer" class="oe_placeholder_compose"></span>
|
||||
</t>
|
||||
|
|
Loading…
Reference in New Issue