From 21022c5472ef08cda46cb32159aba7244fd128a1 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Fri, 11 Apr 2014 16:22:57 +0200 Subject: [REF] gamification: add batch mode, improve some views, remove inprogess_update state (replaced with boolean 'to update') bzr revid: mat@openerp.com-20140411142257-zpaul4sq3t5j5r64 --- addons/gamification/static/src/js/gamification.js | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'addons/gamification/static/src/js/gamification.js') 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(); -- cgit v1.2.3