Merge remote-tracking branch 'upstream/stable9' into stable9-sync-upstream

This commit is contained in:
Lukas Reschke 2016-07-01 11:31:15 +02:00
commit 2c785ebdf1
No known key found for this signature in database
GPG Key ID: 9AB0ADB949B6898C
2 changed files with 10 additions and 2 deletions

View File

@ -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;

View File

@ -29,6 +29,7 @@
var self = this;
var xhr = this.xhrProvider();
headers = headers || {};
if (this.userName) {
headers['Authorization'] = 'Basic ' + btoa(this.userName + ':' + this.password);