Use CSS to remove the loading screen
This commit is contained in:
parent
a26031c119
commit
fa6106a6bb
@ -7,6 +7,9 @@ The CSS inside of loading.js is precompiled in order to save 200ish milliseconds
|
|||||||
@import (once) "./include/browser.less";
|
@import (once) "./include/browser.less";
|
||||||
|
|
||||||
#cp-loading {
|
#cp-loading {
|
||||||
|
transition: opacity 0.75s, visibility 0s 0.75s;
|
||||||
|
visibility: visible;
|
||||||
|
opacity: 1;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 10000000; // #loading
|
z-index: 10000000; // #loading
|
||||||
top: 0px;
|
top: 0px;
|
||||||
@ -37,6 +40,10 @@ The CSS inside of loading.js is precompiled in order to save 200ish milliseconds
|
|||||||
height: 100px;
|
height: 100px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&.cp-loading-hidden {
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#cp-loading-tip {
|
#cp-loading-tip {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|||||||
@ -434,7 +434,8 @@ define([
|
|||||||
var hideLogo = config.hideLogo;
|
var hideLogo = config.hideLogo;
|
||||||
var $loading, $container;
|
var $loading, $container;
|
||||||
if ($('#' + LOADING).length) {
|
if ($('#' + LOADING).length) {
|
||||||
$loading = $('#' + LOADING).show();
|
$loading = $('#' + LOADING); //.show();
|
||||||
|
$loading.removeClass('cp-loading-hidden');
|
||||||
if (loadingText) {
|
if (loadingText) {
|
||||||
$('#' + LOADING).find('p').text(loadingText);
|
$('#' + LOADING).find('p').text(loadingText);
|
||||||
}
|
}
|
||||||
@ -465,7 +466,8 @@ define([
|
|||||||
// This test is created in sframe-boot2.js
|
// This test is created in sframe-boot2.js
|
||||||
if (Test.__ASYNC_BLOCKER__) { Test.__ASYNC_BLOCKER__.pass(); }
|
if (Test.__ASYNC_BLOCKER__) { Test.__ASYNC_BLOCKER__.pass(); }
|
||||||
|
|
||||||
$('#' + LOADING).fadeOut(750, cb);
|
$('#' + LOADING).addClass("cp-loading-hidden");
|
||||||
|
//$('#' + LOADING).fadeOut(750, cb);
|
||||||
var $tip = $('#cp-loading-tip').css('top', '')
|
var $tip = $('#cp-loading-tip').css('top', '')
|
||||||
// loading.less sets transition-delay: $wait-time
|
// loading.less sets transition-delay: $wait-time
|
||||||
// and transition: opacity $fadeout-time
|
// and transition: opacity $fadeout-time
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
define([], function () {
|
define([], function () {
|
||||||
var loadingStyle = (function(){/*
|
var loadingStyle = (function(){/*
|
||||||
#cp-loading {
|
#cp-loading {
|
||||||
|
transition: opacity 0.75s, visibility 0s 0.75s;
|
||||||
|
visibility: visible;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
z-index: 10000000;
|
z-index: 10000000;
|
||||||
top: 0px;
|
top: 0px;
|
||||||
@ -11,6 +13,11 @@ define([], function () {
|
|||||||
color: #fafafa;
|
color: #fafafa;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 1.5em;
|
font-size: 1.5em;
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
#cp-loading.cp-loading-hidden {
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
#cp-loading .cp-loading-container {
|
#cp-loading .cp-loading-container {
|
||||||
margin-top: 50vh;
|
margin-top: 50vh;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user