mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
fixes #1315 filter on tags no longer cares about case
* searching "Pa" will find both "Pasta" and "pasta" * the searched word can be "included" in the result, not only "starting with". "ta" will find "pasta". Thanks to @dawsk-2021 in issue #1320
This commit is contained in:
@@ -795,9 +795,9 @@ function isSearched(tagBox, stringSearch) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function isDataSearched(tagObj) {
|
function isDataSearched(tagObj) {
|
||||||
let name = tagObj.name;
|
let name = tagObj.name.toLowerCase();
|
||||||
let stringSearch = $("#search-tag .search-input").val();
|
let stringSearch = $("#search-tag .search-input").val();
|
||||||
if (name.startsWith(stringSearch.toLowerCase())) {
|
if (name.includes(stringSearch.toLowerCase())) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user