[FIX] mail: insert new message on the wall and indented the reply of this message
bzr revid: chm@openerp.com-20121114153022-i6xv4v2jqxx8w39r
This commit is contained in:
parent
52349a7525
commit
7885518850
|
@ -15,9 +15,11 @@
|
|||
<field name="res_id" ref="mail.group_all_employees"/>
|
||||
<field name="type">notification</field>
|
||||
<field name="subject">Welcome to OpenERP!</field>
|
||||
<field name="body"><![CDATA[<p>Your homepage is a summary of messages you received and key information about documents you follow.</p>
|
||||
<p>The top menu bar contains all applications you installed. You can use this <i>Settings</i> menu to install more applications, activate others features or give access to new users.</p>
|
||||
<p>To setup your preferences (name, email signature, avatar), click on the top right corner.</p>]]></field>
|
||||
<field name="body"><![CDATA[
|
||||
<p>Your homepage is a summary of messages you received and key information about documents you follow.</p>
|
||||
<p>The top menu bar contains all applications you installed. You can use this <i>Settings</i> menu to install more applications, activate others features or give access to new users.</p>
|
||||
<p>To setup your preferences (name, email signature, avatar), click on the top right corner.</p>
|
||||
]]></field>
|
||||
</record>
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
|
@ -599,16 +599,15 @@ openerp.mail = function (session) {
|
|||
this.parent_thread.context
|
||||
]).done(function (record) {
|
||||
var thread = self.parent_thread;
|
||||
|
||||
if (self.options.display_indented_thread < self.thread_level && thread.parent_message) {
|
||||
thread = thread.parent_message.parent_thread;
|
||||
var hread = thread.parent_message.parent_thread;
|
||||
}
|
||||
var root = thread == self.options.root_thread;
|
||||
// create object and attach to the thread object
|
||||
thread.message_fetch([['id', 'child_of', [self.id]]], false, [record], function (arg, data) {
|
||||
data[0].no_sorted = true;
|
||||
var message = thread.create_message_object( data[0] );
|
||||
// insert the message on dom
|
||||
thread.insert_message( message, self.$el );
|
||||
thread.insert_message( message, root ? undefined : self.$el, root );
|
||||
if (thread.parent_message) {
|
||||
self.$el.remove();
|
||||
self.parent_thread.compose_message = null;
|
||||
|
@ -1261,7 +1260,7 @@ openerp.mail = function (session) {
|
|||
* The sort is define by the thread_level (O for newer on top).
|
||||
* @param : {object} ThreadMessage object
|
||||
*/
|
||||
insert_message: function (message, dom_insert_after) {
|
||||
insert_message: function (message, dom_insert_after, prepend) {
|
||||
var self=this;
|
||||
if (this.options.show_compact_message > this.thread_level) {
|
||||
this.instantiate_compose_message();
|
||||
|
@ -1273,6 +1272,8 @@ openerp.mail = function (session) {
|
|||
|
||||
if (dom_insert_after) {
|
||||
message.insertAfter(dom_insert_after);
|
||||
}if (prepend) {
|
||||
message.prependTo(self.$el);
|
||||
} else {
|
||||
message.appendTo(self.$el);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue