diff options
author | Peter Grassberger <petertheone@gmail.com> | 2016-04-01 15:30:45 (GMT) |
---|---|---|
committer | Peter Grassberger <petertheone@gmail.com> | 2016-04-01 15:30:45 (GMT) |
commit | 8db94592d6222fbd0153cf05c83724d7ac518634 (patch) | |
tree | fe89e9ed21ce849f3f5fcbfecff335d1cc90f409 /www/js/utils.js | |
parent | 3c584d7ee53ecfb35f32a2182971dfbc30009590 (diff) | |
parent | 4a79af6bf48f7543a407d86fc73ce70f39fc6d94 (diff) |
Merge branch 'master' into rdxportjs-refactor
Conflicts:
www/js/importer.js
www/js/jingles.js
www/js/musicpools.js
www/js/shows.js
Diffstat (limited to 'www/js/utils.js')
-rw-r--r-- | www/js/utils.js | 13 |
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'); + } +} |