diff options
Diffstat (limited to 'addons/mail/static/src/js')
| -rw-r--r-- | addons/mail/static/src/js/suggestions.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/mail/static/src/js/suggestions.js b/addons/mail/static/src/js/suggestions.js index 137607a7643..ad0867f4930 100644 --- a/addons/mail/static/src/js/suggestions.js +++ b/addons/mail/static/src/js/suggestions.js @@ -16,6 +16,7 @@ openerp.mail.suggestions = function(session, mail) { var removed_suggested_group = session.removed_suggested_group = []; suggestions.Groups = session.web.Widget.extend({ events: { + 'click .oe_remove_suggestion_employees': "remove_employee_suggestions", 'click .oe_remove_suggested_group': "remove_suggested_group", 'click .oe_join_group': "join_group", 'click .oe_open_group': "open_group" @@ -25,6 +26,7 @@ openerp.mail.suggestions = function(session, mail) { this._super(parent, action); this.deferred = $.Deferred(); this.mail_group = new session.web.DataSetSearch(this, 'mail.group'); + this.res_users = new session.web.DataSetSearch(this, 'res.users'); this.suggestions = []; }, start: function() { @@ -70,6 +72,12 @@ openerp.mail.suggestions = function(session, mail) { var self = this; removed_suggested_group.push($(event.currentTarget).attr('id')); self.get_suggested_group(); + }, + remove_employee_suggestions: function(event) { + var self = this; + return this.res_users.call('stop_showing_group_suggestions', [this.session.uid]).then(function(res) { + self.$(".oe_sidebar_group").hide(); + }); } }); |
