From 7bfa0de1d01aa74dd52c3ec52438756e636c7b35 Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Mon, 18 Feb 2019 22:45:22 +0100 Subject: [PATCH] Simplify JavaScript --- server/static/index.html | 1 + server/static/worker.js | 17 ++++------------- 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/server/static/index.html b/server/static/index.html index 30901fd..696f0e8 100644 --- a/server/static/index.html +++ b/server/static/index.html @@ -15,6 +15,7 @@

Panorama Image Export

+

by Kumi Systems

diff --git a/server/static/worker.js b/server/static/worker.js index 150e40e..b1d3cf1 100644 --- a/server/static/worker.js +++ b/server/static/worker.js @@ -22,7 +22,6 @@ function deletecard(jobid) { }; } - function addcard(jobid, title) { var text = '
Creating Image
' + title + '
'; $('#cards').append(text); @@ -30,21 +29,13 @@ function addcard(jobid, title) { } function failcard(jobid, title) { - deletecard(jobid, title); - - var text = '
' + title + ': Export failed.
'; - $('#cards').append(text); + var text = '
' + title + ': Export failed.
'; + $("#" + jobid).html(text); } - function finishcard(jobid, title, video) { - deletecard(jobid); - if (!video) { - var text = '
Final Image
' + title + '
'; - } else { - var text = '
Final Video
' + title + '
'; - }; - $('#cards').append(text); + var text = '
Final ' + (video ?
' + title + '
'; + $("#" + jobid).html(text); var counter = 0; var interval = setInterval(function() {