sort by time per default
This commit is contained in:
parent
14204a7304
commit
e61c1805cd
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue