[IMP] mail: the placeholder of textarea on compose message can be custom with an attribute placeholder on the field
bzr revid: chm@openerp.com-20121115100542-7gigxjnxjloqt8ue
This commit is contained in:
parent
b387836284
commit
3f655858d8
|
@ -1231,6 +1231,7 @@ openerp.mail = function (session) {
|
|||
'default_parent_id': self.id,
|
||||
}});
|
||||
} else {
|
||||
data.record_name= (data.record_name != '' && data.record_name) || (self.parent_message && self.parent_message.record_name);
|
||||
var message = new mail.ThreadMessage(self, data, {'context':{
|
||||
'default_model': data.model,
|
||||
'default_res_id': data.res_id,
|
||||
|
@ -1447,6 +1448,7 @@ openerp.mail = function (session) {
|
|||
'show_record_name' : false,
|
||||
'show_compose_message' : false,
|
||||
'show_compact_message' : false,
|
||||
'compose_placeholder': false,
|
||||
'view_inbox': false,
|
||||
'message_ids': undefined,
|
||||
}, this.action.params);
|
||||
|
@ -1511,7 +1513,6 @@ openerp.mail = function (session) {
|
|||
init: function (parent, node) {
|
||||
this._super.apply(this, arguments);
|
||||
this.node = _.clone(node);
|
||||
|
||||
this.node.params = _.extend({
|
||||
'display_indented_thread': -1,
|
||||
'show_reply_button': false,
|
||||
|
@ -1520,6 +1521,10 @@ openerp.mail = function (session) {
|
|||
'show_compact_message': 1,
|
||||
}, this.node.params);
|
||||
|
||||
if (this.node.attrs.placeholder) {
|
||||
this.node.params.compose_placeholder = this.node.attrs.placeholder;
|
||||
}
|
||||
|
||||
this.domain = this.node.params && this.node.params.domain || [];
|
||||
},
|
||||
|
||||
|
|
|
@ -39,8 +39,9 @@
|
|||
</div>
|
||||
</div>
|
||||
<div t-if="widget.show_compact_message and !widget.show_composer" 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.view_mailbox" class="field_text oe_compact" placeholder="Write to the followers of this docmuent..."/>
|
||||
<textarea t-if="widget.options.view_mailbox" class="field_text oe_compact" placeholder="Write to my followers..."/>
|
||||
<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 an internal note..."/>
|
||||
<textarea t-if="!widget.options.compose_placeholder and widget.options.view_mailbox" class="field_text oe_compact" placeholder="Share to my followers..."/>
|
||||
</div>
|
||||
<span t-if="!(widget.show_compact_message and !widget.show_composer) and !widget.show_composer" class="oe_placeholder_compose"></span>
|
||||
</t>
|
||||
|
@ -109,7 +110,13 @@
|
|||
<t t-name="mail.thread.list_recipients">
|
||||
<div class="oe_mail_list_recipients">
|
||||
To:
|
||||
<span t-if="!widget.is_private" class="oe_all_follower">Followers <t t-raw="' of ' + (widget.parent_thread.parent_message.record_name ? '"' + widget.parent_thread.parent_message.record_name + '"' : 'this document')"/></span>
|
||||
<t t-if="!widget.is_private">
|
||||
<span class="oe_all_follower">
|
||||
Followers of
|
||||
<t t-if="widget.parent_thread.parent_message.record_name" t-raw="'"' + widget.parent_thread.parent_message.record_name + '"'"/>
|
||||
<t t-if="!widget.parent_thread.parent_message.record_name">this document</t>
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="!widget.is_private and widget.partner_ids.length"> and </t>
|
||||
<t t-set="inc" t-value="0"/>
|
||||
<t t-if="widget.partner_ids.length" t-foreach="widget.partner_ids" t-as="partner"><span t-attf-class="oe_partner_follower #{inc>=3?'oe_hidden':''}"><t t-if="inc" t-raw="', '"/><a t-attf-href="#model=res.partner&id=#{partner[0]}"><t t-raw="partner[1]"/></a></span><t t-set="inc" t-value="inc+1"/>
|
||||
|
|
Loading…
Reference in New Issue