Simplify corpus and job list data structure.

This commit is contained in:
Patrick Jentsch
2020-01-31 13:11:30 +01:00
parent 6e20e00c4e
commit 20200dac30
4 changed files with 134 additions and 179 deletions

View File

@ -4,7 +4,7 @@
<div class="col s12 m4">
<h3 id="title">{{ job.title }}</h3>
<p id="description">{{ job.description }}</p>
<a class="waves-effect waves-light btn" id="status"></a>
<a class="btn status waves-effect waves-light" id="status"></a>
</div>
@ -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;
}
}