mirror of https://github.com/nextcloud/calendar
Do not allow multiline summaries in Calendar-grid
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
This commit is contained in:
parent
adaacb26b2
commit
70e5e37057
|
@ -187,6 +187,7 @@
|
|||
|
||||
.fc-content {
|
||||
background-color: inherit;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.fc-popover.fc-more-popover {
|
||||
|
@ -197,5 +198,3 @@
|
|||
background-color: var(--color-main-background);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ export function eventSourceFunction(calendarObjects, calendar, start, end, timez
|
|||
|
||||
const fcEvent = {
|
||||
id: [calendarObject.id, object.id].join('###'),
|
||||
title: object.title || t('calendar', 'Untitled event'),
|
||||
title: object.title ? object.title.replace(/\n/g, ' ') : t('calendar', 'Untitled event'),
|
||||
allDay: object.isAllDay(),
|
||||
start: jsStart,
|
||||
end: jsEnd,
|
||||
|
|
|
@ -96,6 +96,7 @@ describe('fullcalendar/eventSourceFunction test suite', () => {
|
|||
})
|
||||
},
|
||||
hasComponent: jest.fn().mockReturnValue(false),
|
||||
title: 'Untitled\nmultiline\nevent',
|
||||
}, {
|
||||
id: '1-3',
|
||||
status: 'TENTATIVE',
|
||||
|
@ -202,7 +203,7 @@ describe('fullcalendar/eventSourceFunction test suite', () => {
|
|||
},
|
||||
{
|
||||
id: '1###1-2',
|
||||
title: 'Untitled event',
|
||||
title: 'Untitled multiline event',
|
||||
allDay: false,
|
||||
start: event12Start,
|
||||
end: event12End,
|
||||
|
@ -298,12 +299,11 @@ describe('fullcalendar/eventSourceFunction test suite', () => {
|
|||
expect(eventComponentSet4[0].endDate.getInTimezone).toHaveBeenCalledTimes(1)
|
||||
expect(eventComponentSet4[0].endDate.getInTimezone).toHaveBeenNthCalledWith(1, timezone)
|
||||
|
||||
expect(translate).toHaveBeenCalledTimes(5)
|
||||
expect(translate).toHaveBeenCalledTimes(4)
|
||||
expect(translate).toHaveBeenNthCalledWith(1, 'calendar', 'Untitled event')
|
||||
expect(translate).toHaveBeenNthCalledWith(2, 'calendar', 'Untitled event')
|
||||
expect(translate).toHaveBeenNthCalledWith(3, 'calendar', 'Untitled event')
|
||||
expect(translate).toHaveBeenNthCalledWith(4, 'calendar', 'Untitled event')
|
||||
expect(translate).toHaveBeenNthCalledWith(5, 'calendar', 'Untitled event')
|
||||
|
||||
expect(getAllObjectsInTimeRange).toHaveBeenCalledTimes(4)
|
||||
expect(getAllObjectsInTimeRange).toHaveBeenNthCalledWith(1, calendarObjects[0], start, end)
|
||||
|
|
Loading…
Reference in New Issue