diff --git a/public/js/eventHandler.js b/public/js/eventHandler.js index 9c48c99..f77cc21 100644 --- a/public/js/eventHandler.js +++ b/public/js/eventHandler.js @@ -61,12 +61,13 @@ export function initEvents(map) { noticeCoordsPicker.style.display = 'none'; remainingForm.style.display = 'block'; map.getContainer().style.cursor = 'auto'; + const formattedDate = new Date().toISOString(); const tmpMarker = { coordinate: { x: formInputCoordX.value, y: formInputCoordY.value }, name: "", description: "Compila il form per aggiungere un marker qui. Oppure annulla l'inserimento del marker cliccando sulla X in alto a destra", filename: "../img/trashw.png", - ts: Date.now().toString(), + ts: formattedDate, } tmpMarkerSet = createMarker(tmpMarker, L, map, true) isTmpMarkerSet = true diff --git a/public/js/markerHandler.js b/public/js/markerHandler.js index 8482fbe..b0bf5eb 100644 --- a/public/js/markerHandler.js +++ b/public/js/markerHandler.js @@ -15,8 +15,9 @@ export function createMarker(markerData, L, map, returnMarker = false){ let popUpContentTitle = "
"+ markerData.description +"
"; let popUpContentImage = ""; - let popUpContentDate = "Inserito il: " + markerData.ts.substring(0, 10) + "
alle " + markerData.ts.substring(11, 16) + "
Inserito il: " + markerData.ts.substring(0, 10) + "
alle: " + markerData.ts.substring(11, 16) + "
" + "alle: " + markerData.ts.substring(11, 16) + "
"; + let popUpContent = popUpContentTitle + popUpContentdescription + popUpContentImage + popUpContentDate //+ popUpContentHour marker.bindPopup(popUpContent); if(returnMarker) { return marker;