Allineati lavori, nuova vista (solo html) in index_4.4_test.html

This commit is contained in:
Luca Trupiano 2023-11-22 18:22:10 +01:00
parent 26c247f2ce
commit 4725692e03
5 changed files with 2106 additions and 13 deletions

42
css/collapsemod.css Normal file
View File

@ -0,0 +1,42 @@
@charset "UTF-8";
/* custom.css */
.module {
position: relative;
}
.module .collapse, .module .collapsing {
height: 5rem;
}
.module .collapse {
display: block; /* By default the bootstrap collapse has a display: none*/
overflow: hidden;
}
.module .collapse.show {
height: auto;
}
.read-more {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 1;
/* 60% is where it should start the transition from transparent to white, increase it if you want to show more of your text*/
background-image: linear-gradient(to bottom, transparent 60%, white);
/* The opacity and transition is just to smooth out the effect */
opacity: 1;
transition: all .3s linear;
}
.read-more:not(.collapsed) {
opacity: 0;
/* you want to make the clickable area disapear once it is open, change the visibility to hidden:*/
/* visibility: hidden; */
}

View File

@ -47,7 +47,7 @@
</head>
<body class="body-vis">
<script type="text/javascript">
var currStyle = "style1";
var currStyle = "style2";
var newStyle = Cookies.get('LiDa_style');
if (typeof newStyle !== "undefined") {
switch (newStyle) {
@ -481,11 +481,11 @@
<div class="tab-content visInfo w-100 d-flex bg-lida-vis" id="vis-TabContent" style="flex-direction: column;">
<div class="tab-pane fade show active p-0 bg-lida-vis" id="vis0" role="tabpanel" aria-labelledby="vis0-tab">
<div id='displaynote'><span class="p-3">Visualizza commenti</span>
<div id='displaynote' class="p-3 pt-0"><span>Visualizza commenti</span>
</div>
</div>
<div class="tab-pane fade p-0 bg-lida-vis" id="vis1" role="tabpanel" aria-labelledby="vis1-tab">
<div id='displayinfo'><span class="p-3">Visualizza struttura periodo</span>
<div id='displayinfo' class="p-3"><span>Visualizza struttura periodo</span>
</div>
</div>
</div>

2023
index_4.4_test.html Normal file

File diff suppressed because it is too large Load Diff

View File

@ -749,7 +749,22 @@ function resetFrasi(){
console.log("Array dopo")
console.log(commentsArray)
}
/* Luca: removeHtmlTags2 e' la versione compatta di removeHtmlTags*/
function removeHtmlTags2(value){
var text = ""
for (const key in value) {
text = `${value[key]}`
if (text != null){
text = text.replace(/<(.|\n)*?>/g, '');
text = text.replace("&laquo;","");
text = text.replace("&raquo;","");
text = text.replace(/[\r\n]+/gm, ' ');
value[`${key}`] = text;
}
}
}
function removeHtmlTags(value){
var text = value["annotazione"]
if (text != null){
@ -997,10 +1012,11 @@ function resetFrasi(){
spanDiv.append('<label for="comment"><b>Nota Fonte:</b></label>');
spanDiv.append('<textarea readonly class="form-control" rows="2" id="NotaFonteCitazione"+comments.verso name="text">'+comments.NotaFonteCitazione+'</textarea>');
}
spanComment.append('<hr class="pt-0 center text-dark bg-dark" style="width: 35%;">');
}
}
spanComment.appendTo(commentArea);
spanComment.appendTo(commentArea);
commentArea.append('<hr class="pt-0 center text-dark bg-dark" style="width: 35%;">');
$('#tab-list #vis0-tab').tab('show')
})
function hasComments(cid){
@ -1015,6 +1031,7 @@ function resetFrasi(){
}
return false;
}
function numberOfComments(cid){
var id = cid.substr(9);
@ -1232,10 +1249,11 @@ function resetFrasi(){
var verso = parseInt(formaItem[3]) - 1;
var idCommento = "Commento_"+idcantica+"_"+canto+"_"+verso;
var commNumber = numberOfComments(idCommento);
//if (hasComments(idCommento)){
if (numberOfComments(idCommento)>0){
createCommentSpan(idCommento, elverso, numberOfComments)
console.log("Numero commenti: "+numberOfComments(idCommento))
if (commNumber>0){
createCommentSpan(idCommento, elverso, commNumber)
console.log("Numero commenti: "+commNumber)
}
if(currSentenceId!=null && currSentenceId != sentenceid){
@ -1303,15 +1321,18 @@ function resetFrasi(){
var spanoccorrenza = $('<button />')
spanoccorrenza.attr('id', idVerso)
//btn-sm btn-outline-secondary
spanoccorrenza.attr('class', 'btn btn-sm btn-danger showcomments px-1 pt-1 pb-0 ml-1');
var commentIcon = '<ion-icon name="information"></ion-icon>';
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');
if (numberOfComments > 1){
var commentIcon = '<ion-icon name="pricetags"></ion-icon>';
} else {
var commentIcon = '<ion-icon name="pricetag"></ion-icon>';
}
//var commentIcon = '<ion-icon name="information"></ion-icon>';
//var number = " "+numberOfComments.toString();
spanoccorrenza.append(commentIcon)
//spanoccorrenza.append(number)
spanoccorrenza.appendTo(elementoverso)
}
function createSpanPeriodiTag(separator, catgramm, pos, sentenceid, elementoverso, pnum) {

View File

@ -427,6 +427,13 @@ $(document).ready(function() {
resetAdvGui();
refreshClaList();
});
// Evento: click sull'icona rimuovi nota
$('#displaynote').on('click', '.closeNote', function() {
var claListItemId = $(this).closest('.card');
$(claListItemId).remove();
});
// Variabili JSON per i filtri
var verboJson = {