Commit 52be1334 authored by Guillaume Perréal's avatar Guillaume Perréal
Browse files

Reformate les tailles de fichier à l'activation.

Showing with 16 additions and 11 deletions
+16 -11
......@@ -20,17 +20,22 @@
delete options.downloadPrototype;
var formatSize = function(size) {
if(size > 1000000000) {
return (size/1000000000).toFixed(2) + ' Gio';
}
if(size > 1000000) {
return (size/1000000).toFixed(2) + ' Mio';
}
if(size > 1000) {
return (size/1000).toFixed(2)+ ' Kio';
}
return size + ' o';
};
if(size > 1000000000) {
return (size/1000000000).toFixed(2) + ' Gio';
}
if(size > 1000000) {
return (size/1000000).toFixed(2) + ' Mio';
}
if(size > 1000) {
return (size/1000).toFixed(2)+ ' Kio';
}
return size + ' o';
},
formatBitrate = function(rate) {
return formatSize(rate) + '/s';
};
$this.find('.template-download .size').each(function() { $(this).html(formatSize($(this).text())); });
var formatBitrate = function(rate) { return formatSize(rate) + '/s'; };
......
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