aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-06-24 11:32:14 +0200
committerVincent Petry <pvince81@owncloud.com>2016-06-24 11:32:14 +0200
commit39b533d0d89557a2349dd09b4602ab7a1a8cb9ec (patch)
tree4c57b7e9caac0d73b388bd537794828d1d16e5b1 /apps
parentbf3ee69d8612a9f6df730ea5e28175317a24fe23 (diff)
downloadnextcloud-server-39b533d0d89557a2349dd09b4602ab7a1a8cb9ec.tar.gz
nextcloud-server-39b533d0d89557a2349dd09b4602ab7a1a8cb9ec.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.
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/search.js7
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;