From 4bb9ac7285b16e52d1a2574ab911bc367464c8ef Mon Sep 17 00:00:00 2001 From: Wim Brand Date: Mon, 25 May 2020 18:09:29 +0200 Subject: [PATCH] admin ui fixes --- res/include/script/file_manager/DirectoryElement.js | 8 ++------ res/template/admin.html | 9 ++++----- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/res/include/script/file_manager/DirectoryElement.js b/res/include/script/file_manager/DirectoryElement.js index d246c6c..4da9c0e 100644 --- a/res/include/script/file_manager/DirectoryElement.js +++ b/res/include/script/file_manager/DirectoryElement.js @@ -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 } } diff --git a/res/template/admin.html b/res/template/admin.html index 37f858c..e84eee5 100644 --- a/res/template/admin.html +++ b/res/template/admin.html @@ -150,15 +150,13 @@ Query - Events + Calls Average Duration Total Duration Callers - - - +