wynnatlas mini bug fix (level input id)
This commit is contained in:
parent
db3e8d1e32
commit
11bd4844dc
5 changed files with 39 additions and 39 deletions
|
@ -45,7 +45,7 @@
|
|||
<a href = "../custom/"><img src = "../media/icons/new/custom.png" alt = "WynnCustom" title = "WynnCustom"><b>WynnCustom</b></a>
|
||||
<a href = "../map/"><img src = "../media/icons/new/compass.png" alt = "WynnGPS" title = "WynnGPS"><b>WynnGPS</b></a>
|
||||
<a href = "../wynnfo/"><img src = "../media/icons/new/book.png" alt = "Wynnfo" title = "Wynnfo"><b>Wynnfo</b></a>
|
||||
<a><img src="../media/icons/new/searcher.png" alt="" title="Item Search"><b>WynnAtlas Mini</b></a>
|
||||
<a onclick = "document.querySelector('#search-container').style.display = '';"><img src="../media/icons/new/searcher.png" alt="" title="Item Search"><b>WynnAtlas Mini</b></a>
|
||||
<a onclick = "toggleIcons()"><img src = "../media/icons/new/reload.png" alt = "" title = "Swap items on page"><b>Swap Icon Style</b></a>
|
||||
<hr/>
|
||||
</div>
|
||||
|
@ -1138,50 +1138,50 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1 justify-content-center">
|
||||
<div class="col-8 dark-5 p-2 dark-shadow rounded-top">
|
||||
<div class="row row-cols-1 row-cols-xl-4 justify-content-center">
|
||||
<div class="col-10 dark-5 p-2 dark-shadow rounded-top">
|
||||
<div class="row row-cols-1 row-cols-xl-4 justify-content-center mb-1">
|
||||
<div class="col-auto">
|
||||
<label for="name-choice">Name:</label>
|
||||
<input class="search-field" type="text" id="name-choice" name="name-choice" placeholder="Name" oninput="doSearchSchedule();"/>
|
||||
<label for="item-name-choice">Name:</label>
|
||||
<input class="search-field" type="text" id="item-name-choice" name="item-name-choice" placeholder="Name" oninput="doSearchSchedule();"/>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<label for="category-choice">Category:</label>
|
||||
<input class="search-field" id="category-choice" name="category-choice" placeholder="Category"/>
|
||||
<label for="item-category-choice">Category:</label>
|
||||
<input class="search-field" id="item-category-choice" name="item-category-choice" placeholder="Category"/>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<label for="rarity-choice">Rarity:</label>
|
||||
<input class="search-field" id="rarity-choice" name="rarity-choice" placeholder="Rarity"/>
|
||||
<label for="item-rarity-choice">Rarity:</label>
|
||||
<input class="search-field" id="item-rarity-choice" name="item-rarity-choice" placeholder="Rarity"/>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<label for="level-choice">Level:</label>
|
||||
<input class="search-field" type="text" id="level-choice" name="level-choice" placeholder="1-106"/>
|
||||
<label for="item-level-choice">Level:</label>
|
||||
<input class="search-field" type="text" id="item-level-choice" name="item-level-choice" placeholder="1-106"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-cols-1 row-cols-xl-4 justify-content-center mt-1">
|
||||
<div class="row row-cols-1 row-cols-xl-4 justify-content-center my-1">
|
||||
<div class="col-auto" id="filter1-dropdown">
|
||||
<label for="filter1-choice">Filter 1:</label>
|
||||
<input class="search-field" list="filter-items" id="filter1-choice" name="filter1-choice" placeholder="Filter"/>
|
||||
<input class="search-field" list="filter-items" id="filter1-choice" name="filter1-choice" placeholder=""/>
|
||||
</div>
|
||||
<div class="col-auto" id="filter2-dropdown">
|
||||
<label for="filter2-choice">Filter 2:</label>
|
||||
<input class="search-field" list="filter-items" id="filter2-choice" name="filter2-choice" placeholder="Filter"/>
|
||||
<input class="search-field" list="filter-items" id="filter2-choice" name="filter2-choice" placeholder=""/>
|
||||
</div>
|
||||
<div class="col-auto" id="filter3-dropdown">
|
||||
<label for="filter3-choice">Filter 3:</label>
|
||||
<input class="search-field" list="filter-items" id="filter3-choice" name="filter3-choice" placeholder="Filter"/>
|
||||
<input class="search-field" list="filter-items" id="filter3-choice" name="filter3-choice" placeholder=""/>
|
||||
</div>
|
||||
<div class="col-auto" id="filter4-dropdown">
|
||||
<label for="filter4-choice">Filter 4:</label>
|
||||
<input class="search-field" list="filter-items" id="filter4-choice" name="filter4-choice" placeholder="Filter"/>
|
||||
<input class="search-field" list="filter-items" id="filter4-choice" name="filter4-choice" placeholder=""/>
|
||||
</div>
|
||||
</div>
|
||||
<div class = "row box-title justify-content-center my-1" id = "summary">
|
||||
</div>
|
||||
<div class="col p-4">
|
||||
<div class="row justify-content-center" id="summary"></div>
|
||||
<div class = "row" id = "search-results">
|
||||
|
||||
</div>
|
||||
<div class="col p-4">
|
||||
<div class="row justify-content-center" id="search-results"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -41,12 +41,12 @@
|
|||
<div class = "row">
|
||||
<div class = "col-lg-3 col-sm-12">
|
||||
<div class = "col fw-bold">Name:</div>
|
||||
<input class = "col border-dark text-light dark-5 rounded scaled-font form-control form-control-sm" type="text" id="name-choice" name="name-choice" placeholder="Item name (case insensitive)"/>
|
||||
<input class = "col border-dark text-light dark-5 rounded scaled-font form-control form-control-sm" type="text" id="item-name-choice" name="item-name-choice" placeholder="Item name (case insensitive)"/>
|
||||
<p class="error col"></p>
|
||||
</div>
|
||||
<div class = "col-lg-3 col-sm-12">
|
||||
<div class = "col fw-bold">Category:</div>
|
||||
<input class="col border-dark text-light dark-5 rounded scaled-font form-control form-control-sm" id="category-choice" name="category-choice" placeholder="ALL"/>
|
||||
<input class="col border-dark text-light dark-5 rounded scaled-font form-control form-control-sm" id="item-category-choice" name="item-category-choice" placeholder="ALL"/>
|
||||
<datalist id="category-items">
|
||||
<option value="ALL">
|
||||
<option value="armor">
|
||||
|
@ -69,7 +69,7 @@
|
|||
</div>
|
||||
<div class = "col-lg-3 col-sm-12">
|
||||
<div class = "col fw-bold">Rarity:</div>
|
||||
<input class = "border-dark text-light dark-5 rounded scaled-font form-control form-control-sm" id="rarity-choice" name="rarity-choice" placeholder="ANY"/>
|
||||
<input class = "border-dark text-light dark-5 rounded scaled-font form-control form-control-sm" id="item-rarity-choice" name="item-rarity-choice" placeholder="ANY"/>
|
||||
<datalist id = "rarity-items">
|
||||
<option value="ANY">
|
||||
<option value="Normal">
|
||||
|
@ -85,7 +85,7 @@
|
|||
</div>
|
||||
<div class = "col-lg-3 col-sm-12">
|
||||
<div class = "col fw-bold">Level Range:</div>
|
||||
<input class = "border-dark text-light dark-5 rounded scaled-font form-control form-control-sm" type="text" id="level-choice" name="level-choice" placeholder = "1-106"/>
|
||||
<input class = "border-dark text-light dark-5 rounded scaled-font form-control form-control-sm" type="text" id="item-level-choice" name="item-level-choice" placeholder = "1-106"/>
|
||||
<p class="error col-auto"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -139,9 +139,9 @@ let searchDb;
|
|||
function doItemSearch() {
|
||||
window.scrollTo(0, 0);
|
||||
let queries = [];
|
||||
queries.push('f:name?="'+document.getElementById("name-choice").value.trim()+'"');
|
||||
queries.push('f:name?="'+document.getElementById("item-name-choice").value.trim()+'"');
|
||||
|
||||
let categoryOrType = document.getElementById("category-choice").value;
|
||||
let categoryOrType = document.getElementById("item-category-choice").value;
|
||||
if (itemTypes.includes(categoryOrType)) {
|
||||
queries.push('f:type="'+categoryOrType+'"');
|
||||
}
|
||||
|
@ -149,7 +149,7 @@ function doItemSearch() {
|
|||
queries.push('f:cat="'+categoryOrType+'"');
|
||||
}
|
||||
|
||||
let rarity = document.getElementById("rarity-choice").value;
|
||||
let rarity = document.getElementById("item-rarity-choice").value;
|
||||
if (rarity) {
|
||||
if (rarity === "ANY") {
|
||||
|
||||
|
@ -162,7 +162,7 @@ function doItemSearch() {
|
|||
}
|
||||
}
|
||||
|
||||
let level_dat = document.getElementById("level-choice").value.split("-");
|
||||
let level_dat = document.getElementById("item-level-choice").value.split("-");
|
||||
queries.push('f:(lvl>='+parseInt(level_dat[0])+'&lvl<='+parseInt(level_dat[1])+')');
|
||||
|
||||
for (let i = 1; i <= 4; ++i) {
|
||||
|
|
|
@ -97,6 +97,7 @@ function updateStatSchedule(){
|
|||
}
|
||||
|
||||
function doSearchSchedule(){
|
||||
console.log("Search Schedule called");
|
||||
if (doSearchTask !== null) {
|
||||
clearTimeout(doSearchTask);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
document.addEventListener("DOMContentLoaded", function() {
|
||||
let filterInputs = new Map([["category", ["ALL", "armor", "helmet", "chestplate", "leggings", "boots", "accessory", "ring", "bracelet", "weapon", "wand", "spear", "bow", "dagger", "relik"]],
|
||||
["rarity", ["ANY", "Normal", "Unique", "Set", "Rare", "Legendary", "Fabled", "Mythic", "Sane"]],
|
||||
let filterInputs = new Map([["item-category", ["ALL", "armor", "helmet", "chestplate", "leggings", "boots", "accessory", "ring", "bracelet", "weapon", "wand", "spear", "bow", "dagger", "relik"]],
|
||||
["item-rarity", ["ANY", "Normal", "Unique", "Set", "Rare", "Legendary", "Fabled", "Mythic", "Sane"]],
|
||||
["filter1", sq2ItemFilters],
|
||||
["filter2", sq2ItemFilters],
|
||||
["filter3", sq2ItemFilters],
|
||||
|
@ -193,9 +193,9 @@ let items_expanded;
|
|||
function doItemSearch() {
|
||||
// window.scrollTo(0, 0);
|
||||
let queries = [];
|
||||
queries.push(new NameQuery(document.getElementById("name-choice").value.trim()));
|
||||
queries.push(new NameQuery(document.getElementById("item-name-choice").value.trim()));
|
||||
|
||||
let categoryOrType = document.getElementById("category-choice").value;
|
||||
let categoryOrType = document.getElementById("item-category-choice").value;
|
||||
if (itemTypes.includes(categoryOrType)) {
|
||||
queries.push(new IdMatchQuery("type", categoryOrType));
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ function doItemSearch() {
|
|||
queries.push(new IdMatchQuery("category", categoryOrType));
|
||||
}
|
||||
|
||||
let rarity = document.getElementById("rarity-choice").value;
|
||||
let rarity = document.getElementById("item-rarity-choice").value;
|
||||
if (rarity) {
|
||||
if (rarity === "ANY") {
|
||||
|
||||
|
@ -213,7 +213,7 @@ function doItemSearch() {
|
|||
}
|
||||
}
|
||||
|
||||
let level_dat = document.getElementById("level-choice").value ? document.getElementById("level-choice").value.split("-") : [1, 106];
|
||||
let level_dat = document.getElementById("item-level-choice").value ? document.getElementById("item-level-choice").value.split("-") : [1, 106];
|
||||
queries.push(new LevelRangeQuery(parseInt(level_dat[0]), parseInt(level_dat[1])));
|
||||
|
||||
for (let i = 1; i <= 4; ++i) {
|
||||
|
@ -234,8 +234,7 @@ function doItemSearch() {
|
|||
document.getElementById("search-results").textContent = "";
|
||||
for (const query of queries) {
|
||||
console.log(items_copy.length);
|
||||
console.log(query);
|
||||
console.log(query.filter);
|
||||
console.log(query, query.filter);
|
||||
items_copy = applyQuery(items_copy, query);
|
||||
console.log(items_copy.length);
|
||||
}
|
||||
|
@ -244,7 +243,7 @@ function doItemSearch() {
|
|||
}
|
||||
|
||||
function resetItemSearch() {
|
||||
resetFields = ["name-choice", "category-choice", "rarity-choice", "level-choice", "filter1-choice", "filter2-choice", "filter3-choice", "filter4-choice"]
|
||||
resetFields = ["item-name-choice", "item-category-choice", "item-rarity-choice", "item-level-choice", "filter1-choice", "filter2-choice", "filter3-choice", "filter4-choice"]
|
||||
for (const field of resetFields) {
|
||||
document.getElementById(field).value = "";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue