Browse Source

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

Johan Ahlen 8 years ago
parent
commit
6824568bcf

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

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