[F.END] Display unconfirmed events with warning

This commit is contained in:
giuliof 2020-04-17 20:59:05 +02:00
parent 54ecdf5a8c
commit 065bbec7d1
1 changed files with 13 additions and 1 deletions

View File

@ -41,8 +41,20 @@ function zerocalcareDisplay() {
var locationString = 'Officina Informatica';
}
locationElement.appendChild(document.createTextNode('📍 ' + locationString));
eventElement.appendChild(titleElement);
// Check if event is not confirmed
if (typeof json_obj[i]['CLASS'] !== 'undefined' && json_obj[i]['CLASS'] == true) {
var unconfirmedElement = document.createElement('div');
unconfirmedElement.style.fontWeight = 'bold';
unconfirmedElement.appendChild(document.createTextNode('⚠️ Non confermato!'));
// Strike time, date and location to remark this concept
dateElement.style.textDecoration = 'line-through';
timeElement.style.textDecoration = 'line-through';
locationElement.style.textDecoration = 'line-through';
eventElement.appendChild(unconfirmedElement);
}
eventElement.appendChild(dateElement);
eventElement.appendChild(timeElement);
eventElement.appendChild(locationElement);