[IMP] quickly updated js and xml for new behavior of need_action_user_id. Still un progress, but was for testing.
bzr revid: tde@openerp.com-20120228171437-0a2lmj2d1kf9rfqu
This commit is contained in:
@@ -77,6 +77,11 @@ openerp.mail = function(session) {
|
||||
|
||||
display_comments: function (records) {
|
||||
var self = this;
|
||||
|
||||
// temporary verification of need_action_user_id (TODO: better display)
|
||||
if (this.params.need_action_user_id) {
|
||||
$('<div class="oe_mail_thread_msg"/>').text('Need action by ' + this.params.need_action_user_id[1]).appendTo(self.$element.find('div.oe_mail_thread_display')); }
|
||||
|
||||
/* WIP: map matched regexp -> records to browse with name */
|
||||
//_(records).each(function (record) {
|
||||
//self.do_check_internal_links(record.body_text);
|
||||
@@ -222,6 +227,7 @@ openerp.mail = function(session) {
|
||||
},
|
||||
|
||||
set_value: function() {
|
||||
console.log(this);
|
||||
var self = this;
|
||||
this._super.apply(this, arguments);
|
||||
/* hide follow/unfollow/see followers buttons */
|
||||
@@ -237,7 +243,8 @@ openerp.mail = function(session) {
|
||||
this.fetch_subscribers();
|
||||
/* create ThreadDisplay widget and render it */
|
||||
this.$element.find('div.oe_mail_thread_left').empty();
|
||||
this.thread_display = new mail.ThreadDisplay(this, {'res_model': this.view.model, 'res_id': this.view.datarecord.id, 'uid': this.session.uid});
|
||||
this.thread_display = new mail.ThreadDisplay(this, {'res_model': this.view.model, 'res_id': this.view.datarecord.id,
|
||||
'uid': this.session.uid, 'need_action_user_id': this.view.datarecord.need_action_user_id});
|
||||
this.thread_display.appendTo(this.$element.find('div.oe_mail_thread_left'));
|
||||
},
|
||||
|
||||
|
||||
@@ -99,9 +99,6 @@
|
||||
<a href="#" data-res-model='res.users' t-attf-data-res-id='{record.user_id[0]}'><t t-raw="record.user_id[1]"/></a>
|
||||
</span>
|
||||
</t>
|
||||
<t t-if="record.need_action_user_id != false">
|
||||
- <span class="oe_mail_msg_need_action">Need action by <a href="#"><t t-raw="record.need_action_user_id[1]"/></a></span>
|
||||
</t>
|
||||
wrote on <span class="oe_mail_msg_date"><t t-raw="record.date"/></span>
|
||||
<br />
|
||||
<span class="oe_mail_msg_body"><t t-raw="record.body_text"/></span>
|
||||
|
||||
Reference in New Issue
Block a user