summaryrefslogtreecommitdiff
path: root/addons/mail/static/src
diff options
context:
space:
mode:
authorParamjit Singh Sahota <psa@tinyerp.com>2013-12-24 11:01:25 +0530
committerParamjit Singh Sahota <psa@tinyerp.com>2013-12-24 11:01:25 +0530
commit18d8368ee11eef0a74bacdb8f293414331bfa8da (patch)
treefc21df70cbd2901396c2bcf2fee0b52d750abd43 /addons/mail/static/src
parent5900672160c2bd5ae1d9257f20dbb5c51a193996 (diff)
parent123185757f51ee7e146d7295864556999d2a6938 (diff)
[MERGE] Merged lp:~openerp-dev/openobject-addons/trunk-website-al
bzr revid: psa@tinyerp.com-20131224053125-3lrogsrgd3ccp0i6
Diffstat (limited to 'addons/mail/static/src')
-rw-r--r--addons/mail/static/src/css/mail.css8
-rw-r--r--addons/mail/static/src/js/mail.js11
-rw-r--r--addons/mail/static/src/js/mail_followers.js2
-rw-r--r--addons/mail/static/src/xml/mail.xml16
4 files changed, 21 insertions, 16 deletions
diff --git a/addons/mail/static/src/css/mail.css b/addons/mail/static/src/css/mail.css
index e4b7f9247e3..bfae7571a9c 100644
--- a/addons/mail/static/src/css/mail.css
+++ b/addons/mail/static/src/css/mail.css
@@ -68,7 +68,7 @@
border: solid 1px rgba(0,0,0,0.03);
}
.openerp .oe_mail .oe_msg.oe_msg_nobody{
- background: #F8F8F8;
+ background: #E4E4E4;
}
.openerp .oe_mail .oe_msg.oe_msg_notification{
background: #F8F8F8;
@@ -94,9 +94,7 @@
}
.openerp .oe_mail .oe_msg .oe_msg_footer{
margin-left: 4px;
- padding-top: 3px;
overflow: hidden;
- margin-bottom: 4px;
font-size: 11px;
}
.openerp .oe_mail .oe_msg .oe_msg_content{
@@ -478,7 +476,7 @@
}
.openerp .oe_mail .oe_msg_footer button.oe_attach{
width: 24px;
- overflow: hidden;
+ margin-bottom: 5px; /* improved margin of file attach button according bootstrap3 */
filter:none;
}
.openerp .oe_mail .oe_msg_footer button.oe_attach .oe_e{
@@ -634,7 +632,7 @@
margin-bottom: 4px;
}
.openerp .oe_followers .oe_invite{
- float: right;
+ padding-left: 5px;
}
.openerp .oe_followers .oe_partner {
height: 32px;
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js
index e3f813bfa47..269187df8cd 100644
--- a/addons/mail/static/src/js/mail.js
+++ b/addons/mail/static/src/js/mail.js
@@ -725,6 +725,7 @@ openerp.mail = function (session) {
var values = {
'body': this.$('textarea').val(),
'subject': false,
+ 'parent_id': this.context.default_parent_id,
'attachment_ids': _.map(this.attachment_ids, function (file) {return file.id;}),
'partner_ids': partner_ids,
'context': _.extend(this.parent_thread.context, {
@@ -833,7 +834,9 @@ openerp.mail = function (session) {
// go to the parented message
var message = this.parent_thread.parent_message;
var parent_message = message.parent_id ? message.parent_thread.parent_message : message;
- var messages = [parent_message].concat(parent_message.get_childs());
+ if(parent_message){
+ var messages = [parent_message].concat(parent_message.get_childs());
+ }
} else if (this.options.emails_from_on_composer) {
// get all wall messages if is not a mail.Wall
_.each(this.options.root_thread.messages, function (msg) {messages.push(msg); messages.concat(msg.get_childs());});
@@ -1799,15 +1802,17 @@ openerp.mail = function (session) {
'read_action': 'unread',
'show_record_name': false,
'show_compact_message': 1,
+ 'display_log_button' : true,
}, this.node.params);
-
if (this.node.attrs.placeholder) {
this.node.params.compose_placeholder = this.node.attrs.placeholder;
}
if (this.node.attrs.readonly) {
this.node.params.readonly = this.node.attrs.readonly;
}
-
+ if ('display_log_button' in this.options) {
+ this.node.params.display_log_button = this.options.display_log_button;
+ }
this.domain = this.node.params && this.node.params.domain || [];
if (!this.ParentViewManager.is_action_enabled('edit')) {
diff --git a/addons/mail/static/src/js/mail_followers.js b/addons/mail/static/src/js/mail_followers.js
index 53cab629d79..938d6a01f6d 100644
--- a/addons/mail/static/src/js/mail_followers.js
+++ b/addons/mail/static/src/js/mail_followers.js
@@ -264,7 +264,7 @@ openerp_mail_followers = function(session, mail) {
var $list = this.$('.oe_subtype_list');
}
$list.empty().hide();
- var records = data[this.view.datarecord.id || this.view.dataset.ids[0]].message_subtype_data;
+ var records = data[id].message_subtype_data;
this.records_length = $.map(records, function(value, index) { return index; }).length;
if (this.records_length > 1) { self.display_followers(); }
_(records).each(function (record, record_name) {
diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml
index e6c84eaa5df..31539e24ab3 100644
--- a/addons/mail/static/src/xml/mail.xml
+++ b/addons/mail/static/src/xml/mail.xml
@@ -34,7 +34,7 @@
<div class="oe_msg_attachment_list"></div>
<button class="oe_post">
<t t-if="!widget.is_log">Send</t>
- <t t-if="widget.is_log">Log a note</t>
+ <t t-if="widget.is_log">Log an internal note</t>
</button>
<t t-call="mail.compose_message.add_attachment"/>
</div>
@@ -51,8 +51,10 @@
<div class="field_text oe_compact oe_compact_record">
<a class="oe_compose_post" t-if="widget.options.compose_placeholder"><t t-raw="widget.options.compose_placeholder"/></a>
<a class="oe_compose_post" t-if="!widget.options.compose_placeholder and !widget.options.view_mailbox">Send a message</a>
- <span class="oe_grey oe_sep_word">or</span>
- <a class="oe_compose_log">Log a note</a>
+ <t t-if="widget.options.display_log_button">
+ <span class="oe_grey oe_sep_word">or</span>
+ <a class="oe_compose_log">Log an internal note</a>
+ </t>
</div>
</t>
</div>
@@ -155,7 +157,7 @@
</t>
</div>
<div t-if="widget.is_log">
- <span>Attach a note that will not be sent to the followers</span>
+ <span>Add an internal note that will not be sent to the followers</span>
</div>
</t>
@@ -293,9 +295,9 @@
logged a note
</t>
<t t-if="(widget.type == 'comment' or widget.type == 'email') and (widget.subtype or widget.partner_ids.length > 0)">
- to
- <t t-if="widget.partner_ids.length == 0">
- nobody
+ <!-- Remove nobody if user have no rights on partner that will display 'portal to nobody 5 minutes ago' that will confuse to end user, now it display 'portal 5 minutes ago' if no rights.-->
+ <t t-if="widget.partner_ids.length > 0">
+ to
</t>
</t>
<t t-if="widget.type == 'notification' or ( (widget.type == 'email' or widget.type == 'comment') and (widget.subtype or widget.partner_ids.length > 0))"