minor: disable search filters for retro items avatar sandbox
This commit is contained in:
parent
591dbe1f01
commit
7ae424b60b
2 changed files with 17 additions and 4 deletions
|
|
@ -581,6 +581,19 @@ async function LoadUser(id) {
|
||||||
async function LoadItems() {
|
async function LoadItems() {
|
||||||
document.getElementById('inventory').innerHTML = ''
|
document.getElementById('inventory').innerHTML = ''
|
||||||
|
|
||||||
|
const SearchFilters = document.getElementsByClassName('retro-items-disable')
|
||||||
|
if (TabSelected != 'retro') {
|
||||||
|
for (let filter of SearchFilters) {
|
||||||
|
filter.disabled = false
|
||||||
|
filter.classList.remove('disabled')
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (let filter of SearchFilters) {
|
||||||
|
filter.disabled = true
|
||||||
|
filter.classList.add('disabled')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let Items;
|
let Items;
|
||||||
if (['retro', 'outfit'].indexOf(TabSelected) === -1) {
|
if (['retro', 'outfit'].indexOf(TabSelected) === -1) {
|
||||||
Items = (await (await fetch('https://api.polytoria.com/v1/store?limit=12&order=' + Order + '&sort=' + Sort + '&showOffsale=' + ShowOffsale + '&types[]='+ TabSelected +'&search=' + Search + '&page=' + Page)).json())
|
Items = (await (await fetch('https://api.polytoria.com/v1/store?limit=12&order=' + Order + '&sort=' + Sort + '&showOffsale=' + ShowOffsale + '&types[]='+ TabSelected +'&search=' + Search + '&page=' + Page)).json())
|
||||||
|
|
|
||||||
|
|
@ -332,13 +332,13 @@
|
||||||
<div class="row mb-1">
|
<div class="row mb-1">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<select id="item-sort" class="form-select">
|
<select id="item-sort" class="form-select retro-items-disable">
|
||||||
<option value="name">Name</option>
|
<option value="name">Name</option>
|
||||||
<option value="price">Price</option>
|
<option value="price">Price</option>
|
||||||
<option value="createdAt" selected>Creation Date</option>
|
<option value="createdAt" selected>Creation Date</option>
|
||||||
<option value="updatedAt">Updated Date</option>
|
<option value="updatedAt">Updated Date</option>
|
||||||
</select>
|
</select>
|
||||||
<select id="item-order" class="form-select">
|
<select id="item-order" class="form-select retro-items-disable">
|
||||||
<option value="asc">Ascending</option>
|
<option value="asc">Ascending</option>
|
||||||
<option value="desc">Descending</option>
|
<option value="desc">Descending</option>
|
||||||
</select>
|
</select>
|
||||||
|
|
@ -346,8 +346,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input id="item-search" type="text" class="form-control mb-2" placeholder="Search for an item..." />
|
<input id="item-search" type="text" class="form-control mb-2 retro-items-disable" placeholder="Search for an item..." />
|
||||||
<button id="search-btn" class="btn btn-primary h-100">Search</button>
|
<button id="search-btn" class="btn btn-primary h-100 retro-items-disable">Search</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Reference in a new issue