Add a spinning loading icon to modal forms

This commit is contained in:
Oliver Walters 2019-05-04 16:58:03 +10:00
parent b6cace2681
commit 1d9e31c229
2 changed files with 17 additions and 2 deletions

View File

@ -152,3 +152,18 @@
.part-allocation-overallocated {
background: #ccf5ff;
}
.glyphicon-refresh-animate {
-animation: spin .7s infinite linear;
-webkit-animation: spin2 .7s infinite linear;
}
@-webkit-keyframes spin2 {
from { -webkit-transform: rotate(0deg);}
to { -webkit-transform: rotate(360deg);}
}
@keyframes spin {
from { transform: scale(1) rotate(0deg);}
to { transform: scale(1) rotate(360deg);}
}

View File

@ -24,7 +24,7 @@ function loadingMessageContent() {
*/
// TODO - This can be made a lot better
return '<b>Loading...</b>';
return "<span class='glyphicon glyphicon-refresh glyphicon-refresh-animate'></span> Waiting for server...";
}
@ -263,7 +263,7 @@ function openModal(options) {
if (options.title) {
modalSetTitle(modal, options.title);
} else {
modalSetTitle(modal, 'Loading Form Data...');
modalSetTitle(modal, 'Loading Data...');
}
// Unless the content is explicitly set, display loading message