Modificata visualizzazione dei Risultati testuali della ricerca
This commit is contained in:
parent
cca91c526d
commit
1e4efd3e4c
|
@ -600,6 +600,7 @@ $(document).ready(function() {
|
||||||
var resultTablePart4 = '';
|
var resultTablePart4 = '';
|
||||||
var resultTablePart5 = '</tbody></table>';
|
var resultTablePart5 = '</tbody></table>';
|
||||||
var resultTable = '';
|
var resultTable = '';
|
||||||
|
var latestResult = '';
|
||||||
var rowNum = 1;
|
var rowNum = 1;
|
||||||
for (var i = 0; i < queryFields.length; i++) {
|
for (var i = 0; i < queryFields.length; i++) {
|
||||||
resultTablePart2 = resultTablePart2 + '<th scope="col">' + queryFields[i] + '</th>';
|
resultTablePart2 = resultTablePart2 + '<th scope="col">' + queryFields[i] + '</th>';
|
||||||
|
@ -608,18 +609,20 @@ $(document).ready(function() {
|
||||||
$('#resultsId1').empty();
|
$('#resultsId1').empty();
|
||||||
$('#resultsId1').addClass("small pb-2")
|
$('#resultsId1').addClass("small pb-2")
|
||||||
$("#risultatitesto").empty();
|
$("#risultatitesto").empty();
|
||||||
$("#risultatitesto").append("[\n");
|
//$("#risultatitesto").append("[\n");
|
||||||
bindingsStream.on('data', (binding) => {
|
bindingsStream.on('data', (binding) => {
|
||||||
//console.log(binding.toString()); // Quick way to print bindings for testing
|
//console.log(binding.toString()); // Quick way to print bindings for testing
|
||||||
//console.log(binding.has('sub')); // Will be true
|
//console.log(binding.has('sub')); // Will be true
|
||||||
|
latestResult = rowNum + '. "' + binding.get('Verso').value + '" (' + binding.get('Cantica').value + ', ' + binding.get('Canto').value + ', Verso ' + binding.get('NumeroVerso').value + ')\n';
|
||||||
|
$("#risultatitesto").append(latestResult);
|
||||||
resultTablePart4 = '<tr><th scope="row" class="text-muted">' + rowNum++ + '</th>';
|
resultTablePart4 = '<tr><th scope="row" class="text-muted">' + rowNum++ + '</th>';
|
||||||
for (var i = 0; i < queryFields.length; i++) {
|
for (var i = 0; i < queryFields.length; i++) {
|
||||||
resultTablePart4 = resultTablePart4 + '<td class="text-muted">' + binding.get(queryFields[i]).value + "</td>";
|
resultTablePart4 = resultTablePart4 + '<td class="text-muted">' + binding.get(queryFields[i]).value + "</td>";
|
||||||
};
|
};
|
||||||
resultTable = resultTable + resultTablePart4 + '</tr>';
|
resultTable = resultTable + resultTablePart4 + '</tr>';
|
||||||
$("#risultatitesto").append(binding.toString() + ",\n");
|
//$("#risultatitesto").append(binding.toString() + ",\n");
|
||||||
$("#loader").hide();
|
$("#loader").hide();
|
||||||
//console.log(binding.get('form').value);
|
//console.log(binding.get('Verso').value);
|
||||||
//console.log(binding.get('form').termType);
|
//console.log(binding.get('form').termType);
|
||||||
//console.log(binding.get('pred').value);
|
//console.log(binding.get('pred').value);
|
||||||
//console.log(binding.get('obj').value);
|
//console.log(binding.get('obj').value);
|
||||||
|
@ -627,7 +630,7 @@ $(document).ready(function() {
|
||||||
bindingsStream.on('end', () => {
|
bindingsStream.on('end', () => {
|
||||||
resultTable = resultTable + resultTablePart5;
|
resultTable = resultTable + resultTablePart5;
|
||||||
$("#resultsId1").append(resultTable);
|
$("#resultsId1").append(resultTable);
|
||||||
$("#risultatitesto").append("]");
|
//$("#risultatitesto").append("]");
|
||||||
$("#copiaTesto").prop("disabled", false);
|
$("#copiaTesto").prop("disabled", false);
|
||||||
$('#resultTable').DataTable( {
|
$('#resultTable').DataTable( {
|
||||||
colReorder: true,
|
colReorder: true,
|
||||||
|
@ -893,12 +896,12 @@ $(document).ready(function() {
|
||||||
};
|
};
|
||||||
|
|
||||||
$.fn.copy2clipboard = function() {
|
$.fn.copy2clipboard = function() {
|
||||||
$('div[id^="msgCopiata"]').remove();
|
$('div[id^="msgCopiati"]').remove();
|
||||||
this.select();
|
this.select();
|
||||||
$(this).focus();
|
$(this).focus();
|
||||||
document.execCommand("copy");
|
document.execCommand("copy");
|
||||||
document.getSelection().removeAllRanges();
|
document.getSelection().removeAllRanges();
|
||||||
$(this).after('<div class="mt-2 text-lida3" id="msgCopiata">Copiata nella clipboard</div>');
|
$(this).after('<div class="mt-2 text-lida3" id="msgCopiati">Copiati nella clipboard</div>');
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue