From 12d8dceaa97212c38da0d27ee4b198c35ff24873 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?=
Date: Tue, 15 May 2012 14:23:06 +0200
Subject: [PATCH] [IMP] Thread widget: small tweaks (reply link now not shown
anymore on record threaded view; post comment textarea now not shown
anymoreon record threaded view; oe_mail_oe_right css class => oe_righit)
bzr revid: tde@openerp.com-20120515122306-0vf3sys8rov9znxk
---
addons/mail/mail_group_view.xml | 2 +-
addons/mail/static/src/js/mail.js | 9 +++++----
addons/mail/static/src/xml/mail.xml | 6 +++---
3 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/addons/mail/mail_group_view.xml b/addons/mail/mail_group_view.xml
index 7babfbe877d..2a834c6fb71 100644
--- a/addons/mail/mail_group_view.xml
+++ b/addons/mail/mail_group_view.xml
@@ -62,7 +62,7 @@
-
+
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js
index aed36935906..1a80ef1ae83 100644
--- a/addons/mail/static/src/js/mail.js
+++ b/addons/mail/static/src/js/mail.js
@@ -58,7 +58,7 @@ openerp.mail = function(session) {
this.display = {};
this.display.show_post_comment = this.params.show_post_comment || false;
this.display.show_msg_menu = this.params.is_wall;
- this.display.show_reply = (this.params.thread_level > 0);
+ this.display.show_reply = (this.params.thread_level > 0 && this.params.is_wall);
this.display.show_delete = ! this.params.is_wall;
this.display.show_hide = this.params.is_wall;
this.display.show_reply_by_email = ! this.params.is_wall;
@@ -81,7 +81,7 @@ openerp.mail = function(session) {
},
do_customize_display: function() {
- if (this.display.show_post_comment) { this.$element.find('div.oe_mail_thread_act').show(); }
+ if (this.display.show_post_comment) { this.$element.find('div.oe_mail_thread_act').eq(0).show(); }
if (this.display.show_reply_by_email) { this.$element.find('a.oe_mail_compose').show(); }
if (! this.display.show_msg_menu) { this.$element.find('img.oe_mail_msg_menu_icon').hide(); }
},
@@ -250,7 +250,8 @@ openerp.mail = function(session) {
});
self.display_comment(record);
self.thread = new mail.Thread(self, {'res_model': self.params.res_model, 'res_id': self.params.res_id, 'uid': self.params.uid,
- 'records': sub_msgs, 'thread_level': (self.params.thread_level-1), 'parent_id': record.id});
+ 'records': sub_msgs, 'thread_level': (self.params.thread_level-1), 'parent_id': record.id,
+ 'is_wall': self.params.is_wall});
self.$element.find('li.oe_mail_thread_msg:last').append('');
self.thread.appendTo(self.$element.find('div.oe_mail_thread_subthread:last'));
}
@@ -658,7 +659,7 @@ openerp.mail = function(session) {
$('').html(render_res).appendTo(self.$element.find('div.oe_mail_wall_threads'));
var thread = new mail.Thread(self, {
'res_model': model_name, 'res_id': res_id, 'uid': self.session.uid, 'records': records,
- 'parent_id': false, 'thread_level': self.params.thread_level, 'show_hide': true}
+ 'parent_id': false, 'thread_level': self.params.thread_level, 'show_hide': true, 'is_wall': true}
);
self.thread_list.push(thread);
return thread.appendTo(self.$element.find('div.oe_mail_wall_thread:last'));
diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml
index a11a5a2c6b8..1f95369339f 100644
--- a/addons/mail/static/src/xml/mail.xml
+++ b/addons/mail/static/src/xml/mail.xml
@@ -50,7 +50,7 @@
-
Send an e-mail
+ Send an e-mail
@@ -91,7 +91,7 @@
on
-
+
@@ -108,7 +108,7 @@
-
+