diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-07-15 12:31:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-15 12:31:03 +0200 |
commit | da4f3559c5f1ab5db77e2cb06c2d618fb228313b (patch) | |
tree | 75605f87e3dcfb7a7513baf00212f747a4063d26 | |
parent | f04f9321dfda4c46f8473dfe711e4c97e21a15bb (diff) | |
parent | 128910ebf12d4ef99a1f496cbe8fe7c6e7507230 (diff) | |
download | nextcloud-server-da4f3559c5f1ab5db77e2cb06c2d618fb228313b.tar.gz nextcloud-server-da4f3559c5f1ab5db77e2cb06c2d618fb228313b.zip |
Merge pull request #21720 from nextcloud/search-min-length-feedback
provide feedback about minimum length needed to trigger search
-rw-r--r-- | apps/files/js/filelist.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index e7d48d4bcd1..55ddaf1b4de 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -3234,7 +3234,12 @@ $('#searchresults').addClass('filter-empty'); $('#searchresults .emptycontent').addClass('emptycontent-search'); if ( $('#searchresults').length === 0 || $('#searchresults').hasClass('hidden') ) { - var error = t('files', 'No search results in other folders for {tag}{filter}{endtag}', {filter:this._filter}); + var error; + if (this._filter.length > 2) { + error = t('files', 'No search results in other folders for {tag}{filter}{endtag}', {filter:this._filter}); + } else { + error = t('files', 'Enter more than two characters to search in other folders'); + } this.$el.find('.nofilterresults').removeClass('hidden'). find('p').html(error.replace('{tag}', '<strong>').replace('{endtag}', '</strong>')); } |