diff options
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r-- | apps/files/js/filelist.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 88c81fb43af..910441bf267 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1668,6 +1668,8 @@ */ setFilter:function(filter) { this._filter = filter; + this.fileSummary.setFilter(filter, this.files); + this.hideHeaderWhenNoFilesMatch(); var that = this; this.$fileList.find('tr').each(function(i,e) { var $e = $(e); @@ -1679,6 +1681,13 @@ } }); }, + hideHeaderWhenNoFilesMatch:function() { + if (this._filter && this.fileSummary.summary.totalDirs + this.fileSummary.summary.totalFiles === 0) { + this.$el.find('#filestable thead th').addClass('hidden'); + } else { + this.$el.find('#filestable thead th').removeClass('hidden'); + } + }, /** * get the current filter * @param filter |