summaryrefslogtreecommitdiff
path: root/www/js/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'www/js/utils.js')
-rw-r--r--www/js/utils.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/www/js/utils.js b/www/js/utils.js
index 81501e9..26b0822 100644
--- a/www/js/utils.js
+++ b/www/js/utils.js
@@ -140,3 +140,16 @@ jQuery.fn.brightness = function() {
if (this.parent().length) return this.parent().brightness();
}
};
+
+function updateProgressBar($el, upload) {
+ if(upload.uploadprogress.progress < 99) {
+ var bytes_str = Number((upload.uploadprogress.bytesSent/1024)/1024).toFixed(1) + " von " +
+ 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 {
+ $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');
+ }
+}