migiorie grafiche

This commit is contained in:
nicola 2022-10-09 15:52:05 +02:00
parent 628b1aa225
commit 3d5ba64760
2 changed files with 1420 additions and 1316 deletions

File diff suppressed because it is too large Load Diff

View File

@ -487,7 +487,7 @@ $(document).ready(function() {
//element.find('.listacondizioni').append(dlclass);
let virgola = tuttiFiltri.lastIndexOf(',');
tuttiFiltri = tuttiFiltri.substring(0, virgola);
let txtAreaFiltri = '<textarea id = ' + 'textarea-'+filterconditions+
let txtAreaFiltri = '<textarea id = ' + 'textarea-' + filterconditions +
' readonly style="resize:none" class="bg-washed-blue bn" rows="2" cols="20" name="usrtxt" wrap="hard">' +
tuttiFiltri + "</textarea>"
ddclass.append(txtAreaFiltri);
@ -514,9 +514,9 @@ $(document).ready(function() {
filtro['tipoClausola'] = tipoClausola
// checkedField = $('input[name=oggetto]:checked', '#filterform').val();
//
// filtro['lemma_forma'] = checkedField
// checkedField = $('input[name=oggetto]:checked', '#filterform').val();
//
// filtro['lemma_forma'] = checkedField
condizioniFiltro['filtro-' + filterconditions] = filtro
@ -547,10 +547,10 @@ $(document).ready(function() {
jQuery(document).delegate('#grammarbutton', 'click', function(e) {
var size = Object.keys(condizioniFiltro).length;
if (size == 0){
if (size == 0) {
var clausola = $("#searchValue").val()
clausola = clausola.trim();
if (clausola == "" || clausola == ' '){
if (clausola == "" || clausola == ' ') {
return false
}
@ -559,21 +559,21 @@ $(document).ready(function() {
condizioniFiltro['filtro-1'] = filtro;
}
spquery=buildSQ(condizioniFiltro)
spquery = buildSQ(condizioniFiltro)
queryFields = [];
for (var i in spquery.variables) {
queryFields.push(spquery.variables[i].variable.value);
}
execMySparqlQuery (new sparqlGenerator().stringify(spquery));
execMySparqlQuery(new sparqlGenerator().stringify(spquery));
return true
}
)
async function execMySparqlQuery (spQuery){
async function execMySparqlQuery(spQuery) {
$("#loader").show();
alert (new sparqlGenerator().stringify(spQuery));
bindingsStream = await myEngine.queryBindings(spQuery, { sources: [ { type: 'sparql', value: sparqlEndpoint }, ], });
alert(new sparqlGenerator().stringify(spQuery));
bindingsStream = await myEngine.queryBindings(spQuery, { sources: [{ type: 'sparql', value: sparqlEndpoint },], });
$("#sparqlquery").val(spQuery);
$("#copiaQuery").prop("disabled", false);
@ -613,19 +613,19 @@ $(document).ready(function() {
$("#resultsId1").append(resultTable);
$("#risultatitesto").append("]");
$("#copiaTesto").prop("disabled", false);
$('#resultTable').DataTable( {
$('#resultTable').DataTable({
colReorder: true,
language: {
url: 'dataTables.it-IT.json'
},
//dom: 'Blfrtip',
dom: "<'row'<'col-sm-12 col-md-6'l><'col-sm-6 col-md-3'f><'col-sm-6 col-md-3 text-right'B>>" + "<'row'<'col-sm-12'tr>>" + "<'row'<'col-sm-12 col-md-5'i><'col-sm-12 col-md-7'p>>",
buttons: [ 'copy', 'excel', 'print' ]
buttons: ['copy', 'excel', 'print']
});
setTimeout(function(){
setTimeout(function() {
buttonDiv = $("#resultsId1").find(".buttons-copy");
$('<label class="input-group-text"><ion-icon name="copy"></ion-icon></label>').insertBefore(buttonDiv);
},300);
}, 300);
});
}
function AggiornaFiltro(filtroId) {
@ -666,7 +666,7 @@ $(document).ready(function() {
let filterNum = filtroId.substring(7);
$('#textarea-'+ filterNum).val(tuttiFiltri);
$('#textarea-' + filterNum).val(tuttiFiltri);
@ -692,13 +692,13 @@ $(document).ready(function() {
return true;
}
/**
/**
Il Filtro "scritto" viene eliminato
*/
jQuery(document).delegate('a.delete-written-filter', 'click', function(e) {
jQuery(document).delegate('a.delete-written-filter', 'click', function(e) {
e.preventDefault();
var didConfirm = confirm("Sei sicuro di voler cancellare il filtro?");
@ -726,18 +726,18 @@ jQuery(document).delegate('a.delete-written-filter', 'click', function(e) {
} else {
return false;
}
});
});
/**
/**
Il Filtro "scritto" viene editato
*/
jQuery(document).delegate('a.edit-written-filter', 'click', function(e) {
jQuery(document).delegate('a.edit-written-filter', 'click', function(e) {
e.preventDefault();
if (clausolaVisibile)
@ -770,14 +770,14 @@ jQuery(document).delegate('a.edit-written-filter', 'click', function(e) {
/*} else {
return false;
}*/
});
});
/**
/**
*
* Visualizza Categoria Grammaticale
*/
function showCategoriaGrammaticale(valoriFiltro = {}, filtroTarget = '') {
function showCategoriaGrammaticale(valoriFiltro = {}, filtroTarget = '') {
var content = jQuery('#categoriagrammaticale >div'),
@ -785,8 +785,19 @@ function showCategoriaGrammaticale(valoriFiltro = {}, filtroTarget = '') {
element = null,
element = content.clone();
$(":radio").prop("checked", false);
checkedField = $('input[name=lemma_forma]:checked', '#filterform').val();
var radios = $(":radio");
//$(":radio").prop("checked", false);
$(":checkbox").prop("checked", false);
//
// for (radio in radios) {
// if (radios[radio].val == checkedField) {
// radios[radio].checked = true;
// }
// }
element.attr('id', 'cg-' + size);
element.find('.remove-filter').attr('target', 'cg-' + size);
@ -831,14 +842,14 @@ function showCategoriaGrammaticale(valoriFiltro = {}, filtroTarget = '') {
if (size == 1)
jQuery('#grammarbutton').attr('style', "display:block;")
}
}
/**
/**
Visualizza Clausola Sintattica
*/
function showClausolaSintattica(valoriFiltro = {}, filtroTarget = '') {
function showClausolaSintattica(valoriFiltro = {}, filtroTarget = '') {
var content = jQuery('#tiposintattico >div'),
@ -875,10 +886,10 @@ function showClausolaSintattica(valoriFiltro = {}, filtroTarget = '') {
sintconditions = sintconditions + 1
if (size == 1)
jQuery('#grammarbutton').attr('style', "display:block;")
}
}
jQuery(document).delegate('a.add-details', 'click', function(e) {
jQuery(document).delegate('a.add-details', 'click', function(e) {
e.preventDefault();
var targetDiv = jQuery(this).attr('target');
@ -899,6 +910,6 @@ jQuery(document).delegate('a.add-details', 'click', function(e) {
return true;
});
});
});