Risolto attivazione subCategoria Grammaticale

This commit is contained in:
nicola 2024-12-10 17:04:35 +01:00
parent f6a27cadee
commit 354fd674a7
2 changed files with 12 additions and 7 deletions

View File

@ -783,7 +783,10 @@
</select> </select>
</div> </div>
</div> </div>
</div>
<div
class="container form-group pl-3 pr-2 mb-0 pt-1 pb-0 dettaglifiltri"
id="dettagliGrammaticale">
</div> </div>
<!-- FINE GRAMMATICALE --> <!-- FINE GRAMMATICALE -->
<!-- TIPO SINTATTICO --> <!-- TIPO SINTATTICO -->
@ -1468,9 +1471,8 @@
</div> </div>
</div> </div>
</div> </div>
<div
class="container form-group pl-3 pr-2 mb-0 pt-1 pb-0 dettaglifiltri"></div> <div class="bg-light well m-0" id="contextDivN"></div>
<div class="bg-light well m-0" id="contextDivN"></div>
</div> </div>
<!-- Div grammatica e sintassi --> <!-- Div grammatica e sintassi -->
<div class="px-1 pb-0" id="cercaRiferimenti" <div class="px-1 pb-0" id="cercaRiferimenti"

View File

@ -505,8 +505,9 @@ $(document).ready(function() {
// Nik evento aggiunto per selezionare Categoria Grammaticale in versione prova // Nik evento aggiunto per selezionare Categoria Grammaticale in versione prova
$("#grammtypesN").on('change', function(e) { $("#grammtypesN").on('change', function(e) {
var selectedValue = $(this).val(); var selectedValue = $(this).val();
var contentDiv = $(".dettaglifiltri"); var tabPaneId = ($(this).closest('.tab-pane').attr("id"));
addCatgramSubcla(contentDiv, selectedValue); var id = tabPaneId.replace("tipogrammaticale","cla");
addCatgramSubcla(id, selectedValue);
}); });
// Evento: Submit form // Evento: Submit form
$("form").submit(function(e) { $("form").submit(function(e) {
@ -808,13 +809,15 @@ $(document).ready(function() {
$('#cla' + tabID + " #queryTextN").attr("id", "queryText" + tabID); $('#cla' + tabID + " #queryTextN").attr("id", "queryText" + tabID);
$('#cla' + tabID + " #opzioni_testoN").attr("id", "opzioni_testo" + tabID); $('#cla' + tabID + " #opzioni_testoN").attr("id", "opzioni_testo" + tabID);
$('#cla' + tabID + " #contextDivN").attr("id", "contextDiv" + tabID); $('#cla' + tabID + " #contextDivN").attr("id", "contextDiv" + tabID);
$('#cla' + tabID + " #tipogrammaticaleN").attr("id","tipogrammaticale" + tabID);
$("#contextDiv0").attr('style', "display: none"); $("#contextDiv0").attr('style', "display: none");
addClaContext(tabID); addClaContext(tabID);
} }
// Funzione di creazione delle subclausole grammaticali basate sul valore scelto // Funzione di creazione delle subclausole grammaticali basate sul valore scelto
function addCatgramSubcla(tabPaneId, selectedValue) { function addCatgramSubcla(tabPaneId, selectedValue) {
var dettagliBox = $("#tipogrammaticaleN" + " .dettaglifiltri"); var dettagliBox = $("#" + tabPaneId + " .dettaglifiltri");
dettagliBox.html(""); dettagliBox.html("");
if (Object.keys(categorie).includes(selectedValue)) { if (Object.keys(categorie).includes(selectedValue)) {
var filtro = categorie[selectedValue] var filtro = categorie[selectedValue]