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)"
|
onKeyPress="JavaScript:searchInput(event)"
|
||||||
name="q"
|
name="q"
|
||||||
placeholder="Vad letar du efter?"
|
placeholder="Vad letar du efter?"
|
||||||
value="" />
|
value=""
|
||||||
|
autofocus />
|
||||||
<button type="submit">
|
<button type="submit">
|
||||||
Sök
|
Sök
|
||||||
</button>
|
</button>
|
||||||
|
@ -224,7 +224,7 @@ function match($testvalues, $matchvalues) {
|
|||||||
}
|
}
|
||||||
foreach($testvalues as $value) {
|
foreach($testvalues as $value) {
|
||||||
foreach($matchvalues as $candidate) {
|
foreach($matchvalues as $candidate) {
|
||||||
if(fnmatch($value, $candidate, FNM_CASEFOLD)) {
|
if(fnmatch('*'.$value.'*', $candidate, FNM_CASEFOLD)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user