sort by time per default

This commit is contained in:
Mohammad Naghavi 2016-02-11 15:59:19 +01:00
parent 14204a7304
commit e61c1805cd

View file

@ -76,6 +76,14 @@ $(document).ready(function () {
url: filesBaseUrl + path,
success: function (filesData) {
filesData.map(function (fileData) {
return fileData.mtime = new Date(fileData.mtime);
});
filesData.sort(function (fileA, fileB) {
return fileB.mtime.getTime() - fileA.mtime.getTime();
});
fileListElement.empty();
var parentDir = getParentDir(path);