@@ -150,9 +150,7 @@
let analyseBtn, statusElement;
statusElement = document.getElementById("status");
- statusElement.classList.remove(...Object.values(CorpusList.STATUS_COLORS));
- statusElement.classList.add(CorpusList.STATUS_COLORS[status] || CorpusList.STATUS_COLORS['default']);
- statusElement.innerText = status;
+ statusElement.dataset.status = status;
analyseBtn = document.getElementById('analyse');
if (status === 'prepared' || status === 'analysing' || status === 'failed') {
analyseBtn.classList.remove('hide', 'disabled');
diff --git a/app/templates/jobs/job.html.j2 b/app/templates/jobs/job.html.j2
index d6931dc4..e2aa21f6 100644
--- a/app/templates/jobs/job.html.j2
+++ b/app/templates/jobs/job.html.j2
@@ -4,7 +4,7 @@
{{ job.title }}
{{ job.description }}
-
+
@@ -269,9 +269,7 @@
let statusElement;
statusElement = document.getElementById("status");
- statusElement.classList.remove(...Object.values(JobList.STATUS_COLORS));
- statusElement.classList.add(JobList.STATUS_COLORS[status] || JobList.STATUS_COLORS['default']);
- statusElement.innerText = status;
+ statusElement.dataset.status = status;
}
}