Filter against any match on /app searching

Closes https://github.com/YunoHost/issues/issues/1347.
This commit is contained in:
Luke Murphy 2019-06-03 00:45:43 +02:00
parent 20e3f41a94
commit 9e9fe183cb
No known key found for this signature in database
GPG key ID: 5E2EF5A63E3718CC
4 changed files with 4 additions and 4 deletions

View file

@ -169,7 +169,7 @@ $(document).ready(function () {
var valThis = $('#filter-app-cards').val().toLowerCase();
$('.app-card').each(function(){
var text = $(this).find('h3').text().toLowerCase();
(text.indexOf(valThis) == 0 && $(this).find(filters_text).length > 0) ? $(this).show() : $(this).hide();
(text.indexOf(valThis) >= 0 && $(this).find(filters_text).length > 0) ? $(this).show() : $(this).hide();
});
(filters.indexOf("working") == -1) ?$('#community-app-list-warrant').hide():$('#community-app-list-warrant').show();
}

View file

@ -166,7 +166,7 @@ $(document).ready(function () {
var valThis = $('#filter-app-cards').val().toLowerCase();
$('.app-card').each(function(){
var text = $(this).find('h3').text().toLowerCase();
(text.indexOf(valThis) == 0 && $(this).find(filters_text).length > 0) ? $(this).show() : $(this).hide();
(text.indexOf(valThis) >= 0 && $(this).find(filters_text).length > 0) ? $(this).show() : $(this).hide();
});
(filters.indexOf("working") == -1) ?$('#community-app-list-warrant').hide():$('#community-app-list-warrant').show();
}

View file

@ -166,7 +166,7 @@ $(document).ready(function () {
var valThis = $('#filter-app-cards').val().toLowerCase();
$('.app-card').each(function(){
var text = $(this).find('h3').text().toLowerCase();
(text.indexOf(valThis) == 0 && $(this).find(filters_text).length > 0) ? $(this).show() : $(this).hide();
(text.indexOf(valThis) >= 0 && $(this).find(filters_text).length > 0) ? $(this).show() : $(this).hide();
});
(filters.indexOf("working") == -1) ?$('#community-app-list-warrant').hide():$('#community-app-list-warrant').show();
}

View file

@ -169,7 +169,7 @@ $(document).ready(function () {
var valThis = $('#filter-app-cards').val().toLowerCase();
$('.app-card').each(function(){
var text = $(this).find('h3').text().toLowerCase();
(text.indexOf(valThis) == 0 && $(this).find(filters_text).length > 0) ? $(this).show() : $(this).hide();
(text.indexOf(valThis) >= 0 && $(this).find(filters_text).length > 0) ? $(this).show() : $(this).hide();
});
(filters.indexOf("working") == -1) ?$('#community-app-list-warrant').hide():$('#community-app-list-warrant').show();
}