Commit 3c24e692 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Améliore la précision de la barre d'upload.

Showing with 5 additions and 4 deletions
+5 -4
......@@ -123,11 +123,12 @@
if(!data.context || e.isDefaultPrevented()) {
return;
}
var progress = Math.floor(data.loaded / data.total * 100);
var percent = data.loaded / data.total * 100,
percentText = percent.toFixed(1);
data.context.each(function () {
$this.find('.progress').show().attr('aria-valuenow', progress);
$this.find('.progress-bar').css('width', progress + '%');
$this.find('.progress-text').show().html(progress + '% ('+formatBitrate(data.bitrate)+')');
$this.find('.progress').show().attr('aria-valuenow', percentText);
$this.find('.progress-bar').css('width', percent + '%');
$this.find('.progress-text').show().html(percentText + '% ('+formatBitrate(data.bitrate)+')');
});
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment