mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-01 23:20:51 +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) {
|
_formatBitrate: function (bits) {
|
||||||
if (typeof bits !== 'number') {
|
if (typeof bits !== 'number') {
|
||||||
return '';
|
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) {
|
if (Bs >= 1000000) {
|
||||||
return (bits / 1000000).toFixed(2) + ' Mbit/s';
|
return (Bs / 1000000).toFixed(2) + ' MB/s';
|
||||||
}
|
}
|
||||||
if (bits >= 1000) {
|
if (Bs >= 1000) {
|
||||||
return (bits / 1000).toFixed(2) + ' kbit/s';
|
return (Bs / 1000).toFixed(2) + ' KB/s';
|
||||||
}
|
}
|
||||||
return bits + ' bit/s';
|
return Bs + ' B/s';
|
||||||
},
|
},
|
||||||
|
|
||||||
_formatTime: function (seconds) {
|
_formatTime: function (seconds) {
|
||||||
|
Reference in New Issue
Block a user