Merge branch 'master' of ssh://161.35.163.87:/home/django/rts
This commit is contained in:
@@ -61,6 +61,24 @@ export function postAnswers(ans) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
alert(`Error submitting answers: ${data.error}`);
|
alert(`Error submitting answers: ${data.error}`);
|
||||||
|
var docHeight = $(document).height();
|
||||||
|
|
||||||
|
$("body").append(`<div id='overlay'><span style='color: white'><p>An error has occured when submit your answers. A copy of your answers are displayed below, you may wish to save a copy. Please refresh this page to continue.</p>${JSON.stringify(ans)}</span></div>`);
|
||||||
|
|
||||||
|
$("#overlay")
|
||||||
|
.height(docHeight)
|
||||||
|
.css({
|
||||||
|
'opacity' : 0.9,
|
||||||
|
'position': 'absolute',
|
||||||
|
'top': 0,
|
||||||
|
'left': 0,
|
||||||
|
'background-color': 'black',
|
||||||
|
'width': '100%',
|
||||||
|
'user-select': 'text',
|
||||||
|
'-moz-user-select': 'text',
|
||||||
|
'-webkit-user-select': 'text',
|
||||||
|
'z-index': 5000
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// $.post( "http://localhost:8000/submit_answers", JSON.stringify(ans));
|
// $.post( "http://localhost:8000/submit_answers", JSON.stringify(ans));
|
||||||
|
|||||||
+2
-2
@@ -53,13 +53,13 @@ function retrievePacketList() {
|
|||||||
url = window.config.exam_query_url;
|
url = window.config.exam_query_url;
|
||||||
}
|
}
|
||||||
|
|
||||||
$.getJSON(url, function (data) {
|
$.ajax({dataType: "json", cache: false, url: url, success : function (data) {
|
||||||
if (data.hasOwnProperty("exams")) {
|
if (data.hasOwnProperty("exams")) {
|
||||||
loadExamList(data);
|
loadExamList(data);
|
||||||
} else {
|
} else {
|
||||||
loadPacketList(data);
|
loadPacketList(data);
|
||||||
}
|
}
|
||||||
})
|
},})
|
||||||
.done(function () {})
|
.done(function () {})
|
||||||
.fail(function () {
|
.fail(function () {
|
||||||
$.getJSON("packets/packets.json", function (data) {
|
$.getJSON("packets/packets.json", function (data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user