empty function to format filesize

Ashley Teoh 8 years ago
parent a299be7ff7
commit 6475eaa73f

@ -1039,6 +1039,11 @@ define([
}
};
var format_filesize = function(filesize) {
if (filesize) {
return filesize + " bytes";
}
}
// javascript stores text as utf16 and string indices use "code units",
// which stores high-codepoint characters as "surrogate pairs",
@ -1180,6 +1185,7 @@ define([
parse_b64_data_uri: parse_b64_data_uri,
time: time,
format_datetime: format_datetime,
format_filesize: format_filesize,
datetime_sort_helper: datetime_sort_helper,
dnd_contain_file: dnd_contain_file,
js_idx_to_char_idx: js_idx_to_char_idx,

@ -866,7 +866,7 @@ define([
// Add in the date that the file was last modified
item.find(".item_modified").text(utils.format_datetime(model.last_modified));
item.find(".item_modified").attr("title", moment(model.last_modified).format("YYYY-MM-DD HH:mm"));
item.find(".file_size").html(model.size || " ");
item.find(".file_size").html(utils.format_filesize(model.size) || " ");
};

Loading…
Cancel
Save