From 69c3ac117d7e29d71ec157c0217602009fca6c11 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 6 Sep 2012 16:21:43 +0200 Subject: [PATCH] fixed small bug with tipsy bzr revid: nicolas.vanhoren@openerp.com-20120906142143-wxo087d2r6y6pln8 --- addons/hr_attendance/static/src/js/attendance.js | 6 ++++-- addons/hr_attendance/static/src/xml/attendance.xml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/addons/hr_attendance/static/src/js/attendance.js b/addons/hr_attendance/static/src/js/attendance.js index e5cb3ee2bc6..f6a4c15268a 100644 --- a/addons/hr_attendance/static/src/js/attendance.js +++ b/addons/hr_attendance/static/src/js/attendance.js @@ -18,11 +18,13 @@ openerp.hr_attendance = function (instance) { }, start: function() { var self = this; - this.on("change:signed_in", this, function() { + var tmp = function() { this.$el.toggleClass("oe_attendance_nosigned", ! this.get("signed_in")); this.$el.toggleClass("oe_attendance_signed", this.get("signed_in")); this.$el.attr("title", tips["" + this.get("signed_in")].toString()); - }); + }; + this.on("change:signed_in", this, tmp); + _.bind(tmp, this)(); this.$(".oe_attendance_signin").click(function() { self.do_update_attendance(); }); diff --git a/addons/hr_attendance/static/src/xml/attendance.xml b/addons/hr_attendance/static/src/xml/attendance.xml index e4287b35910..6896086440f 100644 --- a/addons/hr_attendance/static/src/xml/attendance.xml +++ b/addons/hr_attendance/static/src/xml/attendance.xml @@ -1,6 +1,6 @@