added description to event-calendar
This commit is contained in:
parent
66afba730e
commit
e65d2f4c88
1 changed files with 103 additions and 98 deletions
|
@ -13,7 +13,7 @@
|
||||||
height: 'auto',
|
height: 'auto',
|
||||||
locale: 'de',
|
locale: 'de',
|
||||||
firstDay: 1,
|
firstDay: 1,
|
||||||
eventClick: function(info) {
|
eventClick: function (info) {
|
||||||
const event = info.event;
|
const event = info.event;
|
||||||
const title = event.title;
|
const title = event.title;
|
||||||
const location = event.extendedProps.location || 'Nicht angegeben';
|
const location = event.extendedProps.location || 'Nicht angegeben';
|
||||||
|
@ -31,6 +31,7 @@
|
||||||
document.getElementById('modalEventTitle').textContent = title;
|
document.getElementById('modalEventTitle').textContent = title;
|
||||||
document.getElementById('modalEventDate').textContent = dateStr;
|
document.getElementById('modalEventDate').textContent = dateStr;
|
||||||
document.getElementById('modalEventLocation').textContent = location;
|
document.getElementById('modalEventLocation').textContent = location;
|
||||||
|
document.getElementById('modalEventDescription').textContent = event.extendedProps.description || 'Keine Beschreibung verfügbar';
|
||||||
|
|
||||||
const modal = new bootstrap.Modal(document.getElementById('eventModal'));
|
const modal = new bootstrap.Modal(document.getElementById('eventModal'));
|
||||||
modal.show();
|
modal.show();
|
||||||
|
@ -69,6 +70,7 @@
|
||||||
start: next.toJSDate(),
|
start: next.toJSDate(),
|
||||||
allDay: icalEvent.startDate.isDate,
|
allDay: icalEvent.startDate.isDate,
|
||||||
location: icalEvent.location,
|
location: icalEvent.location,
|
||||||
|
description: icalEvent.description,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -82,6 +84,7 @@
|
||||||
end: end,
|
end: end,
|
||||||
allDay: icalEvent.startDate.isDate,
|
allDay: icalEvent.startDate.isDate,
|
||||||
location: icalEvent.location,
|
location: icalEvent.location,
|
||||||
|
description: icalEvent.description,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
@ -112,6 +115,8 @@
|
||||||
<h4 id="modalEventTitle"></h4>
|
<h4 id="modalEventTitle"></h4>
|
||||||
<p><strong>Datum:</strong> <span id="modalEventDate"></span></p>
|
<p><strong>Datum:</strong> <span id="modalEventDate"></span></p>
|
||||||
<p><strong>Ort:</strong> <span id="modalEventLocation"></span></p>
|
<p><strong>Ort:</strong> <span id="modalEventLocation"></span></p>
|
||||||
|
<p><strong>Beschreibung:</strong></p>
|
||||||
|
<div id="modalEventDescription" style="overflow-wrap: anywhere; word-break: break-word;"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-secondary btn-lg" data-bs-dismiss="modal">Schließen</button>
|
<button type="button" class="btn btn-secondary btn-lg" data-bs-dismiss="modal">Schließen</button>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue