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.
This commit is contained in:
Vincent Petry 2016-06-24 11:32:14 +02:00
parent bf3ee69d86
commit 39b533d0d8
No known key found for this signature in database
GPG Key ID: AF8F9EFC56562186
1 changed files with 7 additions and 0 deletions

View File

@ -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;