◆少前百科是非盈利性、非官方的少女前线维基百科。 ◆如果您发现某些内容错误/空缺,请勇于修正/添加!参与进来其实很容易!点这里 加入少前百科。 ◆有任何意见、建议、纠错,欢迎在 GFwiki:反馈与建议 提出和讨论。编辑事务讨论QQ群:597764980,微博@GFwiki少前百科 ◆To foreigners,You can use twitter to contact us. |
“Widget:Tdollquery2”的版本间的差异
Mikumikuer(讨论 | 贡献) |
Mikumikuer(讨论 | 贡献) |
||
第1行: | 第1行: | ||
<includeonly><style type="text/css"> | <includeonly><style type="text/css"> | ||
.error {background-color: red;font-size: inherit;color: inherit;} | .error {background-color: red;font-size: inherit;color: inherit;} | ||
+ | div.divider | ||
+ | { | ||
+ | position: relative; | ||
+ | margin: 3px 0 6px 0!important; | ||
+ | height: 1px; | ||
+ | } | ||
+ | |||
+ | .div-transparent:before | ||
+ | { | ||
+ | content: ""; | ||
+ | position: absolute; | ||
+ | top: 0; | ||
+ | left: 0%; | ||
+ | right: 0%; | ||
+ | width: 100%; | ||
+ | height: 1px; | ||
+ | background-image: linear-gradient(to right, rgb(255,255,255), transparent); | ||
+ | } | ||
div.tileSearchCond { | div.tileSearchCond { | ||
display: inline-block; | display: inline-block; | ||
第306行: | 第324行: | ||
<tr><td class="active"></td><td class="active"></td><td class="active"></td></tr> | <tr><td class="active"></td><td class="active"></td><td class="active"></td></tr> | ||
</tbody></table></div></div> | </tbody></table></div></div> | ||
+ | <div class="tilesAffectBox">影响对象选择: | ||
+ | <div id="affectChecker" class="unable" style="display: block;"> | ||
+ | <button class="clearSelect">清除</button> | ||
+ | <button class="invertSelect">反选</button> | ||
+ | <label for="HGaff"><input type="checkbox" id="HGaff" class="filter_item"><div>手枪</div></label> | ||
+ | <label for="SMGaff"><input type="checkbox" id="SMGaff" class="filter_item"><div>冲锋枪</div></label> | ||
+ | <label for="ARaff"><input type="checkbox" id="ARaff" class="filter_item"><div>突击步枪</div></label> | ||
+ | <label for="RFaff"><input type="checkbox" id="RFaff" class="filter_item"><div>步枪</div></label> | ||
+ | <label for="MGaff"><input type="checkbox" id="MGaff" class="filter_item"><div>机枪</div></label> | ||
+ | <label for="SGaff"><input type="checkbox" id="SGaff" class="filter_item"><div>霰弹枪</div></label> | ||
+ | <label for="ALLaff"><input type="checkbox" id="ALLaff" class="filter_item"><div>所有枪种</div></label> | ||
+ | </div> | ||
+ | </div> | ||
+ | <div class="divider div-transparent"></div> | ||
<div> | <div> | ||
<button class="clearSelect">清除</button> | <button class="clearSelect">清除</button> | ||
第316行: | 第348行: | ||
<label for="SGDoll"><input type="checkbox" id="SGDoll" class="filter_item" /><div>霰弹枪人形</div></label> | <label for="SGDoll"><input type="checkbox" id="SGDoll" class="filter_item" /><div>霰弹枪人形</div></label> | ||
</div> | </div> | ||
+ | <div class="divider div-transparent"></div> | ||
<div> | <div> | ||
<button class="clearSelect">清除</button> | <button class="clearSelect">清除</button> | ||
第326行: | 第359行: | ||
<label for="rarity1"><input type="checkbox" id="rarity1" class="filter_item" /><div>★EXTRA</div></label> | <label for="rarity1"><input type="checkbox" id="rarity1" class="filter_item" /><div>★EXTRA</div></label> | ||
</div> | </div> | ||
+ | <div class="divider div-transparent"></div> | ||
<div> | <div> | ||
<button class="clearSelect">清除</button> | <button class="clearSelect">清除</button> | ||
第334行: | 第368行: | ||
<label for="specialObtain"><input type="checkbox" id="specialObtain" class="filter_item" /><div>限定人形(非常驻)</div></label> | <label for="specialObtain"><input type="checkbox" id="specialObtain" class="filter_item" /><div>限定人形(非常驻)</div></label> | ||
</div> | </div> | ||
+ | <div class="divider div-transparent"></div> | ||
<div> | <div> | ||
<button class="clearSelect">清除</button> | <button class="clearSelect">清除</button> | ||
第594行: | 第629行: | ||
if (!modstat){target.checked = false;target.parentNode.classList.add("unable") | if (!modstat){target.checked = false;target.parentNode.classList.add("unable") | ||
}else{target.parentNode.classList.remove("unable")} | }else{target.parentNode.classList.remove("unable")} | ||
+ | } | ||
+ | function positionDisable(box){ | ||
+ | var checkstat = box.querySelectorAll('.active').length; | ||
+ | var targets = document.querySelectorAll('#affectChecker input'); | ||
+ | if (checkstat==0){for(var i in targets){targets[i].checked = false};box.classList.add("unable")}else{box.classList.remove("unable")} | ||
} | } | ||
第601行: | 第641行: | ||
$('#buttonContainer>span>a').on("click",function(){clearSelect(this.parentNode)}) | $('#buttonContainer>span>a').on("click",function(){clearSelect(this.parentNode)}) | ||
$('#MOD3Data').on("click",function(){rarityDisable(this);apply_filter();}) | $('#MOD3Data').on("click",function(){rarityDisable(this);apply_filter();}) | ||
+ | $('#effectarea').on("click",function(){positionDisable(this);}) | ||
function clearItem(){inputText.value = ""} //清除输入框内容 | function clearItem(){inputText.value = ""} //清除输入框内容 | ||
第652行: | 第693行: | ||
else { | else { | ||
if(tCheck[query.tdollClass]){return true} else {return false} | if(tCheck[query.tdollClass]){return true} else {return false} | ||
+ | } | ||
+ | } | ||
+ | |||
+ | function tileAffect_check(query){ //影响格对象判断 | ||
+ | var affectText = query[mod_key("affect",query)]; | ||
+ | var keyword = {MGaff:"机枪",RFaff:"步枪",ARaff:"突击步枪",HGaff:"手枪",SGaff:"霰弹枪",SMGaff:"冲锋枪",ALLaff:"所有枪种"}; | ||
+ | var taCheck = new Array(); | ||
+ | var taNum = 0; | ||
+ | for (var i in keyword){ | ||
+ | if(document.getElementById(i).checked;){taNum++;} | ||
+ | if(affectText.indexOf(keyword[i])>-1){taCheck.push(i)} | ||
+ | } | ||
+ | if (taNum==0){return true} | ||
+ | else { | ||
+ | for(var i=0;i<taCheck.length;i++){if(document.getElementById(taCheck[i]).checked){return true}};return false; | ||
} | } | ||
} | } | ||
第783行: | 第839行: | ||
function filter_box(cond){ //筛选条件汇总 | function filter_box(cond){ //筛选条件汇总 | ||
− | return mod_check(cond)&&text_check(cond)&&rarity_check(cond)&&type_check(cond)&&tiles_check(cond)&&obtainMethod_check(cond); | + | return tileAffect_check(cond)&&mod_check(cond)&&text_check(cond)&&rarity_check(cond)&&type_check(cond)&&tiles_check(cond)&&obtainMethod_check(cond); |
} | } | ||