admin ui fixes

This commit is contained in:
2020-05-25 18:09:29 +02:00
parent 5b6addfccb
commit 4bb9ac7285
2 changed files with 6 additions and 11 deletions

View File

@@ -83,11 +83,7 @@ DirectoryElement.prototype.addFile = function(icon, name, href, type, size, size
}
DirectoryElement.prototype.renderFiles = function() {
this.visibleFiles = []
for (let i in this.allFiles) {
this.visibleFiles.push(i)
}
this.sortBy("")
this.search(this.lastSearchTerm)
}
// search filters the allFiles array on a search term. All files which match the
@@ -129,7 +125,7 @@ DirectoryElement.prototype.sortBy = function(field) {
this.currentSortAscending = true
this.currentSortField = field
} else if (this.currentSortField === field) {
// If it is the same field as before re reverse the sort order
// If it is the same field as before we reverse the sort order
this.currentSortAscending = !this.currentSortAscending
}
}