From 1bbe3aa21b218799205d412063a4868d8f24fe42 Mon Sep 17 00:00:00 2001 From: nathangray Date: Mon, 1 Feb 2021 10:08:14 -0700 Subject: [PATCH] * Calendar: Fix timespan in tooltip was wrong if event had seconds in start or end time --- calendar/js/et2_widget_daycol.js | 7 ++++--- calendar/js/et2_widget_daycol.ts | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/calendar/js/et2_widget_daycol.js b/calendar/js/et2_widget_daycol.js index 1f0ab645d0..46542a0731 100644 --- a/calendar/js/et2_widget_daycol.js +++ b/calendar/js/et2_widget_daycol.js @@ -22,6 +22,7 @@ var __extends = (this && this.__extends) || (function () { }; })(); Object.defineProperty(exports, "__esModule", { value: true }); +exports.et2_calendar_daycol = void 0; /*egw:uses et2_core_valueWidget; /calendar/js/et2_widget_event.js; @@ -165,7 +166,7 @@ var et2_calendar_daycol = /** @class */ (function (_super) { get: function () { return this._date_helper; }, - enumerable: true, + enumerable: false, configurable: true }); /** @@ -744,12 +745,12 @@ var et2_calendar_daycol = /** @class */ (function (_super) { if (typeof event_3.end !== 'object') { event_3.end = new Date(event_3.end); } - event_3['start_m'] = (event_3.start.valueOf() / 1000 - day_start) / 60; + event_3['start_m'] = parseInt(String((event_3.start.valueOf() / 1000 - day_start) / 60), 10); if (event_3['start_m'] < 0) { event_3['start_m'] = 0; event_3['multiday'] = true; } - event_3['end_m'] = (event_3.end.valueOf() / 1000 - day_start) / 60; + event_3['end_m'] = parseInt(String((event_3.end.valueOf() / 1000 - day_start) / 60), 10); if (event_3['end_m'] >= 24 * 60) { event_3['end_m'] = 24 * 60 - 1; event_3['multiday'] = true; diff --git a/calendar/js/et2_widget_daycol.ts b/calendar/js/et2_widget_daycol.ts index 5957cada4d..8bb0576a01 100644 --- a/calendar/js/et2_widget_daycol.ts +++ b/calendar/js/et2_widget_daycol.ts @@ -943,13 +943,13 @@ export class et2_calendar_daycol extends et2_valueWidget implements et2_IDetache { event.end = new Date(event.end); } - event['start_m'] = (event.start.valueOf()/1000 - day_start) / 60; + event['start_m'] = parseInt(String((event.start.valueOf() / 1000 - day_start) / 60), 10); if (event['start_m'] < 0) { event['start_m'] = 0; event['multiday'] = true; } - event['end_m'] = (event.end.valueOf()/1000 - day_start) / 60; + event['end_m'] = parseInt(String((event.end.valueOf() / 1000 - day_start) / 60), 10); if (event['end_m'] >= 24*60) { event['end_m'] = 24*60-1;