mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 15:09:14 +00:00
[file upload] use 'B' instead of 'bit' for showing progress
This commit is contained in:
17
media/js/jquery.fileupload-ui.js
vendored
17
media/js/jquery.fileupload-ui.js
vendored
@@ -328,17 +328,20 @@
|
||||
_formatBitrate: function (bits) {
|
||||
if (typeof bits !== 'number') {
|
||||
return '';
|
||||
} else {
|
||||
var Bs = bits / 8;
|
||||
}
|
||||
if (bits >= 1000000000) {
|
||||
return (bits / 1000000000).toFixed(2) + ' Gbit/s';
|
||||
|
||||
if (Bs >= 1000000000) {
|
||||
return (Bs / 1000000000).toFixed(2) + ' GB/s';
|
||||
}
|
||||
if (bits >= 1000000) {
|
||||
return (bits / 1000000).toFixed(2) + ' Mbit/s';
|
||||
if (Bs >= 1000000) {
|
||||
return (Bs / 1000000).toFixed(2) + ' MB/s';
|
||||
}
|
||||
if (bits >= 1000) {
|
||||
return (bits / 1000).toFixed(2) + ' kbit/s';
|
||||
if (Bs >= 1000) {
|
||||
return (Bs / 1000).toFixed(2) + ' KB/s';
|
||||
}
|
||||
return bits + ' bit/s';
|
||||
return Bs + ' B/s';
|
||||
},
|
||||
|
||||
_formatTime: function (seconds) {
|
||||
|
Reference in New Issue
Block a user