From 6eec6cf69105dd565c3197be6f483aede86f45a9 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Thu, 6 Sep 2012 16:16:46 +0200 Subject: [PATCH] Changed tipsy bzr revid: nicolas.vanhoren@openerp.com-20120906141646-r9wgdi9uhjdd5124 --- addons/hr_attendance/static/src/js/attendance.js | 12 ++++++++++-- addons/hr_attendance/static/src/xml/attendance.xml | 4 ++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/addons/hr_attendance/static/src/js/attendance.js b/addons/hr_attendance/static/src/js/attendance.js index d3f620a88c3..e5cb3ee2bc6 100644 --- a/addons/hr_attendance/static/src/js/attendance.js +++ b/addons/hr_attendance/static/src/js/attendance.js @@ -3,24 +3,32 @@ openerp.hr_attendance = function (instance) { var QWeb = instance.web.qweb; var _t = instance.web._t; + var _lt = instance.web._lt; + + var tips = { + "true": _lt("You are currently signed in. Click here to sign out."), + "false": _lt("You are currently signed out. Click here to sign in."), + } instance.hr_attendance.AttendanceSlider = instance.web.Widget.extend({ template: 'AttendanceSlider', init: function (parent) { this._super(parent); + this.set({"signed_in": false}); }, start: function() { var self = this; this.on("change:signed_in", this, 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.$(".oe_attendance_signin").click(function() { self.do_update_attendance(); - }).tipsy(); + }); this.$(".oe_attendance_signout").click(function() { self.do_update_attendance(); - }).tipsy(); + }); return this.check_attendance(); }, do_update_attendance: function () { diff --git a/addons/hr_attendance/static/src/xml/attendance.xml b/addons/hr_attendance/static/src/xml/attendance.xml index 9f13b5c2fe2..e4287b35910 100644 --- a/addons/hr_attendance/static/src/xml/attendance.xml +++ b/addons/hr_attendance/static/src/xml/attendance.xml @@ -1,8 +1,8 @@