aboutsummaryrefslogtreecommitdiffstats
path: root/search
diff options
context:
space:
mode:
authorJörn Friedrich Dreyer <jfd@butonic.de>2015-01-05 17:53:14 +0100
committerJörn Friedrich Dreyer <jfd@butonic.de>2015-01-05 17:53:14 +0100
commit7a812801db6cc2cddf4e176dc893b07c7c486d76 (patch)
treec89db47b3fb160cbec4faeddc2f0606f2f327b3a /search
parent10038640aeab6b156c15cac9fe8da438dad31d7b (diff)
downloadnextcloud-server-7a812801db6cc2cddf4e176dc893b07c7c486d76.tar.gz
nextcloud-server-7a812801db6cc2cddf4e176dc893b07c7c486d76.zip
correctly clear searchbox when switching filelists
Diffstat (limited to 'search')
-rw-r--r--search/js/search.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/search/js/search.js b/search/js/search.js
index 58778900a69..c595ae25092 100644
--- a/search/js/search.js
+++ b/search/js/search.js
@@ -229,6 +229,14 @@
$searchResults.find('tr.result').remove();
lastQuery = false;
};
+ this.clear = function() {
+ self.hideResults();
+ if(self.hasFilter(getCurrentApp())) {
+ self.getFilter(getCurrentApp())('');
+ }
+ $searchBox.val('');
+ $searchBox.blur();
+ };
/**
* Event handler for when scrolling the list container.