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 3128a2c03e
commit fd05ff0392
No known key found for this signature in database
GPG key ID: AF8F9EFC56562186

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;