Skip to content

Commit d33d2b8

Browse files
RushawayA1mDev
andcommitted
The outdated autocomplete code for searches has been replaced with modern JavaScript.
Co-Authored-By: A1m` <33463136+A1mDev@users.noreply.github.com>
1 parent e3b21b3 commit d33d2b8

9 files changed

Lines changed: 155 additions & 701 deletions

File tree

web/autocomplete.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323

2424
// Filter input
2525
$game = filter_input(INPUT_GET, 'game', FILTER_UNSAFE_RAW);
26-
$search = filter_input(INPUT_GET, 'value', FILTER_UNSAFE_RAW)
27-
?: filter_input(INPUT_POST, 'value', FILTER_UNSAFE_RAW)
28-
?: '';
26+
$search = filter_input(INPUT_GET, 'search', FILTER_UNSAFE_RAW);
2927

3028
$retError = "";
3129
if (!checkValidGame($db, $game, $retError)) {

web/css/Autocompleter.css

Lines changed: 0 additions & 61 deletions
This file was deleted.

web/css/search-suggestions.css‎

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
.autocomplete-items
2+
{
3+
position: absolute;
4+
border-top: none;
5+
z-index: 99;
6+
top: 100%;
7+
left: 0;
8+
right: 0;
9+
background: #fff;
10+
max-height: 200px;
11+
overflow-y: auto;
12+
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
13+
}
14+
15+
.autocomplete-loading
16+
{
17+
background-image: url('../css/spinner.gif');
18+
background-repeat: no-repeat;
19+
background-position: right 8px center;
20+
background-size: 16px 16px;
21+
padding-right: 20px;
22+
}
23+
24+
.autocomplete-items li
25+
{
26+
padding: 2px;
27+
cursor: pointer;
28+
list-style: none;
29+
border-bottom: 1px solid #dfdddd;
30+
margin-bottom: 0px; /* Fix old css in hlstats */
31+
}
32+
33+
.autocomplete-items li:hover
34+
{
35+
background-color: #e9e9e9;
36+
}
37+
38+
.autocomplete-items li:last-child
39+
{
40+
border-bottom: none;
41+
}
42+
43+
#playersearch:focus
44+
{
45+
outline: none;
46+
box-shadow: 0 0 0 1px #007bff;
47+
}

web/includes/js/Autocompleter.Request.js

Lines changed: 0 additions & 109 deletions
This file was deleted.

0 commit comments

Comments
 (0)