Commit c295523a authored by Christoph Wurst's avatar Christoph Wurst Committed by GitHub
Browse files

Merge pull request #25259 from owncloud/search-fixsearchfromotherfilelists

Fix search result link for file results outside default list
parents e9a0a6d8 39b533d0
......@@ -133,7 +133,7 @@
this.handleFolderClick = function($row, result, event) {
// open folder
if (self.fileAppLoaded()) {
if (self.fileAppLoaded() && self.fileList.id === 'files') {
self.fileList.changeDirectory(result.path);
return false;
} else {
......@@ -142,7 +142,7 @@
};
this.handleFileClick = function($row, result, event) {
if (self.fileAppLoaded()) {
if (self.fileAppLoaded() && self.fileList.id === 'files') {
self.fileList.changeDirectory(OC.dirname(result.path));
self.fileList.scrollTo(result.name);
return false;
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment