diff --git a/js/script_Luk_Q.js b/js/script_Luk_Q.js index af24cae..3442c89 100644 --- a/js/script_Luk_Q.js +++ b/js/script_Luk_Q.js @@ -600,6 +600,7 @@ $(document).ready(function() { var resultTablePart4 = ''; var resultTablePart5 = ''; var resultTable = ''; + var latestResult = ''; var rowNum = 1; for (var i = 0; i < queryFields.length; i++) { resultTablePart2 = resultTablePart2 + '' + queryFields[i] + ''; @@ -608,18 +609,20 @@ $(document).ready(function() { $('#resultsId1').empty(); $('#resultsId1').addClass("small pb-2") $("#risultatitesto").empty(); - $("#risultatitesto").append("[\n"); + //$("#risultatitesto").append("[\n"); bindingsStream.on('data', (binding) => { //console.log(binding.toString()); // Quick way to print bindings for testing //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 = '' + rowNum++ + ''; for (var i = 0; i < queryFields.length; i++) { resultTablePart4 = resultTablePart4 + '' + binding.get(queryFields[i]).value + ""; }; resultTable = resultTable + resultTablePart4 + ''; - $("#risultatitesto").append(binding.toString() + ",\n"); + //$("#risultatitesto").append(binding.toString() + ",\n"); $("#loader").hide(); - //console.log(binding.get('form').value); + //console.log(binding.get('Verso').value); //console.log(binding.get('form').termType); //console.log(binding.get('pred').value); //console.log(binding.get('obj').value); @@ -627,7 +630,7 @@ $(document).ready(function() { bindingsStream.on('end', () => { resultTable = resultTable + resultTablePart5; $("#resultsId1").append(resultTable); - $("#risultatitesto").append("]"); + //$("#risultatitesto").append("]"); $("#copiaTesto").prop("disabled", false); $('#resultTable').DataTable( { colReorder: true, @@ -893,12 +896,12 @@ $(document).ready(function() { }; $.fn.copy2clipboard = function() { - $('div[id^="msgCopiata"]').remove(); + $('div[id^="msgCopiati"]').remove(); this.select(); $(this).focus(); document.execCommand("copy"); document.getSelection().removeAllRanges(); - $(this).after('
Copiata nella clipboard
'); + $(this).after('
Copiati nella clipboard
'); };