summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2015-01-02 12:50:21 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2015-01-02 12:50:21 +0100
commit0cca9e26c41a1957b3a574d33b3835ea76c63e13 (patch)
treeb4795ecd6a32dddebcd9e359343579d0ba73ab75 /apps/files/js
parent9e3f4e043f6204a336a6efc4a9c39f23723d0522 (diff)
downloadnextcloud-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.js5
-rw-r--r--apps/files/js/search.js8
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);