summaryrefslogtreecommitdiffstats
path: root/search/js/search.js
diff options
context:
space:
mode:
Diffstat (limited to 'search/js/search.js')
-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.