Amélioration "effacer les filtres"

This commit is contained in:
Vincent Vandemeulebrouck 2023-01-15 23:30:32 +01:00
parent 948309bb4f
commit 3cc56c615c
2 changed files with 8 additions and 2 deletions

View File

@ -155,7 +155,7 @@ export class FenetreRechercheTirage extends Application {
this.html.find("input.activate-filter").change(event => this.changeListeFiltresActifs())
this.html.find("a.supprimer-filtres").click(async event => this.html.find('input.activate-filter:checked').prop("checked", false))
this.html.find("a.supprimer-filtres").click(async event => this.supprimerFiltres())
this.html.find("a.recherche-filtres").click(async event => await this.recherche())
@ -166,6 +166,11 @@ export class FenetreRechercheTirage extends Application {
})
}
supprimerFiltres() {
this.html.find('div.liste-resultats').html('');
return this.html.find('input.activate-filter:checked').prop("checked", false);
}
async recherche() {
const table = await this.buildTable();
const htmlResultats = await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/tirage/liste-resultats.hbs`, { resultats: table });

View File

@ -1,8 +1,9 @@
<div class="fenetre-recherche">
<div>
<span><a class="supprimer-filtres chat-card-button">Tout</a></span>
<span><a class="supprimer-filtres chat-card-button">Effacer les filtres</a></span>
<span><a class="recherche-filtres chat-card-button">Appliquer les filtres</a></span>
<span><a class="tirage-filtres chat-card-button">Tirage aléatoire</a></span>
<br>
<span class="liste-filtres-actifs"></span>
</div>
<hr>