[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; 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 { .loader-content {
position: fixed; position: fixed;
top: 0; top: 0;
@ -239,17 +245,14 @@ div.br {
left: 0; left: 0;
right: 0; right: 0;
z-index: 2000; z-index: 2000;
text-align: center;
background: rgba(255, 255, 255, 0.5);
padding-top: 10%;
} }
.loader-popup {
.loader-content img { margin: auto;
display: inline-block; height: 24px;
vertical-align: middle; width: 24px;
background-position: center top;
} }
.help-block { .help-block {
text-align: right; 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-title').text(y18n.t('installing'));
$('#popup-body').html('<p>'+y18n.t('installation_complete_wait', [data.domain])+'</p>'); $('#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'); $('#popup').modal('show');
} else { } else {
loaded = false; loaded = false;
if ($('div.loader-content').length == 0) { if ($('div.loader').length == 0) {
setInterval(function () { setInterval(function () {
if (!loaded && $('div.loader-content').length == 0) { if (!loaded && $('div.loader').length == 0) {
$('#main').append('<div class="loader-content"><img src="img/ajax-loader.gif"></div>'); $('#main').append('<div class="loader loader-content"></div>');
} }
}, 500); }, 500);
} }
@ -173,7 +173,7 @@ app = Sammy('#main', function (sam) {
}) })
.done(function(data) { .done(function(data) {
loaded = true; 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 enableSlide = true; // Change to false to disable animation
loaded = true; loaded = true;
$('div.loader-content').remove(); $('div.loader').remove();
if (enableSlide) { if (enableSlide) {
function leSwap() { function leSwap() {