[IMP] Calendar Performance

This commit is contained in:
Alexandre Díaz
2019-01-13 02:10:33 +01:00
parent 03457f2228
commit 279675e2ae
10 changed files with 181 additions and 178 deletions

View File

@@ -97,12 +97,8 @@ odoo.define('hotel_calendar.MultiCalendar', function(require) {
var active_calendar = this.get_active_calendar();
if (active_calendar) {
setTimeout(function(calendar){
for (var reserv of calendar._reservations) {
var style = window.getComputedStyle(reserv._html, null);
if (parseInt(style.width, 10) < 15 || parseInt(style.height, 10) < 15 || parseInt(style.top, 10) === 0) {
this.get_active_calendar()._updateReservation(reserv);
}
}
calendar._updateOffsets();
calendar._updateReservations(false);
}.bind(this, active_calendar), 200);
}
},