LoadingBar improvements

This commit is contained in:
Tobias Reich 2015-04-01 22:20:28 +02:00
parent 82e78da455
commit 5686e83461
4 changed files with 5 additions and 8 deletions

BIN
dist/main.css vendored

Binary file not shown.

BIN
dist/main.js vendored

Binary file not shown.

View File

@ -34,10 +34,9 @@ loadingBar.show = function(status, errorText) {
// Modify loading // Modify loading
loadingBar.dom() loadingBar.dom()
.removeClass('loading uploading error') .removeClass('loading uploading error')
.addClass(status)
.html('<h1>Error: <span>' + errorText + '</span></h1>') .html('<h1>Error: <span>' + errorText + '</span></h1>')
.show() .addClass(status)
.css('height', '40px'); .show();
// Set timeout // Set timeout
clearTimeout(loadingBar._timeout); clearTimeout(loadingBar._timeout);
@ -66,6 +65,7 @@ loadingBar.show = function(status, errorText) {
// Modify loading // Modify loading
loadingBar.dom() loadingBar.dom()
.removeClass('loading uploading error') .removeClass('loading uploading error')
.html('')
.addClass('loading') .addClass('loading')
.show(); .show();
@ -87,11 +87,6 @@ loadingBar.hide = function(force) {
// Move header up // Move header up
if (visible.header()) header.dom().removeClass('error loading'); if (visible.header()) header.dom().removeClass('error loading');
// Modify loading
loadingBar.dom()
.html('')
.css('height', '3px');
// Set timeout // Set timeout
clearTimeout(loadingBar._timeout); clearTimeout(loadingBar._timeout);
setTimeout(function() { loadingBar.dom().hide() }, 300); setTimeout(function() { loadingBar.dom().hide() }, 300);

View File

@ -18,10 +18,12 @@
/* Modes ------------------------------------------------*/ /* Modes ------------------------------------------------*/
&.loading { &.loading {
height: 3px;
background-image: linear-gradient(to right, #153674 0%, #153674 47%, #2651AE 53%, #2651AE 100%); background-image: linear-gradient(to right, #153674 0%, #153674 47%, #2651AE 53%, #2651AE 100%);
z-index: 2; z-index: 2;
} }
&.error { &.error {
height: 40px;
background-color: #2f0d0e; background-color: #2f0d0e;
background-image: linear-gradient(to right, #451317 0%, #451317 47%, #AA3039 53%, #AA3039 100%); background-image: linear-gradient(to right, #451317 0%, #451317 47%, #AA3039 53%, #AA3039 100%);
z-index: 1; z-index: 1;