DE skeleton loader

This commit is contained in:
Alexander Yuzhin 2019-07-19 16:05:44 +03:00
parent 70ca82b0df
commit 1339e29e10
3 changed files with 92 additions and 145 deletions

View file

@ -168,6 +168,8 @@ define([
window["flat_desine"] = true; window["flat_desine"] = true;
this.api = this.getApplication().getController('Viewport').getApi(); this.api = this.getApplication().getController('Viewport').getApi();
$('#editor_sdk').append('<div class="doc-placeholder">' + '<div class="line"></div>'.repeat(20) + '</div>');
if (this.api){ if (this.api){
this.api.SetDrawingFreeze(true); this.api.SetDrawingFreeze(true);
switch (value) { switch (value) {

View file

@ -22,157 +22,91 @@
z-index: 10000; z-index: 10000;
} }
.loader-page { .loadmask {
width: 100%; width: 100%;
height: 170px; height: 100%;
bottom: 42%;
position: absolute;
text-align: center;
line-height: 10px;
} }
.loader-logo { .loadmask > .brendpanel {
max-height: 160px;
margin-bottom: 10px;
}
.loader-page-romb {
width: 40px;
display: inline-block;
}
.loader-page-text {
width: 100%; width: 100%;
bottom: 42%; height: 56px;
position: absolute; background: #446995;
text-align: center;
color: #888;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
line-height: 20px;
} }
.loader-page-text-loading { .loadmask > .brendpanel > div {
font-size: 14px; display: flex;
align-items: center;
} }
.loader-page-text-customer { .loadmask > .brendpanel .spacer {
font-size: 16px; margin-left: auto;
margin-bottom: 5px;
} }
.romb { .loadmask > .brendpanel .loading-logo {
width: 40px; background: url(http://192.168.3.191:8080/web-apps-pro/apps/common/main/resources/img/header/header-logo.png) 50% 50% no-repeat;
height: 40px; width: 110px;
-webkit-transform: rotate(135deg) skew(20deg, 20deg); height: 20px;
-moz-transform: rotate(135deg) skew(20deg, 20deg);
-ms-transform: rotate(135deg) skew(20deg, 20deg);
-o-transform: rotate(135deg) skew(20deg, 20deg);
position: absolute;
background: red;
border-radius: 6px;
-webkit-animation: movedown 3s infinite ease;
-moz-animation: movedown 3s infinite ease;
-ms-animation: movedown 3s infinite ease;
-o-animation: movedown 3s infinite ease;
animation: movedown 3s infinite ease;
} }
#blue { .loadmask > .brendpanel .circle {
z-index: 3; vertical-align: middle;
background: #55bce6; width: 20px;
-webkit-animation-name: blue; height: 20px;
-moz-animation-name: blue; border-radius: 12px;
-ms-animation-name: blue; margin: 4px 10px;
-o-animation-name: blue; background: rgba(255, 255, 255, 0.2);
animation-name: blue;
} }
#red { .loadmask > .brendpanel .rect {
z-index:1; vertical-align: middle;
background: #de7a59; width: 50px;
-webkit-animation-name: red; height: 12px;
-moz-animation-name: red; border-radius: 3px;
-ms-animation-name: red; margin: 0 10px;
-o-animation-name: red; background: rgba(255, 255, 255, 0.2);
animation-name: red;
} }
#green { .loadmask > .placeholder {
z-index: 2; background: #fbfbfb;
background: #a1cb5c; width: 796px;
-webkit-animation-name: green; margin: 112px auto;
-moz-animation-name: green; height: 100%;
-ms-animation-name: green; border: 1px solid #dfdfdf;
-o-animation-name: green; padding-top: 50px;
animation-name: green;
} }
@-webkit-keyframes red { .loadmask > .placeholder > .line {
0% { top:120px; background: #de7a59; } height: 15px;
10% { top:120px; background: #F2CBBF; } margin: 30px 80px;
14% { background: #f4f4f4; top:120px; } background: #e2e2e2;
15% { background: #f4f4f4; top:0;} overflow: hidden;
20% { background: #E6E4E4; } position: relative;
30% { background: #D2D2D2; }
40% { top:120px; } -webkit-animation: flickerAnimation 2s infinite ease-in-out;
100% { top:120px; background: #de7a59; } -moz-animation: flickerAnimation 2s infinite ease-in-out;
-o-animation: flickerAnimation 2s infinite ease-in-out;
animation: flickerAnimation 2s infinite ease-in-out;
} }
@keyframes red { @keyframes flickerAnimation {
0% { top:120px; background: #de7a59; } 0% { opacity:0.1; }
10% { top:120px; background: #F2CBBF; } 50% { opacity:1; }
14% { background: #f4f4f4; top:120px; } 100% { opacity:0.1; }
15% { background: #f4f4f4; top:0; }
20% { background: #E6E4E4; }
30% { background: #D2D2D2; }
40% { top:120px; }
100% { top:120px; background: #de7a59; }
} }
@-o-keyframes flickerAnimation{
@-webkit-keyframes green { 0% { opacity:0.1; }
0% { top:110px; background: #a1cb5c; opacity:1; } 50% { opacity:1; }
10% { top:110px; background: #CBE0AC; opacity:1; } 100% { opacity:0.1; }
14% { background: #f4f4f4; top:110px; opacity:1; }
15% { background: #f4f4f4; top:0; opacity:1; }
20% { background: #f4f4f4; top:0; opacity:0; }
25% { background: #EFEFEF; top:0; opacity:1; }
30% { background:#E6E4E4; }
70% { top:110px; }
100% { top:110px; background: #a1cb5c; }
} }
@-moz-keyframes flickerAnimation{
@keyframes green { 0% { opacity:0.1; }
0% { top:110px; background: #a1cb5c; opacity:1; } 50% { opacity:1; }
10% { top:110px; background: #CBE0AC; opacity:1; } 100% { opacity:0.1; }
14% { background: #f4f4f4; top:110px; opacity:1; }
15% { background: #f4f4f4; top:0; opacity:1; }
20% { background: #f4f4f4; top:0; opacity:0; }
25% { background: #EFEFEF; top:0; opacity:1; }
30% { background:#E6E4E4; }
70% { top:110px; }
100% { top:110px; background: #a1cb5c; }
} }
@-webkit-keyframes flickerAnimation{
@-webkit-keyframes blue { 0% { opacity:0.1; }
0% { top:100px; background: #55bce6; opacity:1; } 50% { opacity:1; }
10% { top:100px; background: #BFE8F8; opacity:1; } 100% { opacity:0.1; }
14% { background: #f4f4f4; top:100px; opacity:1; }
15% { background: #f4f4f4; top:0; opacity:1; }
20% { background: #f4f4f4; top:0; opacity:0; }
25% { background: #f4f4f4; top:0; opacity:0; }
45% { background: #EFEFEF; top:0; opacity:0.2; }
100% { top:100px; background: #55bce6; }
}
@keyframes blue {
0% { top:100px; background: #55bce6; opacity:1; }
10% { top:100px; background: #BFE8F8; opacity:1; }
14% { background: #f4f4f4; top:100px; opacity:1; }
15% { background: #f4f4f4; top:0; opacity:1; }
20% { background: #f4f4f4; top:0; opacity:0; }
25% { background: #fff; top:0; opacity:0; }
45% { background: #EFEFEF; top:0; opacity:0.2; }
100% { top:100px; background: #55bce6; }
} }
</style> </style>
@ -256,21 +190,9 @@
else if ( lang == 'vi') loading = 'Đang tải...'; else if ( lang == 'vi') loading = 'Đang tải...';
else if ( lang == 'zh') loading = '加载中...'; else if ( lang == 'zh') loading = '加载中...';
if ( !stopLoading ) if (stopLoading) {
document.write( document.getElementById('loading-mask').remove();
'<div id="loading-mask" class="loadmask">' + }
'<div class="loader-page" style="margin-bottom: ' + margin + 'px;' + ((logo!==null) ? 'height: auto;' : '') + '">' +
((logo!==null) ? logo :
'<div class="loader-page-romb">' +
'<div class="romb" id="blue"></div>' +
'<div class="romb" id="green"></div>' +
'<div class="romb" id="red"></div>' +
'</div>') +
'</div>' +
'<div class="loader-page-text">' + customer +
'<div class="loader-page-text-loading">' + loading + '</div>' +
'</div>' +
'</div>');
</script> </script>
<!-- debug begin --> <!-- debug begin -->
@ -278,6 +200,7 @@
<!-- debug end --> <!-- debug end -->
</head> </head>
<body> <body>
<div id="loading-mask" class="loadmask"><div class="brendpanel"><div><div class="loading-logo"></div><div class="circle"></div><div class="circle"></div><div class="circle"></div><div class="circle"></div><div class="spacer"></div><div class="rect"></div></div><div><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><span class="rect"></span><div class="spacer"></div><span class="circle"></span><span class="circle"></span><span class="circle"></span></div></div><div class="placeholder"><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div><div class="line"></div></div></div>
<div id="viewport"></div> <div id="viewport"></div>
<script src="../../../vendor/svg-injector/svg-injector.min.js"></script> <script src="../../../vendor/svg-injector/svg-injector.min.js"></script>
@ -299,7 +222,7 @@
</script> </script>
<!-- debug begin --> <!-- debug begin -->
<script type="text/javascript">var less=less||{};less.env='development';</script> <script type="text/javascript">var less=less||{};less.env='development';less.async=true;</script>
<script src="../../../vendor/less/dist/less-2.7.1.js" type="text/javascript"></script> <script src="../../../vendor/less/dist/less-2.7.1.js" type="text/javascript"></script>
<!-- debug end --> <!-- debug end -->

View file

@ -145,3 +145,25 @@
@huge-icon-size: 37px; @huge-icon-size: 37px;
@x-huge-icon-size: 45px; @x-huge-icon-size: 45px;
.doc-placeholder {
background: #fbfbfb;
width: 796px;
margin: 40px auto;
height: 100%;
border: 1px solid #dfdfdf;
padding-top: 50px;
-webkit-animation: flickerAnimation 2s infinite ease-in-out;
-moz-animation: flickerAnimation 2s infinite ease-in-out;
-o-animation: flickerAnimation 2s infinite ease-in-out;
animation: flickerAnimation 2s infinite ease-in-out;
> .line {
height: 15px;
margin: 30px 80px;
background: #e2e2e2;
overflow: hidden;
position: relative;
}
}