mirror of
https://github.com/house-of-vanity/OutFleet.git
synced 2025-07-07 09:24:07 +00:00
New UI fix
Co-authored-by: XakPlant <xakplant@users.noreply.github.com>
This commit is contained in:
@ -120,6 +120,33 @@
|
||||
document.addEventListener('click', handleEvent);
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
// Поиск по скписк в подменю
|
||||
// entety-menu-search
|
||||
const searchBox = document.getElementById('entety-menu-search')
|
||||
searchBox.addEventListener('change', (event)=>{
|
||||
const text = event.target.value
|
||||
const child = Array.from(document.querySelector('[data-search-box]').children)
|
||||
|
||||
child.forEach((element)=>{
|
||||
if(text.length === 0){
|
||||
element.classList.remove('hidden')
|
||||
return
|
||||
}
|
||||
const elementSearchData = element.querySelector('[data-search]').textContent
|
||||
const isEqual = elementSearchData.toLowerCase().includes(text.toLowerCase())
|
||||
if(isEqual){
|
||||
element.classList.remove('hidden')
|
||||
} else {
|
||||
element.classList.add('hidden')
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
{% if nt %}
|
||||
<label>
|
||||
<input type="checkbox" class="alertCheckbox" autocomplete="off" />
|
||||
|
Reference in New Issue
Block a user