nuova versione
Merge branch 'master' of https://gitea-s2i2s.isti.cnr.it/concordia/LiDa_Search.git
This commit is contained in:
parent
421b5e7d64
commit
f6a27cadee
|
|
@ -689,7 +689,7 @@
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<span class="px-2" id="spanContenenti">Contenenti:</span>
|
<span class="px-2" id="spanContenenti">Contenenti:</span>
|
||||||
<div id="grammaticaEsintassi">
|
<div id="grammaticaEsintassi" style="display: none;">
|
||||||
<div class="px-1 pb-0" id="cercaFrasiPeriodiDiscorsi">
|
<div class="px-1 pb-0" id="cercaFrasiPeriodiDiscorsi">
|
||||||
<div
|
<div
|
||||||
class=" form-group form-inline input-group px-1 pt-1 pb-2 m-0"
|
class=" form-group form-inline input-group px-1 pt-1 pb-2 m-0"
|
||||||
|
|
@ -1561,10 +1561,10 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class=" well m-0 pb-2" id="contextDiv0">
|
<div class=" well m-0 pb-2" id="contextDiv0" style="display: none;">
|
||||||
|
|
||||||
<div id="contextTable-xX0"
|
<div id="contextTable-xX0"
|
||||||
class="row no-gutters p-1 pt-0 bg-lida08">
|
class="row no-gutters p-1 pt-0 bg-lida08" >
|
||||||
<div class="col-12 py-0 pl-1">
|
<div class="col-12 py-0 pl-1">
|
||||||
<span class=" align-bottom">Restringi il contesto
|
<span class=" align-bottom">Restringi il contesto
|
||||||
di ricerca:</span>
|
di ricerca:</span>
|
||||||
|
|
@ -1905,10 +1905,6 @@
|
||||||
style="display: none;" aria-labelledby="headingLogic"
|
style="display: none;" aria-labelledby="headingLogic"
|
||||||
data-parent="#accordionSearch">
|
data-parent="#accordionSearch">
|
||||||
<div class="card-body p-0">
|
<div class="card-body p-0">
|
||||||
<div class="col-12 pt-2 px-4">
|
|
||||||
<span class=" text-muted align-bottom pr-2">
|
|
||||||
Filtra in AND con</span>
|
|
||||||
</div>
|
|
||||||
<div class="row card tab-content bg-lida10 m-0 p-0"
|
<div class="row card tab-content bg-lida10 m-0 p-0"
|
||||||
id="cla-TabContent">
|
id="cla-TabContent">
|
||||||
<div class="col-12 pt-2">
|
<div class="col-12 pt-2">
|
||||||
|
|
@ -1928,9 +1924,9 @@
|
||||||
<div class="col-12 p-0">
|
<div class="col-12 p-0">
|
||||||
<ul id="sortable0"
|
<ul id="sortable0"
|
||||||
class="condLIand list-group ui-sortable">
|
class="condLIand list-group ui-sortable">
|
||||||
<li id="li-cla0"
|
<!-- <li id="li-cla0"
|
||||||
class="list-group-item align-items-center my-1 ui-state-default ui-state-disabled ui-state-disabled-opacity-06 border text-muted bg-lida-vis small">Nessuna
|
class="list-group-item align-items-center my-1 ui-state-default ui-state-disabled ui-state-disabled-opacity-06 border text-muted bg-lida-vis small">Nessuna
|
||||||
clausola aggiunta.</li>
|
clausola aggiunta.</li> -->
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
108
js/script_4.8.js
108
js/script_4.8.js
|
|
@ -159,6 +159,9 @@ $(document).ready(function() {
|
||||||
$("#collapseLogic").collapse('show');
|
$("#collapseLogic").collapse('show');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
tabID++;
|
||||||
|
addGramCla("#sortable0", 1, tabID, 1);
|
||||||
|
$('#collapseLogic').attr('style', "display: d-flex;");
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#searchSimple').on('click', function() {
|
$('#searchSimple').on('click', function() {
|
||||||
|
|
@ -294,6 +297,9 @@ $(document).ready(function() {
|
||||||
$('#spanContenenti').attr('style', "display: d-flex;");
|
$('#spanContenenti').attr('style', "display: d-flex;");
|
||||||
$('#tiposintatticoN').attr('style', "display: d-flex;");
|
$('#tiposintatticoN').attr('style', "display: d-flex;");
|
||||||
$('#cercaRiferimenti').attr('style', "display: none;");
|
$('#cercaRiferimenti').attr('style', "display: none;");
|
||||||
|
$("#contextDiv0").attr('style', "display: none");
|
||||||
|
$('#collapseLogic').attr('style', "display: d-flex;");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "riferimenti":
|
case "riferimenti":
|
||||||
$('#cercaRiferimenti').attr('style', "display: d-flex;");
|
$('#cercaRiferimenti').attr('style', "display: d-flex;");
|
||||||
|
|
@ -301,6 +307,8 @@ $(document).ready(function() {
|
||||||
$('#tipogrammaticaleN').attr('style', "display: none;");
|
$('#tipogrammaticaleN').attr('style', "display: none;");
|
||||||
$('#tiposintatticoN').attr('style', "display: none");
|
$('#tiposintatticoN').attr('style', "display: none");
|
||||||
$('#spanContenenti').attr('style', "display: none;");
|
$('#spanContenenti').attr('style', "display: none;");
|
||||||
|
$('#collapseLogic').attr('style', "display: none;");
|
||||||
|
$("#contextDiv0").attr('style', "display: d-flex;");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -371,41 +379,16 @@ $(document).ready(function() {
|
||||||
|
|
||||||
$('#btnAddAnd').on('click', function() {
|
$('#btnAddAnd').on('click', function() {
|
||||||
tabID++;
|
tabID++;
|
||||||
addGramCla("#sortable0", 1, tabID, 1);
|
addGramCla("#sortable0", 1, tabID, 1,1);
|
||||||
$('#collapseLogic').attr('style', "display: d-flex;");
|
$('#collapseLogic').attr('style', "display: d-flex;");
|
||||||
$("#unitaRicerca").prop('disabled',true);
|
$("#unitaRicerca").prop('disabled',true);
|
||||||
});
|
});
|
||||||
// Evento: click sulla lista di clausole nel dropbox "Aggiungi clausola di tipo:" o "aggiungi condizione logica:"
|
$('#btnAddOr').on('click', function() {
|
||||||
$('.addCCbtn').on('click', function() {
|
tabID++;
|
||||||
var addCC = $(this).attr('id');
|
addGramCla("#sortable0", 1, tabID, 1,2);
|
||||||
$('#collapseLogic').show();
|
$('#collapseLogic').attr('style', "display: d-flex;");
|
||||||
|
$("#unitaRicerca").prop('disabled',true);
|
||||||
switch (addCC) {
|
|
||||||
case "btnAddCla1":
|
|
||||||
tabID++;
|
|
||||||
addGramCla("#sortable0", 1, tabID, 1);
|
|
||||||
numberOfQueries++;
|
|
||||||
break;
|
|
||||||
case "btnAddCla2":
|
|
||||||
tabID++;
|
|
||||||
addSyntCla("#sortable0", 1, tabID, 1);
|
|
||||||
numberOfQueries++;
|
|
||||||
break;
|
|
||||||
case "btnAddCla3":
|
|
||||||
tabID++;
|
|
||||||
addMetaCla("#sortable0", 0, tabID, 0);
|
|
||||||
break;
|
|
||||||
case "btnAddCond":
|
|
||||||
addLogicCond("#sortable0", "OR");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
// $('#collapseLogic').hide();
|
|
||||||
break;
|
|
||||||
};
|
|
||||||
refreshClaList();
|
|
||||||
refreshSortables();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Evento: clausola spostata nella lista
|
// Evento: clausola spostata nella lista
|
||||||
$('#sortable0').sortable({
|
$('#sortable0').sortable({
|
||||||
opacity: 0.6,
|
opacity: 0.6,
|
||||||
|
|
@ -804,14 +787,15 @@ $(document).ready(function() {
|
||||||
|
|
||||||
|
|
||||||
// Funzione di creazione del tab delle clausole grammaticali
|
// Funzione di creazione del tab delle clausole grammaticali
|
||||||
function addGramCla(sortableId, active, tabID, toExpand) {
|
function addGramCla(sortableId, active, tabID, toExpand, cond = 9999) {
|
||||||
if (active > 0) {
|
if (active > 0) {
|
||||||
var checkInsert = ' checked="checked"';
|
var checkInsert = ' checked="checked"';
|
||||||
} else {
|
} else {
|
||||||
var checkInsert = '';
|
var checkInsert = '';
|
||||||
};
|
};
|
||||||
var claText = "Categoria grammaticale: <br>";
|
|
||||||
addLIitem(sortableId, tabID, claText, checkInsert, toExpand);
|
var claText = ""; //Categoria grammaticale: <br>";
|
||||||
|
addLIitem(sortableId, tabID, claText, checkInsert, toExpand, cond);
|
||||||
var claClone = $("#grammaticaEsintassi").clone(true);
|
var claClone = $("#grammaticaEsintassi").clone(true);
|
||||||
claClone.attr("id", "cla" + tabID);
|
claClone.attr("id", "cla" + tabID);
|
||||||
claClone.attr("data-claActive", active);
|
claClone.attr("data-claActive", active);
|
||||||
|
|
@ -824,7 +808,7 @@ $(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);
|
||||||
|
$("#contextDiv0").attr('style', "display: none");
|
||||||
addClaContext(tabID);
|
addClaContext(tabID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -938,46 +922,6 @@ $(document).ready(function() {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Funzione di creazione del tab delle clausole sintattiche
|
|
||||||
function addSyntCla(sortableId, active, tabID, toExpand) {
|
|
||||||
if (active > 0) {
|
|
||||||
var checkInsert = ' checked="checked"';
|
|
||||||
} else {
|
|
||||||
var checkInsert = '';
|
|
||||||
};
|
|
||||||
var claText = "Tipo sintattico: <br>";
|
|
||||||
addLIitem(sortableId, tabID, claText, checkInsert, toExpand);
|
|
||||||
var claClone = document.getElementById("tiposintatticoN").cloneNode(true);
|
|
||||||
|
|
||||||
claClone.setAttribute("id", "cla" + tabID);
|
|
||||||
claClone.setAttribute("data-claActive", active);
|
|
||||||
claClone.setAttribute("aria-labelledby", "cla" + tabID + "-tab");
|
|
||||||
claClone.setAttribute("style", "");
|
|
||||||
$('#claBody' + tabID).append(claClone);
|
|
||||||
$('#cla' + tabID + " #lemma_formaN").attr("id", "lemma_forma" + tabID);
|
|
||||||
$('#cla' + tabID + " #queryTextN").attr("id", "queryText" + tabID);
|
|
||||||
$('#cla' + tabID + " #opzioni_testoN").attr("id", "opzioni_testo" + tabID);
|
|
||||||
$('#cla' + tabID + " #contextDivN").attr("id", "contextDiv" + tabID);
|
|
||||||
addClaContext(tabID);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Funzione di creazione del tab delle clausole metafore
|
|
||||||
function addMetaCla(sortableId, active, tabID, toExpand) {
|
|
||||||
var checkInsert = ' disabled';
|
|
||||||
//if (active > 0) {
|
|
||||||
// var checkInsert = '" checked="checked"';
|
|
||||||
//} else {
|
|
||||||
// var checkInsert = '"';
|
|
||||||
//};
|
|
||||||
var claText = "Clausola Metafore - non ancora implementata";
|
|
||||||
addLIitem(sortableId, tabID, claText, checkInsert, toExpand);
|
|
||||||
var claClone = document.getElementById("tipometaforaN").cloneNode(true);
|
|
||||||
claClone.setAttribute("id", "cla" + tabID);
|
|
||||||
claClone.setAttribute("data-claActive", active);
|
|
||||||
claClone.setAttribute("aria-labelledby", "cla" + tabID + "-tab");
|
|
||||||
claClone.setAttribute("style", "");
|
|
||||||
$('#claBody' + tabID).append(claClone);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Funzione di creazione della parte di definizione del contesto delle clausole
|
// Funzione di creazione della parte di definizione del contesto delle clausole
|
||||||
function addClaContext(tabID) {
|
function addClaContext(tabID) {
|
||||||
|
|
@ -986,6 +930,8 @@ $(document).ready(function() {
|
||||||
contClone = contClone.outerHTML.replace(/xX0/g, "xX" + tabID);
|
contClone = contClone.outerHTML.replace(/xX0/g, "xX" + tabID);
|
||||||
contClone = contClone.replace(/-secondary/g, "-success");
|
contClone = contClone.replace(/-secondary/g, "-success");
|
||||||
contClone = contClone.replace(/sel-canto/g, "sel-canto suxess");
|
contClone = contClone.replace(/sel-canto/g, "sel-canto suxess");
|
||||||
|
|
||||||
|
|
||||||
$("#contextDiv" + tabID).append($(contClone)[0]);
|
$("#contextDiv" + tabID).append($(contClone)[0]);
|
||||||
resetContext(tabID);
|
resetContext(tabID);
|
||||||
$("#selectable-xX" + tabID).selectable({
|
$("#selectable-xX" + tabID).selectable({
|
||||||
|
|
@ -1028,7 +974,7 @@ $(document).ready(function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Funzione di creazione del LI di una clausola nella lista sortable
|
// Funzione di creazione del LI di una clausola nella lista sortable
|
||||||
function addLIitem(sortableId, tabID, claText, checkInsert, toExpand) {
|
function addLIitem(sortableId, tabID, claText, checkInsert, toExpand, cond = 9999) {
|
||||||
claListLen++;
|
claListLen++;
|
||||||
var cloneLI = document.getElementById("li-claxX1Xx").cloneNode(true);
|
var cloneLI = document.getElementById("li-claxX1Xx").cloneNode(true);
|
||||||
cloneLI.setAttribute("style", "opacity: 0.1;");
|
cloneLI.setAttribute("style", "opacity: 0.1;");
|
||||||
|
|
@ -1038,6 +984,14 @@ $(document).ready(function() {
|
||||||
if (checkInsert == ' disabled') {
|
if (checkInsert == ' disabled') {
|
||||||
cloneLI = cloneLI.replace(/claCollBtn/g, "claCollBtn " + checkInsert);
|
cloneLI = cloneLI.replace(/claCollBtn/g, "claCollBtn " + checkInsert);
|
||||||
};
|
};
|
||||||
|
var boolCond = $('<span />')
|
||||||
|
switch (cond){
|
||||||
|
case 1: boolCond.append("AND");
|
||||||
|
break;
|
||||||
|
case 2: boolCond.append("OR");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
$(sortableId).append(boolCond)
|
||||||
$(sortableId).append($(cloneLI)[0]);
|
$(sortableId).append($(cloneLI)[0]);
|
||||||
if (toExpand == 1) {
|
if (toExpand == 1) {
|
||||||
$("#claCollapse" + tabID).focus();
|
$("#claCollapse" + tabID).focus();
|
||||||
|
|
@ -1094,7 +1048,7 @@ $(document).ready(function() {
|
||||||
$("#cla-defaultCond").remove();
|
$("#cla-defaultCond").remove();
|
||||||
} else {
|
} else {
|
||||||
if ($('#cla-defaultCond').length == 0) {
|
if ($('#cla-defaultCond').length == 0) {
|
||||||
$("#cla-list-row").prepend($(defaultCond));
|
//$("#cla-list-row").prepend($(defaultCond));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue