summaryrefslogtreecommitdiffstats
path: root/apps/files/js
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2015-01-02 14:22:48 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2015-01-02 14:22:48 +0100
commit2eec8dc156d6bbeb8a40fa9547fbc266bd881437 (patch)
tree6be60c9df9fa935b5dfdfbd448275097f2d8bf4c /apps/files/js
parent0cca9e26c41a1957b3a574d33b3835ea76c63e13 (diff)
downloadnextcloud-server-2eec8dc156d6bbeb8a40fa9547fbc266bd881437.tar.gz
nextcloud-server-2eec8dc156d6bbeb8a40fa9547fbc266bd881437.zip
correctly update search results when query is changed, show spinner when searching
Diffstat (limited to 'apps/files/js')
-rw-r--r--apps/files/js/search.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files/js/search.js b/apps/files/js/search.js
index ec93b937690..dd8d3a6e502 100644
--- a/apps/files/js/search.js
+++ b/apps/files/js/search.js
@@ -34,13 +34,13 @@
function inFileList($row, result) {
return self.fileAppLoaded() && OCA.Files.App.fileList.inList(result.name);
}
- function updateLegacyMimetype(result){
+ function updateLegacyMimetype(result) {
// backward compatibility:
if (!result.mime && result.mime_type) {
result.mime = result.mime_type;
}
}
- function hideNoFilterResults (){
+ function hideNoFilterResults() {
var $nofilterresults = $('#nofilterresults');
if ( ! $nofilterresults.hasClass('hidden') ) {
$nofilterresults.addClass('hidden');
@@ -158,6 +158,9 @@
search.setFilter('files', function (query) {
if (self.fileAppLoaded()) {
OCA.Files.App.fileList.setFilter(query);
+ if (query.length > 2) {
+ $('#nofilterresults').addClass('hidden');
+ }
}
});