aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/js/filelist.js
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2014-12-18 23:11:42 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2015-01-02 10:28:41 +0100
commitb93f2ddcb577a262d170163f4bc7117b70ffa3f7 (patch)
tree9feb298d06fe763b3f5eb080446dedcdc9711ed5 /apps/files/js/filelist.js
parent7e6c660b008d158de92a664b56359ed0750b82a8 (diff)
downloadnextcloud-server-b93f2ddcb577a262d170163f4bc7117b70ffa3f7.tar.gz
nextcloud-server-b93f2ddcb577a262d170163f4bc7117b70ffa3f7.zip
hide header when no files in list match
Diffstat (limited to 'apps/files/js/filelist.js')
-rw-r--r--apps/files/js/filelist.js9
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