diff --git a/notebook/static/tree/js/notebooklist.js b/notebook/static/tree/js/notebooklist.js index 860632785..fb8104ec3 100644 --- a/notebook/static/tree/js/notebooklist.js +++ b/notebook/static/tree/js/notebooklist.js @@ -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 || " "); };