fissata funzione chiusura, cambiato bg note

This commit is contained in:
Luca Trupiano 2023-12-20 12:48:06 +01:00
parent ea17795bfd
commit 59e5da2d38
2 changed files with 7 additions and 3 deletions

View File

@ -835,13 +835,13 @@ function resetFrasi(){
}) })
function createNoteGroup(cantica, canto, versi, id) { function createNoteGroup(cantica, canto, versi, id) {
var noteGroupCard = $('<div class="card card-body well well-sm mx-1 my-2 p-0" id="noteGroupCard' + id + '">'); var noteGroupCard = $('<div class="card card-body well well-sm mx-1 my-2 p-0" id="noteGroupCard' + id + '" style="background-color: #cfdeec">');
noteGroupCard.append('<h6 class="card-title m-2 text-warning">' + cantica + ", Canto " + canto + versi + "</h6>"); noteGroupCard.append('<h6 class="card-title m-2 text-warning">' + cantica + ", Canto " + canto + versi + "</h6>");
return noteGroupCard; return noteGroupCard;
} }
function createNoteEntry(comments,id,pos) { function createNoteEntry(comments,id,pos) {
var noteCard = $('<div class="card card-body well well-sm mx-1 mb-1 mt-0 p-0 border-lida08" id="noteCard' + id + '">'); var noteCard = $('<div class="card card-body well well-sm mx-1 mb-1 mt-0 p-0 border-lida08" id="noteCard' + id + '_' + pos + '">');
//var noteCard = $('<div class="card card-body well well-sm m-1 mt-2 p-0" id="noteCard' + id + '">'); //var noteCard = $('<div class="card card-body well well-sm m-1 mt-2 p-0" id="noteCard' + id + '">');
//var collapseCardBody = $('<div class="card-body px-0 py-2 mx-1 mb-1 mt-0 border-top rounded" >'); //var collapseCardBody = $('<div class="card-body px-0 py-2 mx-1 mb-1 mt-0 border-top rounded" >');
var collapseCardBody = $('<div class="card-body px-0 py-1 mx-3 my-0 border-top rounded" >'); var collapseCardBody = $('<div class="card-body px-0 py-1 mx-3 my-0 border-top rounded" >');

View File

@ -431,7 +431,11 @@ $(document).ready(function() {
// Evento: click sull'icona rimuovi nota // Evento: click sull'icona rimuovi nota
$('#displaynote').on('click', '.closeNote', function() { $('#displaynote').on('click', '.closeNote', function() {
var noteListItemId = $(this).closest('.card'); var noteListItemId = $(this).closest('.card');
$(noteListItemId).remove(); if ($(noteListItemId).siblings(".card-body").length == 0) {
$(noteListItemId).parent().remove()
} else {
$(noteListItemId).remove();
}
if ($('#displaynote .card').length == 0) { if ($('#displaynote .card').length == 0) {
$('#displaynote').append($(emptyNoteList)) $('#displaynote').append($(emptyNoteList))
}; };