diff options
| author | Martin Trigaux <mat@openerp.com> | 2013-04-03 17:10:56 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@openerp.com> | 2013-04-03 17:10:56 +0200 |
| commit | 46110fbf2995f3a8104f3f08007db4cf43000a85 (patch) | |
| tree | 7ef224499a8f332014eb4a40b3bc1ca5adc6a2d4 /addons/mail/static/src/js | |
| parent | 788501fd7804a45319d7776a381d2e6f42215df7 (diff) | |
[ADD] option to globally stop showing group suggestions
bzr revid: mat@openerp.com-20130403151056-4vjno2k9n77drm6y
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(); + }); } }); |
