diff options
| author | Martin Trigaux <mat@openerp.com> | 2013-04-03 17:24:43 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@openerp.com> | 2013-04-03 17:24:43 +0200 |
| commit | 52ddce88f338d8c904efe6b652f1a236da2763fc (patch) | |
| tree | bc54bf450f2c09bc95744ad778df4b2e974bd165 /addons/hr/static/src | |
| parent | 46110fbf2995f3a8104f3f08007db4cf43000a85 (diff) | |
[ADD] option to globally stop showing employeep suggestions
bzr revid: mat@openerp.com-20130403152443-3jqg0v182mcqsk0f
Diffstat (limited to 'addons/hr/static/src')
| -rw-r--r-- | addons/hr/static/src/js/suggestions.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/hr/static/src/js/suggestions.js b/addons/hr/static/src/js/suggestions.js index fe8dc83a37a..294143da733 100644 --- a/addons/hr/static/src/js/suggestions.js +++ b/addons/hr/static/src/js/suggestions.js @@ -6,6 +6,7 @@ openerp.hr = function(session) { var removed_suggested_employee = session.removed_suggested_employee = []; suggestions.Employees = session.mail.Wall.include({ events: { + 'click .oe_remove_suggestion_employees': "remove_suggestion_employees", 'click .oe_remove_suggested_employee': "remove_suggested_employee", 'click .oe_follow_employee': "follow_employee", 'click .oe_open_employee': "open_employee" @@ -15,6 +16,7 @@ openerp.hr = function(session) { this._super(parent, action); this.deferred = $.Deferred(); this.hr_employee = new session.web.DataSetSearch(this, 'hr.employee'); + this.res_users = new session.web.DataSetSearch(this, 'res.users'); this.suggestions = []; }, start: function() { @@ -77,6 +79,12 @@ openerp.hr = function(session) { var self = this; removed_suggested_employee.push($(event.currentTarget).attr('id')); self.get_suggested_employee(); + }, + remove_suggestion_employees: function(event) { + var self = this; + return this.res_users.call('stop_showing_employees_suggestions', [this.session.uid]).then(function(res) { + self.$(".oe_sidebar_employee").hide(); + }); } }); |
