[F.END] Text style for planned events
This commit is contained in:
parent
97dc951052
commit
92172f1ec7
|
@ -59,23 +59,31 @@ function zerocalcareDisplay() {
|
||||||
eventElement.appendChild(titleElement);
|
eventElement.appendChild(titleElement);
|
||||||
// Check if event is not confirmed
|
// Check if event is not confirmed
|
||||||
if (typeof json_obj[i]['STATUS'] === 'string') {
|
if (typeof json_obj[i]['STATUS'] === 'string') {
|
||||||
// Strike time, date and location to remark this concept
|
if (json_obj[i]['STATUS'] == 'TENTATIVE') {
|
||||||
var strikeEvent = function (message) {
|
// Make the text a bit lighter and italic
|
||||||
|
dateText.style.fontStyle =
|
||||||
|
timeText.style.fontStyle =
|
||||||
|
locationText.style.fontStyle = 'italic';
|
||||||
|
dateText.style.color =
|
||||||
|
timeText.style.color =
|
||||||
|
locationText.style.color = 'gray';
|
||||||
|
// Add note
|
||||||
|
var unconfirmedElement = document.createElement('div');
|
||||||
|
unconfirmedElement.style.fontWeight = 'bold';
|
||||||
|
unconfirmedElement.appendChild(document.createTextNode('⚠️ Non confermato!'));
|
||||||
|
eventElement.appendChild(unconfirmedElement);
|
||||||
|
}
|
||||||
|
else if (json_obj[i]['STATUS'] == 'CANCELLED') {
|
||||||
|
// Strike time, date and location to remark this concept
|
||||||
dateText.style.textDecoration = 'line-through';
|
dateText.style.textDecoration = 'line-through';
|
||||||
timeText.style.textDecoration = 'line-through';
|
timeText.style.textDecoration = 'line-through';
|
||||||
locationText.style.textDecoration = 'line-through';
|
locationText.style.textDecoration = 'line-through';
|
||||||
|
// Add note
|
||||||
var unconfirmedElement = document.createElement('div');
|
var unconfirmedElement = document.createElement('div');
|
||||||
unconfirmedElement.style.fontWeight = 'bold';
|
unconfirmedElement.style.fontWeight = 'bold';
|
||||||
unconfirmedElement.appendChild(document.createTextNode(message));
|
unconfirmedElement.appendChild(document.createTextNode('⚠️ Cancellato!'));
|
||||||
eventElement.appendChild(unconfirmedElement);
|
eventElement.appendChild(unconfirmedElement);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (json_obj[i]['STATUS'] == 'TENTATIVE') {
|
|
||||||
strikeEvent('⚠️ Non confermato!');
|
|
||||||
}
|
|
||||||
else if (json_obj[i]['STATUS'] == 'CANCELLED') {
|
|
||||||
strikeEvent('⚠️ Cancellato!');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
eventElement.appendChild(dateElement);
|
eventElement.appendChild(dateElement);
|
||||||
eventElement.appendChild(timeElement);
|
eventElement.appendChild(timeElement);
|
||||||
|
|
Loading…
Reference in New Issue