Aggiunte funzionalità
This commit is contained in:
parent
6e9dcb18ee
commit
b765a6de3d
2785
index_4.8.html
2785
index_4.8.html
File diff suppressed because it is too large
Load Diff
|
@ -94,12 +94,12 @@ $(document).ready(function() {
|
|||
|
||||
|
||||
// Funzioni di gestione del comportamento dei bottoni collapse
|
||||
$('#collapseLogic').on('hidden.bs.collapse', function(e) {
|
||||
/*$('#collapseLogic').on('hidden.bs.collapse', function(e) {
|
||||
if (e.target.id == "collapseLogic") {
|
||||
$("#showLogic").html('<span class="text-muted">Mostra</span>');
|
||||
$("#collapseAdvanced").collapse('hide');
|
||||
};
|
||||
})
|
||||
})*/
|
||||
|
||||
$('#collapseLogic').on('shown.bs.collapse', function() {
|
||||
$("#showLogic").html('<span class="font-weight-bold text-muted">Nascondi</span>');
|
||||
|
@ -148,7 +148,7 @@ $(document).ready(function() {
|
|||
$('#checkmarkAdvanced').attr('style', 'opacity: 1');
|
||||
$('#checkmarkSimple').attr('style', 'opacity: 0');
|
||||
queryJson.QueryAvanzata = "1";
|
||||
$("#collapseOptions").collapse('hide');
|
||||
// $("#collapseOptions").collapse('hide');
|
||||
$("#simpleSearchDiv").fadeOut(300, function() {
|
||||
$("#rigaRicercaSemplice").removeClass("bg-lida08")
|
||||
$("#rigaRicercaSemplice").addClass("bg-lida10")
|
||||
|
@ -369,6 +369,12 @@ $(document).ready(function() {
|
|||
});
|
||||
});
|
||||
|
||||
$('#btnAddAnd').on('click', function() {
|
||||
tabID++;
|
||||
addGramCla("#sortable0", 1, tabID, 1);
|
||||
$('#collapseLogic').attr('style', "display: d-flex;");
|
||||
$("#unitaRicerca").prop('disabled',true);
|
||||
});
|
||||
// Evento: click sulla lista di clausole nel dropbox "Aggiungi clausola di tipo:" o "aggiungi condizione logica:"
|
||||
$('.addCCbtn').on('click', function() {
|
||||
var addCC = $(this).attr('id');
|
||||
|
@ -393,7 +399,7 @@ $(document).ready(function() {
|
|||
addLogicCond("#sortable0", "OR");
|
||||
break;
|
||||
default:
|
||||
$('#collapseLogic').hide();
|
||||
// $('#collapseLogic').hide();
|
||||
break;
|
||||
};
|
||||
refreshClaList();
|
||||
|
@ -536,6 +542,7 @@ $(document).ready(function() {
|
|||
resetResult();
|
||||
resetAdvGui();
|
||||
refreshClaList();
|
||||
$("#unitaRicerca").prop('disabled',false);
|
||||
});
|
||||
|
||||
// Evento: click sull'icona rimuovi nota
|
||||
|
@ -805,11 +812,11 @@ $(document).ready(function() {
|
|||
};
|
||||
var claText = "Categoria grammaticale: <br>";
|
||||
addLIitem(sortableId, tabID, claText, checkInsert, toExpand);
|
||||
var claClone = document.getElementById("tipogrammaticaleN").cloneNode(true);
|
||||
claClone.setAttribute("id", "cla" + tabID);
|
||||
claClone.setAttribute("data-claActive", active);
|
||||
claClone.setAttribute("aria-labelledby", "cla" + tabID + "-tab");
|
||||
claClone.setAttribute("style", "");
|
||||
var claClone = $("#grammaticaEsintassi").clone(true);
|
||||
claClone.attr("id", "cla" + tabID);
|
||||
claClone.attr("data-claActive", active);
|
||||
claClone.attr("aria-labelledby", "cla" + tabID + "-tab");
|
||||
claClone.attr("style", "");
|
||||
$('#claBody' + tabID).append(claClone);
|
||||
// se non cambio l'id della select react non rileva l'evento onchange:
|
||||
$('#cla' + tabID + " #grammtypesN").attr("id", "grammtypes" + tabID);
|
||||
|
@ -818,38 +825,6 @@ $(document).ready(function() {
|
|||
$('#cla' + tabID + " #opzioni_testoN").attr("id", "opzioni_testo" + tabID);
|
||||
$('#cla' + tabID + " #contextDivN").attr("id", "contextDiv" + tabID);
|
||||
|
||||
var unita = $('#unitaRicerca').val();
|
||||
var query = "";
|
||||
var lemma_forma = "";
|
||||
var opzioni = "";
|
||||
switch (unita) {
|
||||
case "forma":
|
||||
case "lemma":
|
||||
query = $('#queryTextUnita').val();
|
||||
lemma_forma = $('#unitaRicerca').val();
|
||||
opzioni = $('#opzioni_testoUnita').val();
|
||||
break;
|
||||
case "frase":
|
||||
case "periodo":
|
||||
case "discorso":
|
||||
case "riferimenti":
|
||||
opzioni = $('#opzioni_testoINIT').val();
|
||||
lemma_forma = $('#lemma_formaINIT').val();
|
||||
query = $('#queryTextINIT').val();
|
||||
break;
|
||||
}
|
||||
$('#queryText' + tabID).val(query);
|
||||
$('#lemma_forma' + tabID).val(lemma_forma);
|
||||
$('#opzioni_testo' + tabID).val(opzioni);
|
||||
//Nik verificare costruzione clausole JSON
|
||||
/*$('#queryText').val(query);
|
||||
$('#lemma_forma').val(lemma_forma);
|
||||
$('#opzioni_testo').val(opzioni);
|
||||
*/
|
||||
$('#queryTextN').val(query);
|
||||
$('#lemma_formaN').val(lemma_forma);
|
||||
$('#opzioni_testoN').val(opzioni);
|
||||
|
||||
addClaContext(tabID);
|
||||
}
|
||||
|
||||
|
@ -1073,9 +1048,9 @@ $(document).ready(function() {
|
|||
|
||||
// Funzione di refresh della lista clausole nella tab principale e del json della query
|
||||
function refreshClaList(editCard = 9999) {
|
||||
var l_f = $("form #lemma_forma")[0].options[$("form #lemma_forma")[0].selectedIndex].value;
|
||||
var qText = $("form #queryText")[0].value;
|
||||
var optText = $("form #opzioni_testo")[0].value;
|
||||
var l_f = $("#lemma_formaINIT").val();
|
||||
var qText = $("#queryTextINIT").val();
|
||||
var optText = $("#opzioni_testoINIT").val();
|
||||
/*var l_f = "";
|
||||
var qText = "";
|
||||
var optText = "";
|
||||
|
@ -1146,33 +1121,14 @@ $(document).ready(function() {
|
|||
var optText_t = "";
|
||||
var articolo = "Il ";
|
||||
//Nik verificare in cao di modifica delle clausola
|
||||
var unitaDiRicerca = $("#unitaRicerca")[0].options[$("#unitaRicerca")[0].selectedIndex].value;
|
||||
//var unitaDiRicerca = $("#unitaRicerca")[0].options[$("#unitaRicerca")[0].selectedIndex].value;
|
||||
if (editCard == 9999) {
|
||||
if (claListItemId == "li-cla" + tabsContentLenght) {
|
||||
if (unitaDiRicerca == "lemma" || unitaDiRicerca == "forma") {
|
||||
l_f = unitaDiRicerca;
|
||||
if (l_f == "forma") {
|
||||
articolo = "La ";
|
||||
}
|
||||
l_f_t = articolo + l_f;
|
||||
qText = $("#queryTextUnita")[0].value;
|
||||
optText = $("#opzioni_testoUnita")[0].value;
|
||||
optText_t = $("#opzioni_testoUnita")[0].options[$("#opzioni_testoUnita")[0].selectedIndex].text;
|
||||
} else {
|
||||
l_f = $("#lemma_formaN")[0].options[$("#lemma_formaN")[0].selectedIndex].value;
|
||||
l_f_t = $("#lemma_formaN")[0].options[$("#lemma_formaN")[0].selectedIndex].text;
|
||||
qText = $("#queryTextN")[0].value;
|
||||
optText = $("#opzioni_testoN")[0].value;
|
||||
optText_t = $("#opzioni_testoN")[0].options[$("#opzioni_testoN")[0].selectedIndex].text;
|
||||
}
|
||||
}else{
|
||||
l_f = $("form #lemma_forma" + claIdNum)[0].options[$("form #lemma_forma" + claIdNum)[0].selectedIndex].value;
|
||||
l_f_t = $("form #lemma_forma" + claIdNum)[0].options[$("form #lemma_forma" + claIdNum)[0].selectedIndex].text;
|
||||
qText = $("form #queryText" + claIdNum)[0].value;
|
||||
optText = $("form #opzioni_testo" + claIdNum)[0].value;
|
||||
optText_t = $("form #opzioni_testo" + claIdNum)[0].options[$("form #opzioni_testo" + claIdNum)[0].selectedIndex].text;
|
||||
|
||||
}
|
||||
|
||||
l_f = $("#lemma_formaINIT").val();
|
||||
l_f_t = $("#lemma_formaINIT").text();
|
||||
qText = $("#queryTextINIT").val();
|
||||
optText = $("#opzioni_testoINIT").val();
|
||||
optText_t = $("#opzioni_testoINIT").text();
|
||||
} else {
|
||||
l_f = $("#lemma_forma" + editCard)[0].options[$("#lemma_forma" + editCard)[0].selectedIndex].value;
|
||||
l_f_t = $("#lemma_forma" + editCard)[0].options[$("#lemma_forma" + editCard)[0].selectedIndex].text;
|
||||
|
@ -1583,7 +1539,7 @@ $(document).ready(function() {
|
|||
window["context" + claIdNum] = JSON.parse(JSON.stringify(contextEmpty));
|
||||
$('#selectable-xX' + claIdNum + " .show").removeClass("show");
|
||||
|
||||
$("#contextDiv" + claIdNum).hide(); //Nik work around per non mostrare context
|
||||
//$("#contextDiv" + claIdNum).hide(); //Nik work around per non mostrare context
|
||||
};
|
||||
|
||||
function resetAdvGui() {
|
||||
|
|
Loading…
Reference in New Issue