diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2015-01-02 12:50:21 +0100 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2015-01-02 12:50:21 +0100 |
commit | 0cca9e26c41a1957b3a574d33b3835ea76c63e13 (patch) | |
tree | b4795ecd6a32dddebcd9e359343579d0ba73ab75 /apps/files/js | |
parent | 9e3f4e043f6204a336a6efc4a9c39f23723d0522 (diff) | |
download | nextcloud-server-0cca9e26c41a1957b3a574d33b3835ea76c63e13.tar.gz nextcloud-server-0cca9e26c41a1957b3a574d33b3835ea76c63e13.zip |
show no files found message
Diffstat (limited to 'apps/files/js')
-rw-r--r-- | apps/files/js/filelist.js | 5 | ||||
-rw-r--r-- | apps/files/js/search.js | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index e01a029bc97..48c990872d1 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1685,9 +1685,14 @@ if (this._filter && this.fileSummary.summary.totalDirs + this.fileSummary.summary.totalFiles === 0) { this.$el.find('#filestable thead th').addClass('hidden'); this.$el.find('#emptycontent').addClass('hidden'); + if ( $('#searchresults').length === 0 || $('#searchresults').hasClass('hidden')) { + this.$el.find('#nofilterresults').removeClass('hidden'). + find('p').text(t('files', 'No entries in this folder match \'{filter}\'', {filter:this._filter})); + } } else { this.$el.find('#filestable thead th').toggleClass('hidden', this.isEmpty); this.$el.find('#emptycontent').toggleClass('hidden', !this.isEmpty); + this.$el.find('#nofilterresults').addClass('hidden'); } }, /** diff --git a/apps/files/js/search.js b/apps/files/js/search.js index 73eccd06dcf..ec93b937690 100644 --- a/apps/files/js/search.js +++ b/apps/files/js/search.js @@ -40,11 +40,18 @@ result.mime = result.mime_type; } } + function hideNoFilterResults (){ + var $nofilterresults = $('#nofilterresults'); + if ( ! $nofilterresults.hasClass('hidden') ) { + $nofilterresults.addClass('hidden'); + } + } this.renderFolderResult = function($row, result) { if (inFileList($row, result)) { return null; } + hideNoFilterResults(); /*render folder icon, show path beneath filename, show size and last modified date on the right */ this.updateLegacyMimetype(result); @@ -61,6 +68,7 @@ if (inFileList($row, result)) { return null; } + hideNoFilterResults(); /*render preview icon, show path beneath filename, show size and last modified date on the right */ this.updateLegacyMimetype(result); |