From 065bbec7d154d67d0aea7f5791543500653c0671 Mon Sep 17 00:00:00 2001 From: giuliof Date: Fri, 17 Apr 2020 20:59:05 +0200 Subject: [PATCH] [F.END] Display unconfirmed events with warning --- frontend/frontend.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/frontend/frontend.js b/frontend/frontend.js index cd30dce..39ba6d3 100644 --- a/frontend/frontend.js +++ b/frontend/frontend.js @@ -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);