Fixes filter. Excludes parent folder from possible matches.

This commit is contained in:
Lars Jung 2013-07-21 01:16:52 +02:00
parent 28ca49dc72
commit 31e2f9cc33

View file

@ -22,7 +22,7 @@ modulejs.define('ext/filter', ['_', '$', 'core/settings', 'core/resource', 'core
duration = 200;
if (re) {
$('#items .item').each(function () {
$('#items .item').not('.folder-parent').each(function () {
var label = $(this).find('.label').text();
@ -33,12 +33,12 @@ modulejs.define('ext/filter', ['_', '$', 'core/settings', 'core/resource', 'core
}
});
} else {
match = $('#items .item');
match = $('#items .item').not('.folder-parent');
}
if ($(match).length) {
if (match.length) {
$noMatch.hide();
} else {
} else if (noMatch.length) {
setTimeout(function () { $noMatch.show(); }, duration);
}
$(match).fadeIn(duration);