diff options
Diffstat (limited to 'addons/gamification/static/src/js/gamification.js')
| -rw-r--r-- | addons/gamification/static/src/js/gamification.js | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/addons/gamification/static/src/js/gamification.js b/addons/gamification/static/src/js/gamification.js index 2a8db5f369d..242f67d8759 100644 --- a/addons/gamification/static/src/js/gamification.js +++ b/addons/gamification/static/src/js/gamification.js @@ -49,21 +49,6 @@ openerp.gamification = function(instance) { self.get_goal_todo_info(); }); }); - }, - 'click .oe_goal h4': function(event) { - var self = this; - this.kkeys = []; - $(document).on('keydown.klistener', function(event) { - if ("37,38,39,40,65,66".indexOf(event.keyCode) < 0) { - $(document).off('keydown.klistener'); - } else { - self.kkeys.push(event.keyCode); - if (self.kkeys.toString().indexOf("38,38,40,40,37,39,37,39,66,65") >= 0) { - new instance.web.Model('gamification.badge').call('check_progress', []); - $(document).off('keydown.klistener'); - } - } - }); } }, start: function() { @@ -126,6 +111,13 @@ openerp.gamification = function(instance) { } }); + instance.web.WebClient.include({ + to_kitten: function() { + this._super(); + new instance.web.Model('gamification.badge').call('check_progress', []); + } + }); + instance.mail.Widget.include({ start: function() { this._super(); |
