diff options
| author | Thibault Delavallée <tde@openerp.com> | 2012-02-28 18:14:37 +0100 |
|---|---|---|
| committer | Thibault Delavallée <tde@openerp.com> | 2012-02-28 18:14:37 +0100 |
| commit | a39bdef62a811ba9fdbab1809ddf15396caa02bc (patch) | |
| tree | 4ce1ce583a205bea6ffc9267c237ed591af92a95 /addons/mail/static/src | |
| parent | 02e927fe6b90cb0ab15e910d49737da3163e56f5 (diff) | |
[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
Diffstat (limited to 'addons/mail/static/src')
| -rw-r--r-- | addons/mail/static/src/js/mail.js | 9 | ||||
| -rw-r--r-- | addons/mail/static/src/xml/mail.xml | 3 |
2 files changed, 8 insertions, 4 deletions
diff --git a/addons/mail/static/src/js/mail.js b/addons/mail/static/src/js/mail.js index d49b7a0768c..bdb6f39e69f 100644 --- a/addons/mail/static/src/js/mail.js +++ b/addons/mail/static/src/js/mail.js @@ -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')); }, diff --git a/addons/mail/static/src/xml/mail.xml b/addons/mail/static/src/xml/mail.xml index b2cc1e8e0c7..5d36df9fd57 100644 --- a/addons/mail/static/src/xml/mail.xml +++ b/addons/mail/static/src/xml/mail.xml @@ -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> |
