Skip to content

Commit

Permalink
Click platform labels to set as current filter
Browse files Browse the repository at this point in the history
  • Loading branch information
xdpirate committed May 18, 2024
1 parent 2738d32 commit 371fe1d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
18 changes: 9 additions & 9 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
<div class="tableWrapper" id="unreleasedWrapper">
<h2>Unreleased
<div class="searchbox">
<input type="search" placeholder="Filter Unreleased..." oninput="filterTable('unreleased', this.value);" autocomplete="off"> <span class="pointer clearSearch" title="Clear filter" onclick="this.previousElementSibling.value = ''; filterTable('unreleased', '');">x</span>
<input id="filterUnreleased" type="search" placeholder="Filter Unreleased..." oninput="filterTable('unreleased', this.value);" autocomplete="off"> <span class="pointer clearSearch" title="Clear filter" onclick="this.previousElementSibling.value = ''; filterTable('unreleased', '');">x</span>
</div>
</h2>

Expand Down Expand Up @@ -221,7 +221,7 @@

if(sizeof($platforms) > 0 && $platforms[0] !== "") {
for($j = 0; $j < sizeof($platforms); $j++) {
$outputstring .= "<span class='platformLabel'>$platforms[$j]</span>";
$outputstring .= "<span class='platformLabel' title='Click to set as current filter' onclick='let fb = document.getElementById(\"filterUnreleased\"); fb.value = \"$platforms[$j]\"; fb.dispatchEvent(new Event(\"input\"));'>$platforms[$j]</span>";
}
}

Expand All @@ -240,7 +240,7 @@
<div class="tableWrapper" id="tbaWrapper">
<h2>Announced
<div class="searchbox">
<input type="search" placeholder="Filter Announced..." oninput="filterTable('tba', this.value);" autocomplete="off"> <span class="pointer clearSearch" title="Clear filter" onclick="this.previousElementSibling.value = ''; filterTable('tba', '');">x</span>
<input id="filterAnnounced" type="search" placeholder="Filter Announced..." oninput="filterTable('tba', this.value);" autocomplete="off"> <span class="pointer clearSearch" title="Clear filter" onclick="this.previousElementSibling.value = ''; filterTable('tba', '');">x</span>
</div>
</h2>

Expand All @@ -264,7 +264,7 @@

if(sizeof($platforms) > 0 && $platforms[0] !== "") {
for($j = 0; $j < sizeof($platforms); $j++) {
$outputstring .= "<span class='platformLabel'>$platforms[$j]</span>";
$outputstring .= "<span class='platformLabel' title='Click to set as current filter' onclick='let fb = document.getElementById(\"filterAnnounced\"); fb.value = \"$platforms[$j]\"; fb.dispatchEvent(new Event(\"input\"));'>$platforms[$j]</span>";
}
}

Expand All @@ -283,7 +283,7 @@
<div class="tableWrapper" id="releasedWrapper">
<h2>Released
<div class="searchbox">
<input type="search" placeholder="Filter Released..." oninput="filterTable('released', this.value);" autocomplete="off"> <span class="pointer clearSearch" title="Clear filter" onclick="this.previousElementSibling.value = ''; filterTable('released', '');">x</span>
<input id="filterReleased" type="search" placeholder="Filter Released..." oninput="filterTable('released', this.value);" autocomplete="off"> <span class="pointer clearSearch" title="Clear filter" onclick="this.previousElementSibling.value = ''; filterTable('released', '');">x</span>
</div>
</h2>

Expand All @@ -306,7 +306,7 @@

if(sizeof($platforms) > 0 && $platforms[0] !== "") {
for($j = 0; $j < sizeof($platforms); $j++) {
$outputstring .= "<span class='platformLabel'>$platforms[$j]</span>";
$outputstring .= "<span class='platformLabel' title='Click to set as current filter' onclick='let fb = document.getElementById(\"filterReleased\"); fb.value = \"$platforms[$j]\"; fb.dispatchEvent(new Event(\"input\"));'>$platforms[$j]</span>";
}
}

Expand All @@ -325,7 +325,7 @@
<div class="tableWrapper" id="collectionWrapper">
<h2>Collection
<div class="searchbox">
<input type="search" placeholder="Filter Collection..." oninput="filterTable('collection', this.value);" autocomplete="off"> <span class="pointer clearSearch" title="Clear filter" onclick="this.previousElementSibling.value = ''; filterTable('collection', '');">x</span>
<input id="filterCollection" type="search" placeholder="Filter Collection..." oninput="filterTable('collection', this.value);" autocomplete="off"> <span class="pointer clearSearch" title="Clear filter" onclick="this.previousElementSibling.value = ''; filterTable('collection', '');">x</span>
</div>
</h2>

Expand All @@ -348,7 +348,7 @@

if(sizeof($platforms) > 0 && $platforms[0] !== "") {
for($j = 0; $j < sizeof($platforms); $j++) {
$outputstring .= "<span class='platformLabel'>$platforms[$j]</span>";
$outputstring .= "<span class='platformLabel' title='Click to set as current filter' onclick='let fb = document.getElementById(\"filterCollection\"); fb.value = \"$platforms[$j]\"; fb.dispatchEvent(new Event(\"input\"));'>$platforms[$j]</span>";
}
}

Expand All @@ -372,7 +372,7 @@
<?php } ?>

<div id="footer">
GameHorizon <?php $commitHash = substr(file_get_contents('.git/refs/heads/main'),0,7); print("(ver. <a href='https://github.com/xdpirate/gamehorizon/commit/$commitHash'>$commitHash</a>)"); ?> &copy; 2023 xdpirate. Licensed under the <a href="https://github.com/xdpirate/gamehorizon/blob/main/LICENSE.md" target="_blank">GNU General Public License v3.0</a>. <a href="https://github.com/xdpirate/gamehorizon" target="_blank">Github</a> <?php if($updaterEnabled == true) { ?><a href="./?update" title="Click to update this installation of GameHorizon. Requires git on the server.">Update</a><?php } ?>
GameHorizon <?php $commitHash = substr(file_get_contents('.git/refs/heads/main'),0,7); print("(ver. <a href='https://github.com/xdpirate/gamehorizon/commit/$commitHash'>$commitHash</a>)"); ?> &copy; 2023-2024 xdpirate. Licensed under the <a href="https://github.com/xdpirate/gamehorizon/blob/main/LICENSE.md" target="_blank">GNU General Public License v3.0</a>. <a href="https://github.com/xdpirate/gamehorizon" target="_blank">Github</a> <?php if($updaterEnabled == true) { ?><a href="./?update" title="Click to update this installation of GameHorizon. Requires git on the server.">Update</a><?php } ?>
</div>
</div>

Expand Down
1 change: 1 addition & 0 deletions js/startscripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ function applyTheme(themeName) {
margin-left: 0.2em;
margin-right: 0.2em;
padding: 0.2em;
cursor: pointer;
}
tr:nth-child(odd) {
Expand Down

0 comments on commit 371fe1d

Please sign in to comment.