[FIX] mail: keep breadcrumb on click on chatter follower
This commit is contained in:
parent
77500e54ec
commit
e4eff4ba66
|
@ -76,7 +76,8 @@ openerp_mail_followers = function(session, mail) {
|
|||
// event: click on 'edit_subtype(pencil)' button to edit subscription
|
||||
this.$el.on('click', '.oe_edit_subtype', self.on_edit_subtype);
|
||||
this.$el.on('click', '.oe_remove_follower', self.on_remove_follower);
|
||||
this.$el.on('click', '.oe_show_more', self.on_show_more_followers)
|
||||
this.$el.on('click', '.oe_show_more', self.on_show_more_followers);
|
||||
this.$el.on('click', 'a[data-partner]', self.on_follower_clicked);
|
||||
},
|
||||
|
||||
on_edit_subtype: function(event) {
|
||||
|
@ -136,6 +137,26 @@ openerp_mail_followers = function(session, mail) {
|
|||
}
|
||||
},
|
||||
|
||||
on_follower_clicked: function (event) {
|
||||
event.preventDefault();
|
||||
var partner_id = $(event.target).data('partner');
|
||||
var state = {
|
||||
'model': 'res.partner',
|
||||
'id': partner_id,
|
||||
'title': this.record_name
|
||||
};
|
||||
session.webclient.action_manager.do_push_state(state);
|
||||
var action = {
|
||||
type:'ir.actions.act_window',
|
||||
view_type: 'form',
|
||||
view_mode: 'form',
|
||||
res_model: 'res.partner',
|
||||
views: [[false, 'form']],
|
||||
res_id: partner_id,
|
||||
}
|
||||
this.do_action(action);
|
||||
},
|
||||
|
||||
read_value: function () {
|
||||
var self = this;
|
||||
this.displayed_nb = this.displayed_limit;
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
-->
|
||||
<div t-name="mail.followers.partner" class='oe_partner'>
|
||||
<img class="oe_mail_thumbnail oe_mail_frame" t-attf-src="{record.avatar_url}"/>
|
||||
<a t-attf-href="#model=res.partner&id=#{record.id}" t-att-title="record.name"><t t-esc="record.name"/></a>
|
||||
<a t-attf-href="#model=res.partner&id=#{record.id}" t-att-title="record.name" t-att-data-partner="record.id"><t t-esc="record.name"/></a>
|
||||
<span t-if="record.is_editable and (widget.records_length > 1)" class="oe_edit_subtype oe_e oe_hidden" title="Edit subscription" t-att-data-id="record.id">&</span>
|
||||
<span t-if="widget.view_is_editable" class="oe_remove_follower oe_e" title="Remove this follower" t-att-data-id="record.id">X</span>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue