diff options
author | Vincent Petry <pvince81@owncloud.com> | 2016-06-24 11:32:14 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2016-06-24 17:14:12 +0200 |
commit | fd05ff03928a24085c4d67e26780a368d137c6ff (patch) | |
tree | 83f05a3c3f9e3d33a9e2d4b2b4933ce841d0542b | |
parent | 3128a2c03e27bdf5ed0106c25e7c59567238d633 (diff) | |
download | nextcloud-server-fd05ff03928a24085c4d67e26780a368d137c6ff.tar.gz nextcloud-server-fd05ff03928a24085c4d67e26780a368d137c6ff.zip |
Hide search results after switching directory
When clicking on a folder result in the search result list, the result
box for "results in another folder" must disappear.
-rw-r--r-- | apps/files/js/search.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/files/js/search.js b/apps/files/js/search.js index d35cacfa402..625e4b13f4b 100644 --- a/apps/files/js/search.js +++ b/apps/files/js/search.js @@ -184,6 +184,13 @@ search.setHandler('folder', this.handleFolderClick.bind(this)); search.setHandler(['file', 'audio', 'image'], this.handleFileClick.bind(this)); + + if (self.fileAppLoaded()) { + // hide results when switching directory outside of search results + $('#app-content').delegate('>div', 'changeDirectory', function() { + search.clear(); + }); + } } }; OCA.Search.Files = Files; |