minor improvement
bzr revid: nicolas.vanhoren@openerp.com-20120906103644-ifr75hpbac7zcg1e
This commit is contained in:
parent
61b67909e9
commit
937e465da8
|
@ -4,8 +4,6 @@ openerp.hr_attendance = function (instance) {
|
|||
var QWeb = instance.web.qweb;
|
||||
_t = instance.web._t;
|
||||
|
||||
instance.web.attendanceslider = false;
|
||||
|
||||
instance.hr_attendance.AttendanceSlider = instance.web.Widget.extend({
|
||||
template: 'AttendanceSlider',
|
||||
init: function (parent) {
|
||||
|
@ -68,13 +66,14 @@ openerp.hr_attendance = function (instance) {
|
|||
do_update: function () {
|
||||
this._super();
|
||||
var self = this;
|
||||
var fct = function () {
|
||||
instance.web.attendanceslider = new instance.hr_attendance.AttendanceSlider(self);
|
||||
this.update_promise = this.update_promise.then(function () {
|
||||
if (self.attendanceslider)
|
||||
return;
|
||||
self.attendanceslider = new instance.hr_attendance.AttendanceSlider(self);
|
||||
|
||||
instance.web.attendanceslider.prependTo(instance.webclient.$('.oe_systray'));
|
||||
return instance.web.attendanceslider.check_attendance();
|
||||
};
|
||||
this.update_promise = this.update_promise.pipe(fct, fct);
|
||||
self.attendanceslider.prependTo(instance.webclient.$('.oe_systray'));
|
||||
self.attendanceslider.check_attendance();
|
||||
});
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue