mirror of https://github.com/zulip/zulip.git
attachments_ui: Remove unnecessary export of bytes_to_size.
This commit is contained in:
parent
14e8ac5675
commit
a2fa087235
|
@ -16,7 +16,7 @@ function delete_attachments(attachment) {
|
|||
});
|
||||
}
|
||||
|
||||
exports.bytes_to_size = function (bytes, kb_with_1024_bytes) {
|
||||
function bytes_to_size(bytes, kb_with_1024_bytes) {
|
||||
if (kb_with_1024_bytes === undefined) {
|
||||
kb_with_1024_bytes = false;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ exports.bytes_to_size = function (bytes, kb_with_1024_bytes) {
|
|||
size = Math.round((bytes / Math.pow(kb_size, i)) * 10) / 10;
|
||||
}
|
||||
return size + ' ' + sizes[i];
|
||||
};
|
||||
}
|
||||
|
||||
exports.set_up_attachments = function () {
|
||||
// The settings page must be rendered before this function gets called.
|
||||
|
@ -40,7 +40,7 @@ exports.set_up_attachments = function () {
|
|||
_.each(attachments, function (attachment) {
|
||||
var time = new XDate(attachment.create_time);
|
||||
attachment.create_time_str = timerender.render_now(time).time_str;
|
||||
attachment.size_str = exports.bytes_to_size(attachment.size);
|
||||
attachment.size_str = bytes_to_size(attachment.size);
|
||||
});
|
||||
|
||||
var uploaded_files_table = $("#uploaded_files_table").expectOne();
|
||||
|
|
Loading…
Reference in New Issue