gestione riferimenti proemio
This commit is contained in:
parent
90f92dec02
commit
86534b5b82
|
@ -194,7 +194,7 @@ $(document).ready(function() {
|
|||
var cid = $(this).attr('id');
|
||||
var parcid = cid.split('_');
|
||||
var posVerso
|
||||
reit = '#versiFrase' + parcid[4]
|
||||
var reit = '#versiFrase' + parcid[4]
|
||||
var expcontextLength = $(reit + " > li").length
|
||||
if (cid.includes('_er_')) {
|
||||
expcontextLength = contextLength
|
||||
|
@ -239,7 +239,7 @@ $(document).ready(function() {
|
|||
//evidenzio risultato
|
||||
|
||||
for (var ris of listarisultati) {
|
||||
idris = '#e' + ris
|
||||
var idris = '#e' + ris
|
||||
$(idris).addClass("font-weight-bold mark ")
|
||||
}
|
||||
|
||||
|
@ -879,6 +879,7 @@ $(document).ready(function() {
|
|||
/*
|
||||
*/
|
||||
var mresult = await getVersiConCitazioni(cantica, canto)
|
||||
|
||||
|
||||
commentsSQL = Object.groupBy(mresult, ({ VersoCitazione }) => VersoCitazione);
|
||||
|
||||
|
@ -897,8 +898,10 @@ $(document).ready(function() {
|
|||
break;
|
||||
if(t=='Proemio'){
|
||||
console.log(idminimap+' '+t)
|
||||
var elcanto=$("#" + idminimap)
|
||||
createProemioSpan(idCommento + t, elcanto, commentsSQL[ke].length)
|
||||
var elcanto=$("#" + 'Titolo'+idminimap)
|
||||
if (canto.startsWith('0'))
|
||||
canto=canto.replace('0','')
|
||||
createProemioSpan(idCommento + t, elcanto, commentsSQL[ke].length, cantica + '_Canto_' + canto+'_Proemio')
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -1728,16 +1731,21 @@ $(document).ready(function() {
|
|||
|
||||
}
|
||||
|
||||
function createProemioSpan(idVerso, elementoverso, numberOfComments) {
|
||||
var spanoccorrenza = $('<button />')
|
||||
spanoccorrenza.attr('id', idVerso)
|
||||
//btn-sm btn-outline-secondary
|
||||
spanoccorrenza.attr('class', 'btn btn-sm btn-outline-primary showcomments bg-light border-0 rounded text-primary px-1 pt-1 pb-0 ml-1');
|
||||
|
||||
spanoccorrenza.append('Proemio')
|
||||
//spanoccorrenza.append(number)
|
||||
function createProemioSpan(idVerso, elementoverso, numberOfComments, spanid) {
|
||||
var spanoccorrenza = $('<span />')
|
||||
spanoccorrenza.attr('id', spanid)
|
||||
var proemiooccorrenza = $('<button />')
|
||||
proemiooccorrenza.attr('id', idVerso)
|
||||
|
||||
spanoccorrenza.prependTo(elementoverso)
|
||||
proemiooccorrenza.attr('class', 'btn btn-sm btn-outline-primary showcomments bg-light border-0 rounded text-primary px-1 pt-1 pb-0 ml-1');
|
||||
|
||||
var commentIcon = '<ion-icon name="document-attach"></ion-icon>';
|
||||
|
||||
proemiooccorrenza.append(commentIcon)
|
||||
|
||||
proemiooccorrenza.appendTo(spanoccorrenza)
|
||||
|
||||
spanoccorrenza.appendTo(elementoverso)
|
||||
}
|
||||
|
||||
function createCommentSpan(idVerso, elementoverso, numberOfComments) {
|
||||
|
@ -1870,7 +1878,7 @@ $(document).ready(function() {
|
|||
var divDialoghi = $('<div />')
|
||||
var divMetafore = $('<div />')
|
||||
|
||||
//var titoloFrasi = $('<h4 class="titolo-canto pb-2" />')
|
||||
|
||||
var titoloDialoghi = $('<h4 class="titolo-canto pb-2" />')
|
||||
var titoloMetafore = $('<h4 class="titolo-canto pb-2" />')
|
||||
|
||||
|
@ -1908,7 +1916,12 @@ $(document).ready(function() {
|
|||
|
||||
var divcanto = $('<div />')
|
||||
var titolocanto = $('<h4 class="titolo-canto pb-2" />')
|
||||
titolocanto.append(cantica + ", " + cantoRomano)
|
||||
//titolocanto.append(cantica + ", " + cantoRomano)
|
||||
var spantitolocanto=$('<span />')
|
||||
spantitolocanto.attr('id', 'Titolo'+(cantica + canto).replace(" ", "_"))
|
||||
spantitolocanto.append(cantica + ", " + cantoRomano)
|
||||
titolocanto.append(spantitolocanto)
|
||||
|
||||
divcanto.attr('class', 'canto pt-3')
|
||||
divcanto.css("display", "none")
|
||||
|
||||
|
|
|
@ -448,11 +448,13 @@ export async function queryRiferimenti(filtro, cid) {
|
|||
spanbadge.appendTo($nctags.filter('[name="' + cantica + 'Canto ' + canto + '"]'))
|
||||
for (const tmpvi of tmpv) {
|
||||
let myveid = '#' + cantica + '_Canto_' + canto + '_' + tmpvi.Verso.split('-')[0]
|
||||
//console.log(myveid)
|
||||
|
||||
listaidversi.push(myveid)
|
||||
listaidcommenti.push(tmpvi.IdRiferimento)
|
||||
if (cid.includes(cantica) && numcid == canto)
|
||||
if (cid.includes(cantica) && numcid == canto){
|
||||
$(myveid).addClass("mark ")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue