mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-28 14:04:45 -04:00
Fixes filter. Excludes parent folder from possible matches.
This commit is contained in:
parent
28ca49dc72
commit
31e2f9cc33
1 changed files with 4 additions and 4 deletions
|
@ -22,7 +22,7 @@ modulejs.define('ext/filter', ['_', '$', 'core/settings', 'core/resource', 'core
|
||||||
duration = 200;
|
duration = 200;
|
||||||
|
|
||||||
if (re) {
|
if (re) {
|
||||||
$('#items .item').each(function () {
|
$('#items .item').not('.folder-parent').each(function () {
|
||||||
|
|
||||||
var label = $(this).find('.label').text();
|
var label = $(this).find('.label').text();
|
||||||
|
|
||||||
|
@ -33,12 +33,12 @@ modulejs.define('ext/filter', ['_', '$', 'core/settings', 'core/resource', 'core
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
match = $('#items .item');
|
match = $('#items .item').not('.folder-parent');
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($(match).length) {
|
if (match.length) {
|
||||||
$noMatch.hide();
|
$noMatch.hide();
|
||||||
} else {
|
} else if (noMatch.length) {
|
||||||
setTimeout(function () { $noMatch.show(); }, duration);
|
setTimeout(function () { $noMatch.show(); }, duration);
|
||||||
}
|
}
|
||||||
$(match).fadeIn(duration);
|
$(match).fadeIn(duration);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue