DE-mobile skeleton loader

This commit is contained in:
Alexander Yuzhin 2019-07-22 13:45:02 +03:00
parent bdc69aec84
commit 1bfaa3cc26
5 changed files with 155 additions and 150 deletions

View file

@ -122,6 +122,8 @@ define([
'translate': translate 'translate': translate
}); });
$('#editor_sdk').append('<div class="doc-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>');
// Localization uiApp params // Localization uiApp params
uiApp.params.modalButtonOk = me.textOK; uiApp.params.modalButtonOk = me.textOK;
uiApp.params.modalButtonCancel = me.textCancel; uiApp.params.modalButtonCancel = me.textCancel;
@ -599,6 +601,8 @@ define([
$(document).on('contextmenu', _.bind(me.onContextMenu, me)); $(document).on('contextmenu', _.bind(me.onContextMenu, me));
Common.Gateway.documentReady(); Common.Gateway.documentReady();
$('.doc-placeholder').remove();
}, },
onLicenseChanged: function(params) { onLicenseChanged: function(params) {

View file

@ -16,172 +16,113 @@
<style type="text/css"> <style type="text/css">
.loadmask { .loadmask {
position: absolute;
left: 0; left: 0;
top: 0; top: 0;
position: absolute;
height: 100%; height: 100%;
width: 100%; width: 100%;
overflow: hidden; overflow: hidden;
border: none; border: none;
background-color: #f4f4f4; background-color: #f4f4f4;
z-index: 100; z-index: 10000;
} }
.loader-page { .loadmask {
width: 100%;
height: 100%;
}
.loadmask > .brendpanel {
width: 100%; width: 100%;
height: 170px;
bottom: 42%;
position: absolute; position: absolute;
text-align: center; height: 44px;
line-height: 10px; background-color: #e2e2e2;
opacity: 0;
} }
.loader-logo { .loadmask > .brendpanel.visible {
max-height: 160px; opacity: 1;
margin-bottom: 10px;
} }
.loader-page-romb { .loadmask > .brendpanel.android {
width: 40px; height: 56px;
background: #446995;
}
.loadmask > .brendpanel > div {
display: flex;
align-items: center;
height: 100%;
}
.loadmask > .brendpanel .loading-logo {
max-width: 200px;
height: 20px;
margin: 0 auto;
}
.loadmask > .brendpanel .loading-logo > i {
display: inline-block; display: inline-block;
width: 86px;
height: 20px;
background-image: url(http://192.168.3.191:8080/web-apps-pro/apps/common/main/resources/img/header/header-logo.png);
background-repeat: no-repeat;
} }
.loader-page-text { .loadmask > .brendpanel .circle {
vertical-align: middle;
width: 28px;
height: 28px;
border-radius: 14px;
margin: 4px 10px;
background: rgba(255, 255, 255, 0.2);
}
.loadmask > .placeholder {
background: #fbfbfb;
width: 100%; width: 100%;
bottom: 42%; height: 100%;
position: absolute; padding-top: 56px;
text-align: center;
color: #888;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
line-height: 20px;
} }
.loader-page-text-loading { .loadmask > .placeholder > .line {
font-size: 14px; height: 15px;
margin: 30px;
background: #e2e2e2;
overflow: hidden;
position: relative;
-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;
} }
.loader-page-text-customer { @keyframes flickerAnimation {
font-size: 16px; 0% { opacity:0.1; }
margin-bottom: 5px; 50% { opacity:1; }
100% { opacity:0.1; }
} }
@-o-keyframes flickerAnimation{
.romb { 0% { opacity:0.1; }
width: 40px; 50% { opacity:1; }
height: 40px; 100% { opacity:0.1; }
-webkit-transform: rotate(135deg) skew(20deg, 20deg);
-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;
} }
@-moz-keyframes flickerAnimation{
#blue { 0% { opacity:0.1; }
z-index: 3; 50% { opacity:1; }
background: #55bce6; 100% { opacity:0.1; }
-webkit-animation-name: blue;
-moz-animation-name: blue;
-ms-animation-name: blue;
-o-animation-name: blue;
animation-name: blue;
} }
@-webkit-keyframes flickerAnimation{
#red { 0% { opacity:0.1; }
z-index:1; 50% { opacity:1; }
background: #de7a59; 100% { opacity:0.1; }
-webkit-animation-name: red;
-moz-animation-name: red;
-ms-animation-name: red;
-o-animation-name: red;
animation-name: red;
}
#green {
z-index: 2;
background: #a1cb5c;
-webkit-animation-name: green;
-moz-animation-name: green;
-ms-animation-name: green;
-o-animation-name: green;
animation-name: green;
}
@-webkit-keyframes red {
0% { top:120px; background: #de7a59; }
10% { top:120px; background: #F2CBBF; }
14% { background: #f4f4f4; top:120px; }
15% { background: #f4f4f4; top:0;}
20% { background: #E6E4E4; }
30% { background: #D2D2D2; }
40% { top:120px; }
100% { top:120px; background: #de7a59; }
}
@keyframes red {
0% { top:120px; background: #de7a59; }
10% { top:120px; background: #F2CBBF; }
14% { background: #f4f4f4; top:120px; }
15% { background: #f4f4f4; top:0; }
20% { background: #E6E4E4; }
30% { background: #D2D2D2; }
40% { top:120px; }
100% { top:120px; background: #de7a59; }
}
@-webkit-keyframes green {
0% { top:110px; background: #a1cb5c; opacity:1; }
10% { top:110px; background: #CBE0AC; opacity: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; }
}
@keyframes green {
0% { top:110px; background: #a1cb5c; opacity:1; }
10% { top:110px; background: #CBE0AC; opacity: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 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: #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>
</head> </head>
<body> <body>
<div id="loading-mask" class="loadmask"><div class="brendpanel"><div><div class="circle"></div><div class="loading-logo"><i></i></div><div class="circle"></div></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>
<script type="text/javascript"> <script type="text/javascript">
function getUrlParams() { function getUrlParams() {
var e, var e,
@ -235,20 +176,13 @@
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 = '加载中...';
document.write( var brendpanel = document.getElementsByClassName('brendpanel')[0];
'<div id="loading-mask" class="loadmask">' + if (brendpanel) {
'<div class="loader-page" style="margin-bottom: ' + margin + 'px;' + ((logo!==null) ? 'height: auto;' : '') + '">' + if (/Android/.test(navigator.userAgent)) {
((logo!==null) ? logo : brendpanel.classList.add('android');
'<div class="loader-page-romb">' + }
'<div class="romb" id="blue"></div>' + brendpanel.classList.add('visible');
'<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>
<div id="viewport"></div> <div id="viewport"></div>

View file

@ -7012,3 +7012,24 @@ html.pixel-ratio-3 .numbers li {
#user-list ul:before { #user-list ul:before {
content: none; content: none;
} }
.doc-placeholder {
background: #fbfbfb;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 10;
}
.doc-placeholder > .line {
height: 15px;
margin: 30px;
background: #e2e2e2;
overflow: hidden;
position: relative;
-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;
}

View file

@ -6783,3 +6783,24 @@ html.pixel-ratio-3 .numbers li {
#user-list ul:before { #user-list ul:before {
content: none; content: none;
} }
.doc-placeholder {
background: #fbfbfb;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 10;
}
.doc-placeholder > .line {
height: 15px;
margin: 30px;
background: #e2e2e2;
overflow: hidden;
position: relative;
-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;
}

View file

@ -269,4 +269,29 @@ input, textarea {
ul:before { ul:before {
content: none; content: none;
} }
}
// Skeleton of document
.doc-placeholder {
background: #fbfbfb;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
z-index: 10;
> .line {
height: 15px;
margin: 30px;
background: #e2e2e2;
overflow: hidden;
position: relative;
-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;
}
} }