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