summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2016-07-01 11:31:15 +0200
committerLukas Reschke <lukas@owncloud.com>2016-07-01 11:31:15 +0200
commit2c785ebdf1eb7bd57fc6c0e19ceeba6190b88076 (patch)
treeacc3201af3ca935b164a2c05c28970b4b9909d7e /apps
parent07c43751d145ccd95a9313628d3194f2ecb26f23 (diff)
parentabdc587b5c5e105ae7329cfc18e7eb4a22726163 (diff)
downloadnextcloud-server-2c785ebdf1eb7bd57fc6c0e19ceeba6190b88076.tar.gz
nextcloud-server-2c785ebdf1eb7bd57fc6c0e19ceeba6190b88076.zip
Merge remote-tracking branch 'upstream/stable9' into stable9-sync-upstream
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/search.js11
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/files/js/search.js b/apps/files/js/search.js
index 394bcb48603..625e4b13f4b 100644
--- a/apps/files/js/search.js
+++ b/apps/files/js/search.js
@@ -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;