From 4e2810d9bb43f85ec62dfdd012a895afc4c8b503 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Mon, 27 Jan 2020 14:44:47 +0100 Subject: [PATCH] refactor(exam-correct): use fa spin class --- frontend/src/utils/exam-correct/exam-correct.js | 4 ++-- frontend/src/utils/exam-correct/exam-correct.sass | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/frontend/src/utils/exam-correct/exam-correct.js b/frontend/src/utils/exam-correct/exam-correct.js index 598220f3c..4ed6c1f4e 100644 --- a/frontend/src/utils/exam-correct/exam-correct.js +++ b/frontend/src/utils/exam-correct/exam-correct.js @@ -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); diff --git a/frontend/src/utils/exam-correct/exam-correct.sass b/frontend/src/utils/exam-correct/exam-correct.sass index 39a62d212..e971a33ae 100644 --- a/frontend/src/utils/exam-correct/exam-correct.sass +++ b/frontend/src/utils/exam-correct/exam-correct.sass @@ -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)