Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

prevent tooltip sticking

ulfertsc607efbb4928
diff --git a/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts b/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts
index ad1774b8fc6..e5e994c776b 100644
--- a/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts
+++ b/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts
@@ -115,6 +115,7 @@ export class TimeEntryCalendarComponent implements OnInit, OnDestroy, AfterViewI
// see: https://github.com/fullcalendar/fullcalendar-angular/issues/228#issuecomment-523505044
// Therefore, setting the outputs via the underlying API
this.ucCalendar.getApi().setOption('eventRender', (event:CalendarViewEvent) => { this.alterEventEntry(event); });
+ this.ucCalendar.getApi().setOption('eventDestroy', (event:CalendarViewEvent) => { this.beforeEventRemove(event); });
this.ucCalendar.getApi().setOption('eventClick', (event:CalendarViewEvent) => { this.dispatchEventClick(event); });
this.ucCalendar.getApi().setOption('eventDrop', (event:CalendarMoveEvent) => { this.moveEvent(event); });
this.ucCalendar.getApi().setOption('dateClick', (event:CalendarDateClickEvent) => { this.addEvent(moment(event.date)); });
@@ -368,6 +369,10 @@ export class TimeEntryCalendarComponent implements OnInit, OnDestroy, AfterViewI
});
}
+ private removeTooltip(event:CalendarViewEvent) {
+ jQuery(event.el).tooltip('disable');
+ }
+
private prependDuration(event:CalendarViewEvent) {
let formattedDuration = this.timezone.formattedDuration(event.event.extendedProps.entry.hours);
@@ -376,6 +381,14 @@ export class TimeEntryCalendarComponent implements OnInit, OnDestroy, AfterViewI
.prepend(`<div class="fc-duration">${formattedDuration}</div>`);
}
+ private beforeEventRemove(event:CalendarViewEvent) {
+ if (!event.event.extendedProps.entry) {
+ return;
+ }
+
+ this.removeTooltip(event);
+ }
+
private entryName(entry:TimeEntryResource) {
let name = entry.project.name;
if (entry.workPackage) {