correctly clear searchbox when switching filelists

This commit is contained in:
Jörn Friedrich Dreyer 2015-01-05 17:53:14 +01:00
parent 10038640ae
commit 7a812801db
2 changed files with 11 additions and 0 deletions

View file

@ -1713,6 +1713,9 @@
if (OCA.Search.files) {
OCA.Search.files.setFileList(this);
}
if (OC.Search) {
OC.Search.clear();
}
},
/**
* Update UI based on the current selection

View file

@ -229,6 +229,14 @@
$searchResults.find('tr.result').remove();
lastQuery = false;
};
this.clear = function() {
self.hideResults();
if(self.hasFilter(getCurrentApp())) {
self.getFilter(getCurrentApp())('');
}
$searchBox.val('');
$searchBox.blur();
};
/**
* Event handler for when scrolling the list container.