From 092531172f8bdcb0b77528f3b2da3fcc00e68def Mon Sep 17 00:00:00 2001 From: Luca Trupiano Date: Mon, 13 Mar 2023 19:35:47 +0100 Subject: [PATCH] Cambiati comandi e cit. in lista, corretto bug minimap in expand lista --- css/custom1_4.2.css | 54 +++++++++++++++---------- css/custom2_4.2.css | 51 ++++++++++++++---------- js/cesareBrowse.js | 97 ++++++++++++++++++++++++++++++--------------- js/minimap.js | 61 +++++++++++++++------------- 4 files changed, 162 insertions(+), 101 deletions(-) diff --git a/css/custom1_4.2.css b/css/custom1_4.2.css index 6898c1e..3629c1a 100644 --- a/css/custom1_4.2.css +++ b/css/custom1_4.2.css @@ -12,8 +12,7 @@ src: url(../fonts/LDR_Bracciolini.otf); } -html, -body { +html, body { height: 100%; font-family: 'Humanist-777', 'Roboto'; } @@ -94,8 +93,7 @@ body { border-bottom-left-radius: 0 !important; } -.lista-risultati:hover { - font-weight: 900; +.lista-risultati:hover, .citazioneFrase:hover { cursor: pointer; } @@ -211,6 +209,33 @@ Ex browsingldc.css font-family: 'Humanist-777', 'Roboto'; } +.espandiFrase:not(.disabled), .riduciFrase:not(.disabled) { + font-size: 10px; + font-family: 'Humanist-777', 'Roboto'; + border: 2px solid; + cursor: pointer; +} + +.espandiFrase.disabled, .riduciFrase.disabled { + font-size: 10px; + font-family: 'Humanist-777', 'Roboto'; + cursor: default; +} + +.citazioneFrase { + font-style: italic; + font-family: "Bracciolini", "Spectral", -apple-system, BlinkMacSystemFont, “Helvetica Neue”, + “Segoe UI”, “Roboto”, “Oxygen”, “Ubuntu”, “Cantarell”, “Fira Sans”, “Droid Sans”, sans-serif; + line-height: 0.5em; + font-size: 16px; +} + +.btn-outline-secondary.focus, .btn-outline-secondary:focus { + outline: none !important; + box-shadow: none; +} + + /* on mouseOver classes */ .Nik_dropdown { @@ -248,6 +273,7 @@ cite.elencoris { .ttContent { padding: 5px 5px 0px 5px; } + li::marker { font-size: 12px; font-family: 'Humanist-777', 'Roboto'; @@ -295,7 +321,7 @@ li::marker { color: #5f8ec2; border-color: #5f8ec2; } -.navig-canto:hover { +.navig-canto:hover, .citazioneFrase:hover { color: #5f8ec2 !important; } @@ -344,7 +370,7 @@ li::marker { /* ------- #5b352c -------- */ -cite.elencoris { +.citazioneFrase { color: #5b352c; } @@ -390,17 +416,5 @@ cite.elencoris { padding-top: 0px; } -.citazioneFrase { - color: #734450; - font-style: italic; - font-family: Book Antiqua,Palatino,Palatino Linotype,Palatino LT STD,Georgia,serif; - position: relative; - left: 260px; - top: -5px; - line-height: 0.5em; - font-size: small -} -.comandi { - position: relative; - top: -20px; -} + + diff --git a/css/custom2_4.2.css b/css/custom2_4.2.css index df2fdbb..cfa500b 100644 --- a/css/custom2_4.2.css +++ b/css/custom2_4.2.css @@ -12,8 +12,7 @@ src: url(../fonts/LDR_Bracciolini.otf); } -html, -body { +html, body { height: 100%; font-family: 'Humanist-777', 'Roboto'; } @@ -94,8 +93,7 @@ body { border-bottom-left-radius: 0 !important; } -.lista-risultati:hover { - font-weight: 900; +.lista-risultati:hover, .citazioneFrase:hover { cursor: pointer; } @@ -210,6 +208,32 @@ Ex browsingldc.css font-family: 'Humanist-777', 'Roboto'; } +.espandiFrase:not(.disabled), .riduciFrase:not(.disabled) { + font-size: 10px; + font-family: 'Humanist-777', 'Roboto'; + border: 2px solid; + cursor: pointer; +} + +.espandiFrase.disabled, .riduciFrase.disabled { + font-size: 10px; + font-family: 'Humanist-777', 'Roboto'; + cursor: default; +} + +.citazioneFrase { + font-style: italic; + font-family: Book Antiqua,Palatino,Palatino Linotype,Palatino LT STD,Georgia,serif; + line-height: 0.5em; + font-size: 16px; +} + +.btn-outline-secondary.focus, .btn-outline-secondary:focus { + outline: none !important; + box-shadow: none; +} + + /* on mouseOver classes */ .Nik_dropdown { @@ -247,6 +271,7 @@ cite.elencoris { .ttContent { padding: 5px 5px 0px 5px; } + li::marker { font-size: 12px; font-family: 'Humanist-777', 'Roboto'; @@ -304,7 +329,7 @@ li::marker { color: #734450; border-color: #734450; } -.navig-canto:hover { +.navig-canto:hover, .citazioneFrase:hover { color: #734450 !important; } @@ -353,7 +378,7 @@ li::marker { /* ------- #c6b59f -------- */ -cite.elencoris { +.citazioneFrase { color: #c6b59f; } @@ -399,17 +424,3 @@ cite.elencoris { padding-top: 0px; } -.citazioneFrase { - color: #734450; - font-style: italic; - font-family: Book Antiqua,Palatino,Palatino Linotype,Palatino LT STD,Georgia,serif; - position: relative; - left: 260px; - top: -5px; - line-height: 0.5em; - font-size: small -} -.comandi { - position: relative; - top: -20px; -} diff --git a/js/cesareBrowse.js b/js/cesareBrowse.js index 7492ed7..35772d7 100644 --- a/js/cesareBrowse.js +++ b/js/cesareBrowse.js @@ -149,6 +149,9 @@ $(" ."+formaClass).hover(function(idx, element) { */ jQuery(document).delegate(' .espandiFrase, .riduciFrase', 'click', function() { + if ($(this).hasClass("disabled")) { + return; + }; var posizioniEspansione=[] var cid = $(this).attr('id'); var parcid = cid.split('_'); @@ -181,11 +184,17 @@ $(" ."+formaClass).hover(function(idx, element) { } if(cid.includes('_er_')){ - $("#"+cid).css("display", "none"); + ///$("#"+cid).css("display", "none"); + $("#"+cid).removeClass( "btn-outline-primary" ); + $("#"+cid).addClass( "btn-outline-secondary" ); + $("#"+cid).addClass( "disabled" ); } else{ cid = cid.replace("ex","er"); - $("#"+cid).attr('style', 'display: d-flex;'); + ///$("#"+cid).attr('style', 'display: d-flex;'); + $("#"+cid).removeClass( "btn-outline-secondary" ); + $("#"+cid).removeClass( "disabled" ); + $("#"+cid).addClass( "btn-outline-primary" ); } @@ -213,8 +222,8 @@ $(" ."+formaClass).hover(function(idx, element) { //addFormaListenersInRisultato(posizioniEspansione) addFormaListenersInCanto() - //disegno minimap - drawMinimap('#vistaFrasi') + //disegno minimap, onlyContent = true + drawMinimap('#vistaFrasi', true) }) @@ -264,11 +273,12 @@ $(" ."+formaClass).hover(function(idx, element) { numeroCantica=0 canto=0 //var titoloCanto = $('
') - var versiIniziali = $('
') + var versiIniziali = $('
') - var listaVersi = $("
    ") - listaVersi.css("padding-bottom","0px") - listaVersi.css("margin-bottom","0px") + var listaVersi = $('
      ') + ///var listaVersi = $("
        ") + ///listaVersi.css("padding-bottom","0px") + ///listaVersi.css("margin-bottom","0px") listaVersi.attr('id', "Frase"+numeroRisultato); versiIniziali.attr('id', "versiFrase"+numeroRisultato); @@ -296,43 +306,63 @@ $(" ."+formaClass).hover(function(idx, element) { versiIniziali.attr('posVerso', 9999); } - var mhr=$('
        ') + ///var mhr=$('
        ') var comandi = $('
        ') comandi.attr('id',"comandiFrase"+numeroRisultato) + comandi.attr('class', 'comandi col flex-nowrap d-sm-inline justify-content-between pl-1 pb-2 ml-2 mb-2 border-bottom'); - var citazione = $('') - citazione.append("[Canto "+getRoman(canto)+", "+getCantica(numeroCantica)+"]") - citazione.attr('class', ' citazioneFrase my-0 mx-2 navig-canto'); - citazione.attr('name', getCantica(numeroCantica)+"Canto "+canto); - citazione.attr('id', idCitazione+numeroRisultato); - divVerso.append("
        ") - comandi.attr('class', 'comandi'); - mhr.css("margin-top","0px") - mhr.css("padding-top","0px") - citazione.appendTo(elencoRisutati); + var comandiGrp = $('
        ') + comandiGrp.attr('class', 'btn-group flex-nowrap d-sm-inline pr-3 mt-1 mr-3 align-text-bottom'); + comandiGrp.attr('role',"group") + + + ///divVerso.append("
        ") + ///comandi.attr('class', 'comandi'); + ///mhr.css("margin-top","0px") + ///mhr.css("padding-top","0px") + ///citazione.appendTo(elencoRisutati); - var spanBadgeExpand = $(''); - var expandIcon = ''; - spanBadgeExpand.attr('class', 'badge badge-primary badge-pill my-0 mx-2 espandiFrase'); - var spanBadgeReduce = $(''); - var reduceIcon = ''; + var spanBadgeExpand = $('