Aggiunto bottone ricerca avanzata

This commit is contained in:
Luca Trupiano 2022-10-17 16:18:12 +02:00
parent 2eb6955b7e
commit 55fb4b76ef
2 changed files with 27 additions and 7 deletions

View File

@ -59,7 +59,7 @@
<form>
<div class="tab-content border-right border-left border-bottom" id="cla-TabContent">
<div class="tab-pane fade show active p-2 bg-white" id="cla0" role="tabpanel" aria-labelledby="cla0-tab">
<div class="form-inline input-group p-1" action="">
<div class="form-inline input-group p-1 pb-2" action="">
<div class="input-group-prepend">
<label class="input-group-text"><ion-icon name="document-text"></ion-icon></label>
</div>
@ -69,7 +69,15 @@
<option disabled value="testo">il testo</option>
</select>
<input type="text" class="form-control" id="queryText" placeholder="stelle" aria-describedby="name-desc" name="query">
<div class="btn-group pl-1" role="group" aria-label="Bottone ricerca">
<label class="input-group-text"><ion-icon name="search-circle"></ion-icon></label>
<button type="submit" class="btn btn-outline-primary">Cerca</button>
</div>
</div>
<div id="cla-Advanced" style="display: none">
<div class="text-muted p-1">
Applicando le clausole:
</div>
@ -102,11 +110,12 @@
</div>
</div>
</div>
<div class="row p-1 align-items-end justify-content-between">
</div>
<div class="row p-1 ml-2 mt-2 align-items-end justify-content-between">
<div class="col">
<div class="btn-group" role="group" aria-label="Bottone ricerca">
<label class="input-group-text"><ion-icon name="search-circle"></ion-icon></label>
<button type="submit" class="btn btn-outline-primary">Cerca</button>
<div class="custom-control custom-switch px-3 bd-highlight">
<input type="checkbox" class="custom-control-input" name="avanzata-attiva" aria-label="attiva" id="advanSW">
<label class="custom-control-label" for="advanSW"><div class="pb-1 text-muted">Ricerca avanzata</div></label>
</div>
</div>
<div class="col text-right px-3">

View File

@ -221,6 +221,17 @@ $(document).ready(function() {
return false;
});
// Evento: click sul checkbox di Ricerca avanzata
$('#cla-TabContent').on('click', '#advanSW', function() {
console.log($(this).prop('checked'));
console.log($("#cla-TabContent"));
if ($(this).prop('checked')) {
$("#cla-Advanced").attr('style', "display: block;");
} else {
$("#cla-Advanced").attr('style', "display: none;");
}
});
// Variabili JSON per i filtri