Skip to content

Commit

Permalink
New excel file
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommimon committed Apr 11, 2021
1 parent bf9911e commit 8697d6d
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 25 deletions.
2 changes: 1 addition & 1 deletion load_data.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var url="https://spreadsheets.google.com/feeds/cells/1SbRQO-gG28PeCcYJ1uu87_jMw3oDEBh1sx6tAMAVFMc/1/public/full?alt=json";
var url="https://spreadsheets.google.com/feeds/cells/1OQn4DmL6pa-DbMTHjzwXOkDoTgb0-x3lUMv8Z_PuYQ4/1/public/full?alt=json";

var jsonData; // save data for next script

Expand Down
23 changes: 10 additions & 13 deletions map.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,33 +81,30 @@ function parseMarkers() {
case '2':
pinList[row].name = val;
break;
case '10':
case '3':
let parts = val.split(')');
pinList[row].goalNum = parts[0];
pinList[row].goalText = parts[1];
break;
case '11':
case '4':
pinList[row].date = val;
break;
case '7':
pinList[row].title = val;
break;
case '3':
pinList[row].description = val;
break;
case '4':
case '5':
pinList[row].location.lat = val;
break;
case '5':
case '6':
pinList[row].location.lng = val;
break;
case '6':
pinList[row].link = val;
case '7':
pinList[row].title = val;
break;
case '8':
pinList[row].image = val;
pinList[row].description = val;
break;
case '9':
pinList[row].link = val;
break;
case '10':
pinList[row].approved = val;
break;
}
Expand Down
22 changes: 11 additions & 11 deletions send_form.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,24 @@ function sendForm(){
let dateParts = dateString.split('-');
let pos = positions[document.getElementById("scelta").selectedIndex]
const data = {
'entry.498570121': name, // nome gruppo
'entry.1599795084': pos.lat, // latitude
'entry.874512289' : pos.lng, // longitude
'entry.1208166438': title, // titolo attività
'entry.686134094': description, // descrizione attività
'entry.381325376': goals[goalNum-1], // goal
'entry.316786119_year': dateParts[0],
'entry.316786119_month': dateParts[1],
'entry.316786119_day': dateParts[2],
'entry.386410129': document.getElementById("link").value, // link
'entry.1647215669': name, // nome gruppo
'entry.468238840': pos.lat.toString(), // latitude
'entry.415691257' : pos.lng.toString(), // longitude
'entry.1693764111': title, // titolo attività
'entry.1037527314': description, // descrizione attività
'entry.1851639960': goals[goalNum-1], // goal
'entry.564386048_year': dateParts[0],
'entry.564386048_month': dateParts[1],
'entry.564386048_day': dateParts[2],
'entry.1833049209': document.getElementById("link").value, // link
'entry.1000183872': "", // image
'draftResponse': [],
'pageHistory': 0
};

$.ajax({
type: "POST",
url: 'https://docs.google.com/forms/d/e/1FAIpQLScIvJxCeU-96ODoQMybQMhO95yMjB0hBftsOV0272J6PWDK6g/formResponse',
url: 'https://docs.google.com/forms/u/1/d/e/1FAIpQLSff5ctf9pYndw9ml3RqAOQgJa8sf7YvNaYWtatIq8by8UxDvw/formResponse',
data: data,
error: function(xhr, status, error){
document.location.href = "final_page.html";
Expand Down

0 comments on commit 8697d6d

Please sign in to comment.