Fix search result link for file results outside default list

When outside the "All files" list, the search result link must properly
redirect to the "All files" list.
pull/226/head^2
Vincent Petry 9 years ago
parent 04e3da0cf5
commit bf3ee69d86
No known key found for this signature in database
GPG Key ID: AF8F9EFC56562186
  1. 4
      apps/files/js/search.js

@ -133,7 +133,7 @@
this.handleFolderClick = function($row, result, event) { this.handleFolderClick = function($row, result, event) {
// open folder // open folder
if (self.fileAppLoaded()) { if (self.fileAppLoaded() && self.fileList.id === 'files') {
self.fileList.changeDirectory(result.path); self.fileList.changeDirectory(result.path);
return false; return false;
} else { } else {
@ -142,7 +142,7 @@
}; };
this.handleFileClick = function($row, result, event) { 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.changeDirectory(OC.dirname(result.path));
self.fileList.scrollTo(result.name); self.fileList.scrollTo(result.name);
return false; return false;

Loading…
Cancel
Save