diff options
author | Christian Pointner <equinox@helsinki.at> | 2016-07-13 23:11:57 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2016-07-13 23:13:23 (GMT) |
commit | 3dde5e42704bb5633827f0b7ba4a403d98365c22 (patch) | |
tree | 975502992f0bfdac1b8e678c4db4b0019ac24c5d /www | |
parent | 52233b8ca0dd227cfdc1dbed9bb7f4d04c5d152f (diff) |
added normalization step to progress bar
Diffstat (limited to 'www')
-rw-r--r-- | www/js/utils.js | 11 | ||||
-rw-r--r-- | www/styles/main-style.css | 6 |
2 files changed, 15 insertions, 2 deletions
diff --git a/www/js/utils.js b/www/js/utils.js index 8337c12..e672570 100644 --- a/www/js/utils.js +++ b/www/js/utils.js @@ -151,9 +151,16 @@ function updateProgressBar($el, upload) { Number((upload.uploadprogress.total/1024)/1024).toFixed(1) + " MB"; $el.find('.file-bytes').text(bytes_str); $el.find('.progress .progress-bar').css("width", upload.uploadprogress.progress + "%"); + } else if(upload.uploadprogress.progress_step < 3) { + $el.find('.file-bytes').text('normalisiere...'); + $el.find('.progress .progress-bar').css("width", upload.uploadprogress.progress + "%"); } else { $el.find('.file-bytes').text('importiere...'); - $el.find('.progress .progress-bar').css('width', '100%'); - $el.find('.progress .progress-bar').addClass('progress-bar-striped').addClass('active'); + if (upload.uploadprogress.progress < 99) { + $el.find('.progress .progress-bar').css("width", upload.uploadprogress.progress + "%"); + } else { + $el.find('.progress .progress-bar').css("width", "100%"); + $el.find('.progress .progress-bar').addClass('progress-bar-striped').addClass('active'); + } } } diff --git a/www/styles/main-style.css b/www/styles/main-style.css index b76c32f..3c09e11 100644 --- a/www/styles/main-style.css +++ b/www/styles/main-style.css @@ -44,6 +44,12 @@ body { margin-bottom: 0; } +.progress-bar { + -webkit-transition: width .2s ease !important; + -o-transition: width .2s ease !important; + transition: width .2s ease !important; +} + .main-selector { height: 2.5em; width: 100%; |