diff --git a/static/js/main.js b/static/js/main.js index 9e84ae8..9820d78 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -402,11 +402,11 @@ function refreshListener() { token: localStorage.getItem('token'), activityUid: uid, type: (children[0].innerHTML.substring(0, 5) == "Event") ? "event" : "treasure", - title: children[0].children()[0].value, - desc: children[1].children()[0].value, - where: children[2].children()[0].value, - start: new Date(children[3].children()[0].value).toString(), - end: (children[3].children().length == 0) ? null : new Date(children[4].children()[0].value).toString(), + title: children[0].children[0].value, + desc: children[1].children[0].value, + where: children[2].children[0].value, + start: new Date(children[3].children[0].value).toString(), + end: (children[3].children.length == 0) ? null : new Date(children[4].children[0].value).toString(), }), contentType: "application/json; charset=utf-8", dataType: "json", @@ -466,11 +466,11 @@ function refreshListener() { uid: localStorage.getItem('user'), token: localStorage.getItem('token'), type: $("#activityType").val(), - title: children[2].children()[0].value, - desc: children[3].children()[0].value, - where: children[4].children()[0].value, - start: new Date(children[5].children()[0].value).toString(), - end: ($("#activityType").val() == "treasure") ? null : new Date(children[6].children()[0].value).toString(), + title: children[2].children[0].value, + desc: children[3].children[0].value, + where: children[4].children[0].value, + start: new Date(children[5].children[0].value).toString(), + end: ($("#activityType").val() == "treasure") ? null : new Date(children[6].children[0].value).toString(), }), contentType: "application/json; charset=utf-8", dataType: "json",