Searches now automatically match parts of field values, and the search field has autofocus
This commit is contained in:
parent
97d483524a
commit
8485264714
@ -624,7 +624,8 @@
|
||||
onKeyPress="JavaScript:searchInput(event)"
|
||||
name="q"
|
||||
placeholder="Vad letar du efter?"
|
||||
value="" />
|
||||
value=""
|
||||
autofocus />
|
||||
<button type="submit">
|
||||
Sök
|
||||
</button>
|
||||
|
@ -224,7 +224,7 @@ function match($testvalues, $matchvalues) {
|
||||
}
|
||||
foreach($testvalues as $value) {
|
||||
foreach($matchvalues as $candidate) {
|
||||
if(fnmatch($value, $candidate, FNM_CASEFOLD)) {
|
||||
if(fnmatch('*'.$value.'*', $candidate, FNM_CASEFOLD)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user