fix sorting function foreal

This commit is contained in:
Ashley Teoh 2018-04-15 15:02:51 -04:00
parent 86c45a17ed
commit a299be7ff7

View File

@ -71,12 +71,14 @@ define([
}
if (b.size === undefined) {
return (ascending) ? 1 : -1;
return (ascending) ? -1 : 1;
}
if (a.size > b.size) {
return (ascending) ? 1 : -1;
} else {
}
if (b.size > a.size) {
return (ascending) ? -1 : 1;
}
@ -864,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").text(model.size || '');
item.find(".file_size").html(model.size || " ");
};