Merge pull request #25259 from owncloud/search-fixsearchfromotherfilelists
Fix search result link for file results outside default list
This commit is contained in:
commit
c295523ae2
1 changed files with 9 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue