From 7014579d2222c6b4fa694e57853fe3fedb9cc55b Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Mon, 4 Apr 2016 10:52:23 +0200 Subject: [PATCH] [FIX] hr_attendance: display of attendance button in systray In the enterprise client, in mobile, the buttons in the systray are 'display: inline-block'. This rule was overriden in the case of the attendance button by a 'this.$el.show()', which changed the display to 'block'. This rev. uses 'do_show' and 'do_hide' functions of widgets instead, as they don't change the display. --- addons/hr_attendance/static/src/js/attendance.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/hr_attendance/static/src/js/attendance.js b/addons/hr_attendance/static/src/js/attendance.js index c6766e99779..03ca6a8644b 100644 --- a/addons/hr_attendance/static/src/js/attendance.js +++ b/addons/hr_attendance/static/src/js/attendance.js @@ -57,7 +57,7 @@ var AttendanceSlider = Widget.extend({ check_attendance: function () { var self = this; self.employee = false; - this.$el.hide(); + this.do_hide(); var employee = new data.DataSetSearch(self, 'hr.employee', self.session.user_context, [ ['user_id', '=', self.session.uid] ]); @@ -67,7 +67,7 @@ var AttendanceSlider = Widget.extend({ if (res[0].attendance_access === false){ return; } - self.$el.show(); + self.do_show(); self.employee = res[0]; self.last_sign = time.str_to_datetime(self.employee.last_sign); self.set({"signed_in": self.employee.state !== "absent"});