refactor(exam-correct): use fa spin class

This commit is contained in:
Sarah Vaupel 2020-01-27 14:44:47 +01:00 committed by Gregor Kleen
parent 029aba1d61
commit 4e2810d9bb
2 changed files with 2 additions and 12 deletions

View File

@ -321,7 +321,7 @@ export class ExamCorrect {
// TODO set edit button visibility
console.error('Invalid response');
}
row.querySelectorAll('.exam-correct--loading').forEach((elem) => {
row.querySelectorAll('.fa-spin').forEach((elem) => {
setStatus(elem, status);
});
newEntry.status = status || STATUS.FAILURE;
@ -517,7 +517,7 @@ function setStatus(elem, status) {
const successClasses = ['fas', 'fa-fw', 'fa-check', 'exam-correct--success'];
const ambiguousClasses = ['fas', 'fa-fw', 'fa-question', 'exam-correct--ambiguous'];
const errorClasses = ['fas', 'fa-fw', 'fa-times', 'exam-correct--error'];
const loadingClasses = ['fas', 'fa-fw', 'fa-spinner-third', 'exam-correct--loading'];
const loadingClasses = ['fas', 'fa-fw', 'fa-spinner-third', 'fa-spin'];
elem.classList.remove(...successClasses, ...ambiguousClasses, ...errorClasses, ...loadingClasses);

View File

@ -27,13 +27,3 @@ $exam-correct--input-status-margin: 10px
.exam-correct--error
color: var(--color-error)
// TODO move to general app style
.exam-correct--loading
animation: spin 2s linear infinite
@keyframes spin
0%
transform: rotate(0deg)
100%
transform: rotate(360deg)