mirror of
https://github.com/ONLYOFFICE/onlyoffice.github.io.git
synced 2026-02-10 18:05:06 +08:00
Add loader
This commit is contained in:
29
sdkjs-plugins/v1/loader.css
Normal file
29
sdkjs-plugins/v1/loader.css
Normal file
@ -0,0 +1,29 @@
|
||||
.asc-plugin-loader {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin-top: -10px;
|
||||
z-index: 10000;
|
||||
line-height: 20px;
|
||||
background-image: none;
|
||||
background-color: transparent;
|
||||
color: #444444;
|
||||
transform: translate(-50%, 0);
|
||||
}
|
||||
.asc-plugin-loader .asc-loader-image {
|
||||
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyMCAyMCI+PGNpcmNsZSBjeD0iMTAiIGN5PSIxMCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNDQ0IiBzdHJva2Utd2lkdGg9IjEuNSIgcj0iNy4yNSIgc3Ryb2tlLWRhc2hhcnJheT0iMTYwJSwgNDAlIiAvPjwvc3ZnPg==);
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
float: left;
|
||||
margin-top: -1px;
|
||||
|
||||
animation-duration: .8s;
|
||||
animation-name: slidein;
|
||||
animation-iteration-count: infinite;
|
||||
animation-timing-function: linear;
|
||||
}
|
||||
|
||||
.asc-plugin-loader .asc-loader-title {
|
||||
font-size: 13px;
|
||||
padding-left: 25px;
|
||||
}
|
||||
11
sdkjs-plugins/v1/loader.js
Normal file
11
sdkjs-plugins/v1/loader.js
Normal file
@ -0,0 +1,11 @@
|
||||
/**
|
||||
*
|
||||
* var loader = showLoader(document.getElementById("parent-id"))
|
||||
* loader.remove()
|
||||
*
|
||||
*/
|
||||
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>');
|
||||
$(parent).append(loader);
|
||||
return loader;
|
||||
};
|
||||
Reference in New Issue
Block a user