5 801
edições
Sem resumo de edição Etiqueta: Revertido |
Sem resumo de edição Etiqueta: Revertido |
||
Linha 148: | Linha 148: | ||
</style> | </style> | ||
</head> | </head> | ||
<body> | <body> | ||
Linha 204: | Linha 205: | ||
</div> | </div> | ||
</form> | </form> | ||
<script> | <script> | ||
const specificOptions = { | const specificOptions = { | ||
Linha 286: | Linha 288: | ||
} | } | ||
}; | }; | ||
document.getElementById('mapType').addEventListener('change', updateOptions); | |||
document.getElementById('specificOption').addEventListener('change', updateOptions); | document.getElementById('specificOption').addEventListener('change', updateOptions); | ||
document.getElementById('enableFilter').addEventListener('change', toggleFilter); | document.getElementById('enableFilter').addEventListener('change', toggleFilter); | ||
document.getElementById('filterButton').addEventListener('click', applyFilters); | document.getElementById('filterButton').addEventListener('click', applyFilters); | ||
function updateOptions() { | function updateOptions() { | ||
Linha 297: | Linha 298: | ||
const specificOptionsDiv = document.getElementById('specificOptions'); | const specificOptionsDiv = document.getElementById('specificOptions'); | ||
const filterSectionDiv = document.getElementById('filterSection'); | const filterSectionDiv = document.getElementById('filterSection'); | ||
if (mapType) { | if (mapType) { | ||
Linha 304: | Linha 304: | ||
specificOptionsDiv.classList.add('hidden'); | specificOptionsDiv.classList.add('hidden'); | ||
filterSectionDiv.classList.add('hidden'); | filterSectionDiv.classList.add('hidden'); | ||
document.getElementById('searchIds').value = ''; | |||
document.getElementById('searchTag').value = ''; | document.getElementById('searchTag').value = ''; | ||
} | } | ||
Linha 311: | Linha 312: | ||
} else { | } else { | ||
filterSectionDiv.classList.add('hidden'); | filterSectionDiv.classList.add('hidden'); | ||
document.getElementById('searchIds').value = ''; | |||
document.getElementById('searchTag').value = ''; | |||
} | } | ||
} | } | ||
Linha 317: | Linha 320: | ||
const isFilterEnabled = document.getElementById('enableFilter').checked; | const isFilterEnabled = document.getElementById('enableFilter').checked; | ||
const filterByTagDiv = document.getElementById('filterByTag'); | const filterByTagDiv = document.getElementById('filterByTag'); | ||
const | const filterByIdDiv = document.getElementById('filterById'); | ||
if (isFilterEnabled) { | if (isFilterEnabled) { | ||
filterByTagDiv.classList.remove('hidden'); | filterByTagDiv.classList.remove('hidden'); | ||
filterByIdDiv.classList.remove('hidden'); | |||
} else { | } else { | ||
filterByTagDiv.classList.add('hidden'); | filterByTagDiv.classList.add('hidden'); | ||
filterByIdDiv.classList.add('hidden'); | |||
document.getElementById('searchTag').value = ''; | |||
document.getElementById('searchIds').value = ''; | |||
} | } | ||
} | } |