Update javascript code.

This commit is contained in:
James Cole
2017-01-02 08:30:20 +01:00
parent 3cd0540474
commit 533797fc9e
23 changed files with 24 additions and 110 deletions

View File

@@ -24,7 +24,6 @@ $(function () {
function startExport() {
"use strict";
console.log('Start export...');
hideForm();
showLoading();
hideError();
@@ -75,15 +74,12 @@ function showError(text) {
function callExport() {
"use strict";
console.log('Start callExport()...')
var data = $('#export').serialize();
// call status, keep calling it until response is "finished"?
intervalId = window.setInterval(checkStatus, 500);
$.post('export/submit', data).done(function (data) {
console.log('Export hath succeeded!');
// stop polling:
window.clearTimeout(intervalId);
@@ -114,7 +110,6 @@ function callExport() {
function checkStatus() {
"use strict";
console.log('get status...');
$.getJSON('export/status/' + jobKey).done(function (data) {
putStatusText(data.status);
});