Merge pull request #20156 from owncloud/files-filter-triger-once

dont trigger the scroll event of every single item we filter in the file list
This commit is contained in:
Robin Appelman 2015-10-30 12:52:04 +01:00
commit 3c01386a50
1 changed files with 3 additions and 2 deletions

View File

@ -2133,15 +2133,16 @@
this.hideIrrelevantUIWhenNoFilesMatch();
}
var that = this;
filter = filter.toLowerCase();
this.$fileList.find('tr').each(function(i,e) {
var $e = $(e);
if ($e.data('file').toString().toLowerCase().indexOf(filter.toLowerCase()) === -1) {
if ($e.data('file').toString().toLowerCase().indexOf(filter) === -1) {
$e.addClass('hidden');
that.$container.trigger('scroll');
} else {
$e.removeClass('hidden');
}
});
that.$container.trigger('scroll');
},
hideIrrelevantUIWhenNoFilesMatch:function() {
if (this._filter && this.fileSummary.summary.totalDirs + this.fileSummary.summary.totalFiles === 0) {