浏览代码

HUE-7625 [assist] Sort the folders in the documents panel and home by name

Johan Ahlen 8 年之前
父节点
当前提交
6824568bcf
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      desktop/core/src/desktop/static/desktop/js/document/hueFileEntry.js

+ 3 - 0
desktop/core/src/desktop/static/desktop/js/document/hueFileEntry.js

@@ -26,6 +26,9 @@ var HueFileEntry = (function () {
       if (!a.isDirectory() && b.isDirectory()) {
         return 1;
       }
+      if (a.isDirectory() && b.isDirectory()) {
+        return sorts.nameAsc(a, b);
+      }
       return sorts.lastModifiedDesc(a, b);
     },
     nameAsc: function (a, b) {