Add a spinner on the loading page

This commit is contained in:
Gaël Métais
2014-09-05 14:32:49 +02:00
parent 9772403609
commit 7b6b7bc58d
4 changed files with 32 additions and 0 deletions
+12
View File
@@ -33,20 +33,32 @@
statusElement.innerHTML = 'Waiting behind ' + (position) + ' other tests';
}
sendPositionInQueueToGA(position);
// Rotate the spinner
document.body.className = 'waiting';
});
socket.on('complete', function() {
statusElement.innerHTML = 'Test complete';
window.location.replace('/results/' + testId);
// Stop the spinner
document.body.className = '';
});
socket.on('failed', function() {
statusElement.innerHTML = 'Test failed';
window.location.replace('/results/' + testId);
// Stop the spinner
document.body.className = '';
});
socket.on('404', function() {
statusElement.innerHTML = 'Test not found';
// Stop the spinner
document.body.className = '';
});
askStatus();
+14
View File
@@ -1,4 +1,18 @@
#status {
margin-top: 2em;
font-size: 2.5em;
}
@-webkit-keyframes rotating {
from { -webkit-transform: rotate(0deg); }
to { -webkit-transform: rotate(360deg); }
}
@keyframes rotating {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}
.waiting .icon-lab {
-webkit-animation: rotating 3s linear 0s infinite;
animation: rotating 3s linear 0s infinite;
}
+3
View File
@@ -26,6 +26,9 @@ input[type=submit] {
}
h1 span {
display: inline-block;
height: 1em;
width: 1em;
color: #ffa319;
}
+3
View File
@@ -26,6 +26,9 @@ input[type=submit] {
cursor: pointer;
}
h1 span {
display: inline-block;
height: 1em;
width: 1em;
color: #ffa319;
}
.footer {