更改结果数量统计
This commit is contained in:
parent
bd10c8bfa9
commit
7cba5efb2c
|
@ -302,7 +302,7 @@
|
|||
.search-box .show-official-awoken-sorting-label::after{
|
||||
content: "Use the official Awoken sorting";
|
||||
}
|
||||
.search-mon-list .search-list-length::before{
|
||||
.search-box .search-list-length::before{
|
||||
content: "Number of results:";
|
||||
}
|
||||
.search-box .sort-div::before{
|
||||
|
@ -341,6 +341,10 @@
|
|||
.search-box .awoken-option::before{
|
||||
content: "▼Awoken (AND)";
|
||||
}
|
||||
.search-box .rare-clear::before
|
||||
{
|
||||
content: "Reset";
|
||||
}
|
||||
.search-box .awoken-clear::before,
|
||||
.search-box .sawoken-clear::before
|
||||
{
|
||||
|
|
|
@ -294,7 +294,7 @@
|
|||
.search-box .show-official-awoken-sorting-label::after{
|
||||
content: "公式の覚醒ソートを使用";
|
||||
}
|
||||
.search-mon-list .search-list-length::before{
|
||||
.search-box .search-list-length::before{
|
||||
content: "結果の数:";
|
||||
}
|
||||
.search-box .sort-div::before{
|
||||
|
@ -333,6 +333,10 @@
|
|||
.search-box .awoken-option::before{
|
||||
content: "▼觉醒(AND)";
|
||||
}
|
||||
.search-box .rare-clear::before
|
||||
{
|
||||
content: "リセット";
|
||||
}
|
||||
.search-box .awoken-clear::before,
|
||||
.search-box .sawoken-clear::before
|
||||
{
|
||||
|
|
|
@ -291,7 +291,7 @@
|
|||
.search-box .show-official-awoken-sorting-label::after{
|
||||
content: "공식 각성 순서를 사용합니다";
|
||||
}
|
||||
.search-mon-list .search-list-length::before{
|
||||
.search-box .search-list-length::before{
|
||||
content: "결과 수:";
|
||||
}
|
||||
.search-box .sort-div::before{
|
||||
|
@ -330,6 +330,10 @@
|
|||
.search-box .awoken-option::before{
|
||||
content: "▼각성(AND)";
|
||||
}
|
||||
.search-box .rare-clear::before
|
||||
{
|
||||
content: "재설정";
|
||||
}
|
||||
.search-box .awoken-clear::before,
|
||||
.search-box .sawoken-clear::before
|
||||
{
|
||||
|
|
|
@ -297,7 +297,7 @@
|
|||
.search-box .show-official-awoken-sorting-label::after{
|
||||
content: "使用官方覺醒排序";
|
||||
}
|
||||
.search-mon-list .search-list-length::before{
|
||||
.search-box .search-list-length::before{
|
||||
content: "結果數量:";
|
||||
}
|
||||
.search-box .sort-div::before{
|
||||
|
@ -336,6 +336,10 @@
|
|||
.search-box .awoken-option::before{
|
||||
content: "▼觉醒(AND)";
|
||||
}
|
||||
.search-box .rare-clear::before
|
||||
{
|
||||
content: "重置";
|
||||
}
|
||||
.search-box .awoken-clear::before,
|
||||
.search-box .sawoken-clear::before
|
||||
{
|
||||
|
|
|
@ -297,7 +297,7 @@
|
|||
.search-box .show-official-awoken-sorting-label::after{
|
||||
content: "使用官方觉醒排序";
|
||||
}
|
||||
.search-mon-list .search-list-length::before{
|
||||
.search-box .search-list-length::before{
|
||||
content: "结果数量:";
|
||||
}
|
||||
.search-box .sort-div::before{
|
||||
|
@ -336,6 +336,10 @@
|
|||
.search-box .awoken-option::before{
|
||||
content: "▼觉醒(AND)";
|
||||
}
|
||||
.search-box .rare-clear::before
|
||||
{
|
||||
content: "重置";
|
||||
}
|
||||
.search-box .awoken-clear::before,
|
||||
.search-box .sawoken-clear::before
|
||||
{
|
||||
|
|
|
@ -561,6 +561,7 @@ var formation = new Formation(teamsCount,5);
|
|||
<input type="radio" class="rare-radio" name="rare-low" value="9" /><div class="rare-icon" data-rare-icon="9"></div><input type="radio" class="rare-radio" name="rare-high" value="9" />
|
||||
<input type="radio" class="rare-radio" name="rare-low" value="10" /><div class="rare-icon" data-rare-icon="10"></div><input type="radio" class="rare-radio" name="rare-high" value="10" checked/>
|
||||
</div>
|
||||
<button class="rare-clear brown-button"></button>
|
||||
</div>
|
||||
<div class="awoken-option">
|
||||
<input type="checkbox" class="config-checkbox-ipt" name="consider-equivalent-awoken" id="consider-equivalent-awoken" checked><label class="config-checkbox-lbl consider-equivalent-awoken-label" for="consider-equivalent-awoken"><div class="config-checkbox-lbl-cicle"></div></label>
|
||||
|
@ -747,6 +748,7 @@ var formation = new Formation(teamsCount,5);
|
|||
<select class="sort-list"></select>
|
||||
<input type="checkbox" class="config-checkbox-ipt" name="sort-reverse" id="sort-reverse"><label class="config-checkbox-lbl sort-reverse-label" for="sort-reverse"><div class="config-checkbox-lbl-cicle"></div></label>
|
||||
<input type="checkbox" class="config-checkbox-ipt" name="can-assist" id="can-assist"><label class="config-checkbox-lbl can-assist-label" for="can-assist"><div class="config-checkbox-lbl-cicle"></div></label>
|
||||
<div class="search-list-length"></div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="search-mon-list"></ul><!--搜索结果的显示列表-->
|
||||
|
|
51
script.js
51
script.js
|
@ -1355,17 +1355,51 @@ function initialize() {
|
|||
const radioHigh = s_rareHighs.find(radio=>radio.checked);
|
||||
const rangeLow = radioLow ? parseInt(radioLow.value,10) : 1;
|
||||
const rangeHigh = radioHigh ? parseInt(radioHigh.value,10) : 10;
|
||||
|
||||
s_rareLows.find(radio=>parseInt(radio.value,10) == (
|
||||
rangeLow != rangeHigh ?
|
||||
thisValue :
|
||||
(
|
||||
thisValue == rangeLow ?
|
||||
1 :
|
||||
Math.min(thisValue,rangeLow)
|
||||
)
|
||||
)).checked = true;
|
||||
s_rareHighs.find(radio=>parseInt(radio.value,10) == (
|
||||
rangeLow != rangeHigh ?
|
||||
thisValue :
|
||||
(
|
||||
thisValue == rangeLow ?
|
||||
10 :
|
||||
Math.max(thisValue,rangeHigh)
|
||||
)
|
||||
)).checked = true;
|
||||
/*
|
||||
if (rangeLow == rangeHigh)
|
||||
{
|
||||
s_rareLows.find(radio=>parseInt(radio.value,10) == Math.min(thisValue,rangeLow)).checked = true;
|
||||
s_rareHighs.find(radio=>parseInt(radio.value,10) == Math.max(thisValue,rangeLow)).checked = true;
|
||||
if (thisValue == rangeLow)
|
||||
{
|
||||
s_rareLows.find(radio=>parseInt(radio.value,10) == 1).checked = true;
|
||||
s_rareHighs.find(radio=>parseInt(radio.value,10) == 10).checked = true;
|
||||
}else
|
||||
{
|
||||
s_rareLows.find(radio=>parseInt(radio.value,10) == Math.min(thisValue,rangeLow)).checked = true;
|
||||
s_rareHighs.find(radio=>parseInt(radio.value,10) == Math.max(thisValue,rangeLow)).checked = true;
|
||||
}
|
||||
}else
|
||||
{
|
||||
console.log("恢复单选");
|
||||
s_rareLows.find(radio=>parseInt(radio.value,10) == thisValue).checked = true;
|
||||
s_rareHighs.find(radio=>parseInt(radio.value,10) == thisValue).checked = true;
|
||||
}
|
||||
*/
|
||||
}
|
||||
s_rareIcons.forEach(icon=>icon.onclick = s_rareIcons_onclick);
|
||||
const s_rareClear = s_rareDiv.querySelector(".rare-clear");
|
||||
s_rareClear.onclick = function(){
|
||||
s_rareLows[0].checked = true;
|
||||
s_rareHighs[s_rareHighs.length-1].checked = true;
|
||||
}
|
||||
|
||||
//const s_rare = s_rareLi.map(li=>li.querySelector(".rare-check")); //checkbox集合
|
||||
|
||||
|
@ -1497,6 +1531,7 @@ function initialize() {
|
|||
const s_add_show_abilities = searchBox.querySelector("#add-show-abilities"); //是否显示三维
|
||||
const s_add_show_abilities_with_awoken = searchBox.querySelector("#add-show-abilities-with-awoken"); //是否显示计算觉醒的三维
|
||||
|
||||
const searchResultCount = searchBox.querySelector(".search-list-length");
|
||||
showSearch = function(searchArr, customAdditionalFunction)
|
||||
{
|
||||
if (!(searchArr instanceof Array))
|
||||
|
@ -1521,9 +1556,6 @@ function initialize() {
|
|||
|
||||
if (searchArr.length > 0) {
|
||||
const fragment = document.createDocumentFragment(); //创建节点用的临时空间
|
||||
const listLength = fragment.appendChild(document.createElement("div"));
|
||||
listLength.className = "search-list-length";
|
||||
listLength.textContent = searchArr.length;
|
||||
//获取原始排序的头像列表
|
||||
const additionalOption = { //搜索列表的额外选项
|
||||
showAwoken: s_add_show_awoken.checked,
|
||||
|
@ -1545,6 +1577,7 @@ function initialize() {
|
|||
//const state = {searchArr:idArr,mid:editBox.mid};
|
||||
//history.pushState(state, null, location);
|
||||
}
|
||||
searchResultCount.setAttribute("data-search-result-count", searchArr.length);
|
||||
searchMonList.classList.remove(className_displayNone);
|
||||
};
|
||||
//对已经搜索到的Cards重新附加显示
|
||||
|
@ -1620,13 +1653,13 @@ function initialize() {
|
|||
t.checked = false;
|
||||
});
|
||||
s_typeAndOr.onchange();
|
||||
s_rareLows[0].checked = true;
|
||||
s_rareHighs[9].checked = true;
|
||||
s_rareClear.onclick();
|
||||
|
||||
awokenClear.click();
|
||||
sawokenClear.click();;
|
||||
awokenClear.onclick();
|
||||
sawokenClear.onclick();
|
||||
|
||||
searchMonList.originalHeads = null;
|
||||
searchResultCount.setAttribute("data-search-result-count", 0);
|
||||
searchMonList.innerHTML = "";
|
||||
};
|
||||
|
||||
|
|
|
@ -477,6 +477,7 @@ var formation = new Formation(teamsCount,6);
|
|||
<input type="radio" class="rare-radio" name="rare-low" value="9" /><div class="rare-icon" data-rare-icon="9"></div><input type="radio" class="rare-radio" name="rare-high" value="9" />
|
||||
<input type="radio" class="rare-radio" name="rare-low" value="10" /><div class="rare-icon" data-rare-icon="10"></div><input type="radio" class="rare-radio" name="rare-high" value="10" checked/>
|
||||
</div>
|
||||
<button class="rare-clear brown-button"></button>
|
||||
</div>
|
||||
<div class="awoken-option">
|
||||
<input type="checkbox" class="config-checkbox-ipt" name="consider-equivalent-awoken" id="consider-equivalent-awoken" checked><label class="config-checkbox-lbl consider-equivalent-awoken-label" for="consider-equivalent-awoken"><div class="config-checkbox-lbl-cicle"></div></label>
|
||||
|
@ -663,6 +664,7 @@ var formation = new Formation(teamsCount,6);
|
|||
<select class="sort-list"></select>
|
||||
<input type="checkbox" class="config-checkbox-ipt" name="sort-reverse" id="sort-reverse"><label class="config-checkbox-lbl sort-reverse-label" for="sort-reverse"><div class="config-checkbox-lbl-cicle"></div></label>
|
||||
<input type="checkbox" class="config-checkbox-ipt" name="can-assist" id="can-assist"><label class="config-checkbox-lbl can-assist-label" for="can-assist"><div class="config-checkbox-lbl-cicle"></div></label>
|
||||
<div class="search-list-length"></div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="search-mon-list"></ul><!--搜索结果的显示列表-->
|
||||
|
|
18
style.css
18
style.css
|
@ -1200,6 +1200,10 @@ ul{
|
|||
{
|
||||
content: attr(data-rare-icon);
|
||||
}
|
||||
.search-box .rare-clear
|
||||
{
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.search-box .awoken-option .selected-awokens{
|
||||
min-height: 32px;
|
||||
|
@ -1221,11 +1225,13 @@ ul{
|
|||
display: inline-block;
|
||||
vertical-align: top;
|
||||
}
|
||||
.search-box .rare-clear,
|
||||
.search-box .awoken-clear,
|
||||
.search-box .sawoken-clear
|
||||
{
|
||||
vertical-align: top;
|
||||
}
|
||||
.search-box .rare-clear::before,
|
||||
.search-box .awoken-clear::before,
|
||||
.search-box .sawoken-clear::before
|
||||
{
|
||||
|
@ -1395,9 +1401,17 @@ ul{
|
|||
border-radius: 5px;
|
||||
background: grey;
|
||||
}
|
||||
.search-mon-list .search-list-length::before
|
||||
.search-box .search-list-length
|
||||
{
|
||||
margin-left:4px;
|
||||
float: right;
|
||||
}
|
||||
.search-box .search-list-length[data-search-result-count="0"]
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
.search-box .search-list-length:not([data-search-result-count="0"])::after
|
||||
{
|
||||
content: attr(data-search-result-count);
|
||||
}
|
||||
.guide-mod .search-box .search-mon-list{
|
||||
max-height: 790px;
|
||||
|
|
|
@ -1204,6 +1204,7 @@ var formation = new Formation(teamsCount,6);
|
|||
<input type="radio" class="rare-radio" name="rare-low" value="9" /><div class="rare-icon" data-rare-icon="9"></div><input type="radio" class="rare-radio" name="rare-high" value="9" />
|
||||
<input type="radio" class="rare-radio" name="rare-low" value="10" /><div class="rare-icon" data-rare-icon="10"></div><input type="radio" class="rare-radio" name="rare-high" value="10" checked/>
|
||||
</div>
|
||||
<button class="rare-clear brown-button"></button>
|
||||
</div>
|
||||
<div class="awoken-option">
|
||||
<input type="checkbox" class="config-checkbox-ipt" name="consider-equivalent-awoken" id="consider-equivalent-awoken" checked><label class="config-checkbox-lbl consider-equivalent-awoken-label" for="consider-equivalent-awoken"><div class="config-checkbox-lbl-cicle"></div></label>
|
||||
|
@ -1390,6 +1391,7 @@ var formation = new Formation(teamsCount,6);
|
|||
<select class="sort-list"></select>
|
||||
<input type="checkbox" class="config-checkbox-ipt" name="sort-reverse" id="sort-reverse"><label class="config-checkbox-lbl sort-reverse-label" for="sort-reverse"><div class="config-checkbox-lbl-cicle"></div></label>
|
||||
<input type="checkbox" class="config-checkbox-ipt" name="can-assist" id="can-assist"><label class="config-checkbox-lbl can-assist-label" for="can-assist"><div class="config-checkbox-lbl-cicle"></div></label>
|
||||
<div class="search-list-length"></div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="search-mon-list"></ul><!--搜索结果的显示列表-->
|
||||
|
|
Loading…
Reference in New Issue