From 3dde5e42704bb5633827f0b7ba4a403d98365c22 Mon Sep 17 00:00:00 2001
From: Christian Pointner <equinox@helsinki.at>
Date: Thu, 14 Jul 2016 01:11:57 +0200
Subject: added normalization step to progress bar


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%;
-- 
cgit v0.10.2