summaryrefslogtreecommitdiff
path: root/addons/mail/static/src
diff options
context:
space:
mode:
authorChristophe Matthieu <chm@openerp.com>2012-12-14 11:14:28 +0100
committerChristophe Matthieu <chm@openerp.com>2012-12-14 11:14:28 +0100
commit6e35fdb9f63e3d3c29d3bba99b4e8d32c74200d9 (patch)
tree9f9900675fbbcfee87e7e9e30ca9001e96f3cd1f /addons/mail/static/src
parent86a1802556cae70401f450c15a9bd51f5ccf9249 (diff)
[FIX] mail: display of the placeholder
bzr revid: chm@openerp.com-20121214101428-7vnyjx2iyeel3wvv
Diffstat (limited to 'addons/mail/static/src')
-rw-r--r--addons/mail/static/src/css/mail.css14
-rw-r--r--addons/mail/static/src/js/mail.js8
-rw-r--r--addons/mail/static/src/xml/mail.xml8
3 files changed, 23 insertions, 7 deletions
diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css
index 8e739af8886..56cfcf6b489 100644
--- a/addons/mail/static/src/css/mail.css
+++ b/addons/mail/static/src/css/mail.css
@@ -223,6 +223,20 @@
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;
+}
/* --------------------- ATTACHMENTS --------------------- */
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js
index b86aad91658..fa22bbee5fa 100644
--- a/addons/mail/static/src/js/mail.js
+++ b/addons/mail/static/src/js/mail.js
@@ -470,7 +470,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) );
@@ -483,11 +483,11 @@ openerp.mail = function (session) {
this.$('.oe_msg_footer').on('mousedown', _.bind( function () { this.stay_open = true; }, 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);
diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml
index 67449cca0ba..fb796bc9ed7 100644
--- a/addons/mail/static/src/xml/mail.xml
+++ b/addons/mail/static/src/xml/mail.xml
@@ -39,9 +39,11 @@
</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.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>