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
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
adapt customized styles for full-calendar
ulferts4477f92e6eca
diff --git a/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.sass b/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.sassindex 7296d65a099..6fff9f52cb9 100644--- a/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.sass+++ b/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.sass@@ -1,12 +1,21 @@-.fc-view+full-calendaroverflow-x: auto.fc-viewmin-width: 800px- .fc-head+ // Move the days header to the bottom.+ theaddisplay: table-footer-group+ // Remove the borders at the left and of the bottom+ th.fc-day,+ th.fc-timegrid-axis+ border-bottom: none++ table.fc-scrollgrid.fc-scrollgrid-liquid+ border-left: none+.fc-event, .fc-bgeventborder-radius: 0margin-right: 8px@@ -31,7 +40,7 @@.fc-timeGrid-view .fc-day-grid .fc-row .fc-content-skeletonpadding-bottom: 0- .fc-time-grid .fc-slats .fc-minor td+ .fc-timegrid-slot.fc-timegrid-slot-minorborder-top: 0.te-calendar--day-sum@@ -43,6 +52,7 @@font-weight: boldline-height: 22pxopacity: 1+ cursor: default.te-calendar--add-entrytext-align: center@@ -95,8 +105,8 @@font-weight: bold.te-calendar--create-button- float: right- margin-right: 0- margin-top: 4px- height: 34px+ position: absolute+ right: 0+ top: 6px+ margin-right: 0pxdiff --git a/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.ts b/frontend/src/app/modules/calendar/te-calendar/te-calendar.component.tsindex 6770119373d..6ff248cb0d6 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@@ -305,6 +305,7 @@ export class TimeEntryCalendarComponent implements AfterViewInit {end: date.clone().add(this.maxHour - Math.min(((duration + 0.05) * this.scaleRatio), this.maxHour - 0.5), 'h').format(),classNames: DAY_SUM_CLASS_NAME,rendering: 'background' as 'background',+ startEditable: false,sum: this.i18n.t('js.units.hour', { count: this.formatNumber(duration) })};}@@ -445,7 +446,7 @@ export class TimeEntryCalendarComponent implements AfterViewInit {private appendSum(event:CalendarViewEvent) {if (event.event.extendedProps.sum) {- event.el.append(event.event.extendedProps.sum);+ event.el.innerHTML = event.event.extendedProps.sum;}}@@ -469,7 +470,13 @@ export class TimeEntryCalendarComponent implements AfterViewInit {}private prependDuration(event:CalendarViewEvent) {- let formattedDuration = this.timezone.formattedDuration(event.event.extendedProps.entry.hours);+ let timeEntry = event.event.extendedProps.entry;++ if (this.timezone.toHours(timeEntry.hours) < 0.5) {+ return;+ }++ let formattedDuration = this.timezone.formattedDuration(timeEntry.hours);jQuery(event.el).find('.fc-event-title')diff --git a/frontend/src/global_styles/content/_calendars.sass b/frontend/src/global_styles/content/_calendars.sassindex 139564aa0df..935b6c51e24 100644--- a/frontend/src/global_styles/content/_calendars.sass+++ b/frontend/src/global_styles/content/_calendars.sass@@ -1,7 +1,7 @@// overrides for full-calendar so that it looks to belong into OpenProjectfull-calendar- .fc-toolbar+ .fc-header-toolbar.fc-toolbar.fc-button@extend .buttonheight: 34px@@ -18,13 +18,27 @@ full-calendarmargin-bottom: 0padding: 0.4em 0.65em- .fc-button-active- @extend .button, .-active+ &.fc-button-active+ @extend .button, .-active+ margin-right: 0- .fc-title+ // The days in full calendar are anchor elements which we do not+ // want to like like actual links+ .fc-col-header-cell a, a.fc-daygrid-day-number+ color: #000000+ cursor: default++ &:hover+ text-decoration: none++ .fc-event-titlemax-width: 100%@include text-shortener(false)+ .fc-timegrid-event-condensed .fc-event-title-container+ white-space: nowrap+ overflow: hidden+.fc-header-toolbarh2@extend h2