Fix loader

This commit is contained in:
Julia Radzhabova
2020-12-17 13:46:15 +03:00
parent 0766f89ec4
commit 1be3f3f533
2 changed files with 17 additions and 2 deletions

View File

@ -1,3 +1,15 @@
@keyframes rotation {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.asc-loader-container {
position: relative;
}
.asc-plugin-loader {
position: absolute;
left: 50%;
@ -17,8 +29,9 @@
float: left;
margin-top: -1px;
animation-duration: .8s;
animation-name: slidein;
animation-name: rotation;
animation-iteration-count: infinite;
animation-timing-function: linear;
}
@ -26,4 +39,5 @@
.asc-plugin-loader .asc-loader-title {
font-size: 13px;
padding-left: 25px;
}
}

View File

@ -3,6 +3,7 @@
* var loader = showLoader(document.getElementById("parent-id"))
* loader.remove()
*
* parent must have position: relative
*/
showLoader = function (parent, text) {
var loader = $('<div class="asc-plugin-loader" ><div class="asc-loader-image"></div><div class="asc-loader-title">' + (text || 'Loading') + '</div></div>');