Shorten event titles, 'Berlin' is kind of redundant
This commit is contained in:
parent
5a4bdd3a81
commit
b1b8448206
1 changed files with 6 additions and 1 deletions
|
@ -68,6 +68,11 @@ function renderEvent(event, container) {
|
||||||
}
|
}
|
||||||
return val;
|
return val;
|
||||||
};
|
};
|
||||||
|
const cleanTitle = (title) => {
|
||||||
|
let cleaned = title.replace(/\sBerlin$/, '');
|
||||||
|
cleaned = cleaned.replace(/\sUser Group/, ' UG');
|
||||||
|
return cleaned;
|
||||||
|
};
|
||||||
const timeFormat = 'HH:MM';
|
const timeFormat = 'HH:MM';
|
||||||
if (event.allDay) {
|
if (event.allDay) {
|
||||||
time.innerHTML = '--:--';
|
time.innerHTML = '--:--';
|
||||||
|
@ -76,7 +81,7 @@ function renderEvent(event, container) {
|
||||||
}
|
}
|
||||||
|
|
||||||
code.innerHTML = `C${pad(event.id)}`;
|
code.innerHTML = `C${pad(event.id)}`;
|
||||||
destination.innerHTML = event.title;
|
destination.innerHTML = cleanTitle(event.title);
|
||||||
|
|
||||||
if (startDate.toDateString() !== prevDate.toDateString()) {
|
if (startDate.toDateString() !== prevDate.toDateString()) {
|
||||||
status.innerHTML = dateformat(startDate, 'dd.mm.');
|
status.innerHTML = dateformat(startDate, 'dd.mm.');
|
||||||
|
|
Loading…
Reference in a new issue