asyncnomi 3 years ago
parent
commit
08da575cd3
  1. 20
      static/js/main.js

20
static/js/main.js

@ -402,11 +402,11 @@ function refreshListener() {
token: localStorage.getItem('token'), token: localStorage.getItem('token'),
activityUid: uid, activityUid: uid,
type: (children[0].innerHTML.substring(0, 5) == "Event") ? "event" : "treasure", type: (children[0].innerHTML.substring(0, 5) == "Event") ? "event" : "treasure",
title: children[0].children()[0].value, title: children[0].children[0].value,
desc: children[1].children()[0].value, desc: children[1].children[0].value,
where: children[2].children()[0].value, where: children[2].children[0].value,
start: new Date(children[3].children()[0].value).toString(), start: new Date(children[3].children[0].value).toString(),
end: (children[3].children().length == 0) ? null : new Date(children[4].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", contentType: "application/json; charset=utf-8",
dataType: "json", dataType: "json",
@ -466,11 +466,11 @@ function refreshListener() {
uid: localStorage.getItem('user'), uid: localStorage.getItem('user'),
token: localStorage.getItem('token'), token: localStorage.getItem('token'),
type: $("#activityType").val(), type: $("#activityType").val(),
title: children[2].children()[0].value, title: children[2].children[0].value,
desc: children[3].children()[0].value, desc: children[3].children[0].value,
where: children[4].children()[0].value, where: children[4].children[0].value,
start: new Date(children[5].children()[0].value).toString(), start: new Date(children[5].children[0].value).toString(),
end: ($("#activityType").val() == "treasure") ? null : new Date(children[6].children()[0].value).toString(), end: ($("#activityType").val() == "treasure") ? null : new Date(children[6].children[0].value).toString(),
}), }),
contentType: "application/json; charset=utf-8", contentType: "application/json; charset=utf-8",
dataType: "json", dataType: "json",

Loading…
Cancel
Save