diff options
author | Morris Jobke <hey@morrisjobke.de> | 2016-07-01 15:20:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-01 15:20:08 +0200 |
commit | 6e3bf06c1d79b4cdb1d59cef63294c21b17cd0de (patch) | |
tree | 2d156442287ac8f7492228c6652a9b96ee5348e0 | |
parent | 23cc465b0d610aada816963fbfa66b10443f3567 (diff) | |
parent | 2c785ebdf1eb7bd57fc6c0e19ceeba6190b88076 (diff) | |
download | nextcloud-server-6e3bf06c1d79b4cdb1d59cef63294c21b17cd0de.tar.gz nextcloud-server-6e3bf06c1d79b4cdb1d59cef63294c21b17cd0de.zip |
Merge pull request #274 from nextcloud/stable9-sync-upstream
[Stable9] sync upstream
-rw-r--r-- | apps/files/js/search.js | 11 | ||||
-rw-r--r-- | core/js/files/iedavclient.js | 1 |
2 files changed, 10 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; diff --git a/core/js/files/iedavclient.js b/core/js/files/iedavclient.js index 9e83f5b9a22..a0185fb3bec 100644 --- a/core/js/files/iedavclient.js +++ b/core/js/files/iedavclient.js @@ -29,6 +29,7 @@ var self = this; var xhr = this.xhrProvider(); + headers = headers || {}; if (this.userName) { headers['Authorization'] = 'Basic ' + btoa(this.userName + ':' + this.password); |