[enh] Better loader styling.

This commit is contained in:
opi 2014-05-16 18:38:46 +02:00
parent a0c1557460
commit fb057eadfb
3 changed files with 18 additions and 15 deletions

View file

@ -232,6 +232,12 @@ div.br {
height: 30px;
}
.loader {
display: block;
z-index: 2000;
text-align: center;
background: rgba(255, 255, 255, 0.5) url(../img/ajax-loader.gif) center 15% no-repeat;
}
.loader-content {
position: fixed;
top: 0;
@ -239,17 +245,14 @@ div.br {
left: 0;
right: 0;
z-index: 2000;
text-align: center;
background: rgba(255, 255, 255, 0.5);
padding-top: 10%;
}
.loader-content img {
display: inline-block;
vertical-align: middle;
.loader-popup {
margin: auto;
height: 24px;
width: 24px;
background-position: center top;
}
.help-block {
text-align: right;
}

2
css/style.min.css vendored

File diff suppressed because one or more lines are too long

View file

@ -104,14 +104,14 @@ app = Sammy('#main', function (sam) {
$('#popup-title').text(y18n.t('installing'));
$('#popup-body').html('<p>'+y18n.t('installation_complete_wait', [data.domain])+'</p>');
$('#popup-body').append('<div class="loader-content"><img src="img/ajax-loader.gif"></div>');
$('#popup-body').append('<div class="loader loader-popup"></div>');
$('#popup').modal('show');
} else {
loaded = false;
if ($('div.loader-content').length == 0) {
if ($('div.loader').length == 0) {
setInterval(function () {
if (!loaded && $('div.loader-content').length == 0) {
$('#main').append('<div class="loader-content"><img src="img/ajax-loader.gif"></div>');
if (!loaded && $('div.loader').length == 0) {
$('#main').append('<div class="loader loader-content"></div>');
}
}, 500);
}
@ -173,7 +173,7 @@ app = Sammy('#main', function (sam) {
})
.done(function(data) {
loaded = true;
$('div.loader-content').remove();
$('div.loader').remove();
});
},
@ -184,7 +184,7 @@ app = Sammy('#main', function (sam) {
enableSlide = true; // Change to false to disable animation
loaded = true;
$('div.loader-content').remove();
$('div.loader').remove();
if (enableSlide) {
function leSwap() {