fix onScroll breaking search, fix keyboard navigation, fix filter for files in other dirs
This commit is contained in:
parent
ba931d2124
commit
10038640ae
|
@ -34,7 +34,12 @@
|
|||
return !!OCA.Files && !!OCA.Files.App;
|
||||
};
|
||||
function inFileList($row, result) {
|
||||
return self.fileAppLoaded() && self.fileList.inList(result.name);
|
||||
if (! self.fileAppLoaded()) {
|
||||
return false;
|
||||
}
|
||||
var dir = self.fileList.getCurrentDirectory().replace(/\/+$/,'');
|
||||
var resultDir = OC.dirname(result.path);
|
||||
return dir === resultDir && self.fileList.inList(result.name);
|
||||
}
|
||||
function updateLegacyMimetype(result) {
|
||||
// backward compatibility:
|
||||
|
|
|
@ -213,7 +213,7 @@
|
|||
var result = $searchResults.find('tr.result')[currentResult];
|
||||
if (result) {
|
||||
var $result = $(result);
|
||||
var currentOffset = $searchResults.scrollTop();
|
||||
var currentOffset = $('#app-content').scrollTop();
|
||||
$('#app-content').animate({
|
||||
// Scrolling to the top of the new result
|
||||
scrollTop: currentOffset + $result.offset().top - $result.height() * 2
|
||||
|
@ -235,7 +235,7 @@
|
|||
* This appends/renders the next page of entries when reaching the bottom.
|
||||
*/
|
||||
function onScroll(e) {
|
||||
if ($searchResults) {
|
||||
if ($searchResults && lastQuery !== false) {
|
||||
var resultsBottom = $searchResults.offset().top + $searchResults.height();
|
||||
var containerBottom = $searchResults.offsetParent().offset().top + $searchResults.offsetParent().height();
|
||||
if ( resultsBottom < containerBottom * 1.2 ) {
|
||||
|
|
Loading…
Reference in New Issue