diff --git a/index_4.7.html b/index_4.7.html index e6de5ec..0676f9a 100644 --- a/index_4.7.html +++ b/index_4.7.html @@ -1029,7 +1029,8 @@ @@ -1056,16 +1057,16 @@ + + + + + +
'; + + '

Linking Dante (LiDa)

' + + '

Linking Dante (LiDa) è un progetto federatore sviluppato dall’ISTI CNR con l’obiettivo di digitalizzare le ' + + 'opere dantesche e la conoscenza a esse relativa, collegando – e in alcuni casi implementando – precedenti progetti per mettere a disposizione dell’utente una piattaforma integrata, dove sono ' + + 'possibili diverse tipologie di navigazione ed interrogazione.
La biblioteca digitale di LiDa è basata sulle tecnologie e sui linguaggi del Semantic Web e rispetta i principi FAIR (Findable, ' + + 'Accessible, Interoperable, Reusable): il testo di Dante si trova al centro di una rete che lo connette a diverse risorse che permettono di approfondire le sue caratteristiche linguistiche, ' + + 'retoriche e semantiche; per raggiungere questo scopo, LiDa ha tradotto la conoscenza relativa al testo dantesco che si trova disseminata in diversi strumenti digitali e cartacei in un grafo ' + + 'strutturato secondo logiche calcolabili ed espresso in linguaggio formale. In particolare, LiDa integra la conoscenza raccolta dai progetti:

 

' + + '

Copyright © 2024 ISTI-CNR

'; $(document).ready(function() { window.addEventListener("resize", function() { - clearTimeout(this.id); - this.id = setTimeout(doneResizing, 300); + clearTimeout(this.id); + this.id = setTimeout(doneResizing, 300); }, true); - - function doneResizing(){ + + function doneResizing() { $("#displayminimap").empty();; $('#displayminimap').css('height', 'auto'); drawMinimap(currentMinimap, false, latestOffset); @@ -59,26 +59,26 @@ $(document).ready(function() { trackScrollCanto() } }); - + // Evento: click sul cambio stile $('.stileLink').on('click', function() { var newStyle = $(this)[0].id; setStyle(newStyle); - }); + }); // Evento: click sulla voce about del menu info $("#visAbout").PopupLayer({ - to: 'bottom', - contentToggle: false, - screenRatio: 0.6, - blur: true, + to: 'bottom', + contentToggle: false, + screenRatio: 0.6, + blur: true, content: textAbout, - color: "#212529", - backgroundColor: "rgb(246, 247, 245)", + color: "#212529", + backgroundColor: "rgb(246, 247, 245)", }); - - + + $("#incrFontSize").click(function() { newFontSize = incSize($('#displaycanto').css("font-size"), 10, 18, 58) newH4FontSize = incSize($('#displaycanto h4').css("font-size"), 12, 24, 72) @@ -93,94 +93,95 @@ $(document).ready(function() { // Funzioni di gestione del comportamento dei bottoni collapse - $('#collapseLogic').on('hidden.bs.collapse', function (e) { + $('#collapseLogic').on('hidden.bs.collapse', function(e) { if (e.target.id == "collapseLogic") { $("#showLogic").html('Mostra'); $("#collapseAdvanced").collapse('hide'); }; }) - - $('#collapseLogic').on('shown.bs.collapse', function () { - $("#showLogic").html('Nascondi'); - $("#collapseAdvanced").collapse('show'); - }) -/* - $('#collapseOptions').on('hidden.bs.collapse', function (e) { - if (e.target.id == "collapseOptions") { - $("#showOptions").html('Opzioni'); - }; - }) - - $('#collapseOptions').on('shown.bs.collapse', function () { - $("#showOptions").html('Opzioni'); - })*/ - $('.collapse').on('hide.bs.collapse', function (e) { - if (e.target.id.substr(0,11) == "collapseCla") { + $('#collapseLogic').on('shown.bs.collapse', function() { + $("#showLogic").html('Nascondi'); + $("#collapseAdvanced").collapse('show'); + }) + /* + $('#collapseOptions').on('hidden.bs.collapse', function (e) { + if (e.target.id == "collapseOptions") { + $("#showOptions").html('Opzioni'); + }; + }) + + $('#collapseOptions').on('shown.bs.collapse', function () { + $("#showOptions").html('Opzioni'); + })*/ + + // click su icona pencil per chiudere finestra + $('.collapse').on('hide.bs.collapse', function(e) { + if (e.target.id.substr(0, 11) == "collapseCla") { var claIdNum = e.target.id.substr(11); $("#claCollapse" + claIdNum)[0].removeAttribute("style"); - $("#claCollapse" + claIdNum).removeClass( "border-bottom-0" ); - $("#claCollapse" + claIdNum).addClass( "border" ); + $("#claCollapse" + claIdNum).removeClass("border-bottom-0"); + $("#claCollapse" + claIdNum).addClass("border"); $("#claCollapse" + claIdNum).blur(); e.stopPropagation(); }; }) - - $('.collapse').on('show.bs.collapse', function (e) { - if (e.target.id.substr(0,11) == "collapseCla") { + // click su icona pencil per aprire finestra + $('.collapse').on('show.bs.collapse', function(e) { + if (e.target.id.substr(0, 11) == "collapseCla") { var claIdNum = e.target.id.substr(11); $("#claCollapse" + claIdNum)[0].setAttribute("style", "border-bottom-left-radius: 0;border-bottom-right-radius: 0;"); - $("#claCollapse" + claIdNum).removeClass( "border" ); - $("#claCollapse" + claIdNum).addClass( "border-bottom-0" ); + $("#claCollapse" + claIdNum).removeClass("border"); + $("#claCollapse" + claIdNum).addClass("border-bottom-0"); $("#claCollapse" + claIdNum).blur(); e.stopPropagation(); }; }) - + // Evento: click sullo switch di ricerca avanzata $('#searchAdvanced').on('click', function() { - $('#searchAdvanced').addClass('disabled'); - $('#searchSimple').removeClass('disabled'); - $('#checkmarkAdvanced').attr('style','opacity: 1'); - $('#checkmarkSimple').attr('style','opacity: 0'); - queryJson.QueryAvanzata = "1"; - $("#collapseOptions").collapse('hide'); - $("#simpleSearchDiv").fadeOut(300, function(){ - $("#rigaRicercaSemplice").removeClass( "bg-lida08" ) - $("#rigaRicercaSemplice").addClass( "bg-lida10" ) - $("#simpleSearchDiv").removeClass( "d-flex" ) - $("#advancedSearchDiv").addClass( "d-flex" ) - $("#advancedSearchDiv").fadeIn(400, function(){ - $("#collapseAdvanced").collapse('show'); - $("#collapseLogic").collapse('show'); - }); + $('#searchAdvanced').addClass('disabled'); + $('#searchSimple').removeClass('disabled'); + $('#checkmarkAdvanced').attr('style', 'opacity: 1'); + $('#checkmarkSimple').attr('style', 'opacity: 0'); + queryJson.QueryAvanzata = "1"; + $("#collapseOptions").collapse('hide'); + $("#simpleSearchDiv").fadeOut(300, function() { + $("#rigaRicercaSemplice").removeClass("bg-lida08") + $("#rigaRicercaSemplice").addClass("bg-lida10") + $("#simpleSearchDiv").removeClass("d-flex") + $("#advancedSearchDiv").addClass("d-flex") + $("#advancedSearchDiv").fadeIn(400, function() { + $("#collapseAdvanced").collapse('show'); + $("#collapseLogic").collapse('show'); }); }); - + }); + $('#searchSimple').on('click', function() { $('#searchSimple').addClass('disabled'); $('#searchAdvanced').removeClass('disabled'); - $('#checkmarkSimple').attr('style','opacity: 1'); - $('#checkmarkAdvanced').attr('style','opacity: 0'); - - queryJson.QueryAvanzata = "0"; - $("#collapseAdvanced").collapse('hide'); - $("#advancedSearchDiv").fadeOut(300, function(){ - $("#rigaRicercaSemplice").removeClass( "bg-lida10" ) - $("#rigaRicercaSemplice").addClass( "bg-lida08" ) - $("#advancedSearchDiv").removeClass( "d-flex" ) - $("#simpleSearchDiv").addClass( "d-flex" ) - $("#simpleSearchDiv").fadeIn(400); - }); - + $('#checkmarkSimple').attr('style', 'opacity: 1'); + $('#checkmarkAdvanced').attr('style', 'opacity: 0'); + + queryJson.QueryAvanzata = "0"; + $("#collapseAdvanced").collapse('hide'); + $("#advancedSearchDiv").fadeOut(300, function() { + $("#rigaRicercaSemplice").removeClass("bg-lida10") + $("#rigaRicercaSemplice").addClass("bg-lida08") + $("#advancedSearchDiv").removeClass("d-flex") + $("#simpleSearchDiv").addClass("d-flex") + $("#simpleSearchDiv").fadeIn(400); + }); + + + }); - }); - // Inizializza sortable - $( "#sortable0" ).sortable({ + $("#sortable0").sortable({ items: "> li", handle: ".handle", - opacity: 0.6, + opacity: 0.6, cursor: 'move' }); @@ -188,13 +189,13 @@ $(document).ready(function() { $("#selectable-xX0").selectable({ filter: ".sel-canto", selected: function(event, ui) { - window.context0[ui.selected.id.substring(0,1)][ui.selected.id.substring(2)] = 1; - var tmpFocusBtn = "#plusBtn" + ui.selected.id.substring(0,1) + "-xX" + tabID; - $(tmpFocusBtn).focus(); + window.context0[ui.selected.id.substring(0, 1)][ui.selected.id.substring(2)] = 1; + var tmpFocusBtn = "#plusBtn" + ui.selected.id.substring(0, 1) + "-xX" + tabID; + $(tmpFocusBtn).focus(); } }); - // Inizializza resizable + // Inizializza resizable $(".menuNavigazione").resizable({ handles: "e", minWidth: 100, @@ -206,7 +207,7 @@ $(document).ready(function() { setWidthInPercent(ui.element); } }); - + $(".menuRicerca").resizable({ handles: "w", minWidth: 350, @@ -218,7 +219,7 @@ $(document).ready(function() { setWidthInPercent(ui.element); } }); - + $(".visCanto").resizable({ handles: "s", minHeight: 60, @@ -227,12 +228,12 @@ $(document).ready(function() { resize: function(event, ui) { //console.log($("#colVisualizza").css("height")); $("#displaycanto").width(" min-content"); - var infoHeightToSet = $("body")[0].clientHeight*cssTableMainHeight - $(visCantoClass)[0].clientHeight-2-63-2-46; - $("#displayinfo").css("maxHeight", infoHeightToSet+"px"); - $("#displayinfo").css("height", infoHeightToSet+"px"); - $("#displaynote").css("maxHeight", infoHeightToSet+"px"); - $("#displaynote").css("height", infoHeightToSet+"px"); - $(".visInfo").css("height", (infoHeightToSet+4)+"px"); + var infoHeightToSet = $("body")[0].clientHeight * cssTableMainHeight - $(visCantoClass)[0].clientHeight - 2 - 63 - 2 - 46; + $("#displayinfo").css("maxHeight", infoHeightToSet + "px"); + $("#displayinfo").css("height", infoHeightToSet + "px"); + $("#displaynote").css("maxHeight", infoHeightToSet + "px"); + $("#displaynote").css("height", infoHeightToSet + "px"); + $(".visInfo").css("height", (infoHeightToSet + 4) + "px"); //console.log($("#colVisualizza").css("height")); getDimensionsDiv(true); }, @@ -242,7 +243,7 @@ $(document).ready(function() { }); // Funzioni di gestione dei bottoni di paginazione - $('#collapseZero').on('shown.bs.collapse', function () { + $('#collapseZero').on('shown.bs.collapse', function() { managePage(); }); @@ -252,7 +253,7 @@ $(document).ready(function() { }); $('#pagPrecedente').on('click', function() { - if (!$(this).hasClass("disabled")){ + if (!$(this).hasClass("disabled")) { currPage--; $('#paginaLista option[value=' + currPage + ']').prop('selected', true); managePage(); @@ -260,93 +261,111 @@ $(document).ready(function() { }); $('#pagSuccessiva').on('click', function() { - if (!$(this).hasClass("disabled")){ + if (!$(this).hasClass("disabled")) { currPage++; $('#paginaLista option[value=' + currPage + ']').prop('selected', true); managePage(); }; }); - + $("#filtraTipoRiferimento").on('change', function() { - switch(this.value){ - case "citazione": - $('#filtraCitazione').attr('style', "display: d-flex;"); - break; - default: - $('#filtraCitazione').attr('style', "display: none;"); - break; + switch (this.value) { + case "citazione": + $('#filtraCitazione').attr('style', "display: d-flex;"); + break; + default: + $('#filtraCitazione').attr('style', "display: none;"); + break; } }); // Evento: modifica dell'unita di ricerca' $("#unitaRicerca").on('change', function() { queryJson.unitaRicerca = $("#unitaRicerca")[0].options[$("#unitaRicerca")[0].selectedIndex].value; - switch(this.value){ + switch (this.value) { case "forma": case "lemma": - $('#cercaFrasiPeriodiDiscorsi').attr('style', "display: none;"); - $('#cercaFormaLemma').attr('style', "display: d-flex;"); - $('#cercaRiferimenti').attr('style', "display: none;"); - $('#btnMorfoSintattiche').attr('style', "display: d-flex;"); - $('#spanAggiungiClausole').attr('style', "display: d-flex;"); - $('#collapseLogic').attr('style', "display: d-flex;;"); - break; + $('#cercaFrasiPeriodiDiscorsi').attr('style', "display: none;"); + $('#cercaFormaLemma').attr('style', "display: d-flex;"); + $('#cercaRiferimenti').attr('style', "display: none;"); + $('#btnMorfoSintattiche').attr('style', "display: d-flex;"); + $('#spanAggiungiClausole').attr('style', "display: d-flex;"); + $('#collapseLogic').attr('style', "display: d-flex;;"); + break; case "frase": case "periodo": case "discorso": - $('#cercaFrasiPeriodiDiscorsi').attr('style', "display: d-flex;"); - $('#cercaFormaLemma').attr('style', "display: none;"); - $('#cercaRiferimenti').attr('style', "display: none;"); - $('#btnMorfoSintattiche').attr('style', "display: d-flex;"); - $('#spanAggiungiClausole').attr('style', "display: d-flex;"); - $('#collapseLogic').attr('style', "display: d-flex;;"); - break; + $('#cercaFrasiPeriodiDiscorsi').attr('style', "display: d-flex;"); + $('#cercaFormaLemma').attr('style', "display: none;"); + $('#cercaRiferimenti').attr('style', "display: none;"); + $('#btnMorfoSintattiche').attr('style', "display: d-flex;"); + $('#spanAggiungiClausole').attr('style', "display: d-flex;"); + $('#collapseLogic').attr('style', "display: d-flex;;"); + break; case "riferimenti": - $('#cercaRiferimenti').attr('style', "display: d-flex;"); - $('#cercaFormaLemma').attr('style', "display: none;"); - $('#cercaFrasiPeriodiDiscorsi').attr('style', "display: none;"); - $('#btnMorfoSintattiche').attr('style', "display: none;"); - $('#spanAggiungiClausole').attr('style', "display: none;"); - $('#collapseLogic').attr('style', "display: none;"); - $('#collapseLogic').empty() - break; + $('#cercaRiferimenti').attr('style', "display: d-flex;"); + $('#cercaFormaLemma').attr('style', "display: none;"); + $('#cercaFrasiPeriodiDiscorsi').attr('style', "display: none;"); + $('#btnMorfoSintattiche').attr('style', "display: none;"); + $('#spanAggiungiClausole').attr('style', "display: none;"); + $('#collapseLogic').attr('style', "display: none;"); + $('#collapseLogic').empty() + break; } }); - + // Evento: modifica di un campo clausole $("form #lemma_forma,#queryText,#opzioni_testo").on('change', function() { - if ($(this)[0].id == "queryText"){ + if ($(this)[0].id == "queryText") { var orgSelection = "forma" // $('#lemma_forma option:selected')[0].value var qText = $(this)[0].value; - if (qText !== null && qText !== '') {qText = ' "' + qText + '"';} - setLemmaForma(qText,orgSelection); + if (qText !== null && qText !== '') { qText = ' "' + qText + '"'; } + setLemmaForma(qText, orgSelection); }; refreshClaList(); }); + // Variazione dei campi del form $('#cla-TabContent').on('change', '.monMe', function() { - refreshClaList(); + // Nik + var fieldId = $(this)[0].id; + var claId; + if (fieldId.startsWith("query")) { + $("form #queryText").val($("#" + fieldId).val()); + claid = fieldId.substring(9); + } else { + if (fieldId.startsWith("lemma")) { + $("form #lemma_forma").val($("#" + fieldId).val()); + claid = fieldId.substring(11); + } else { + if (fieldId.startsWith("opzioni")) { + $("form #opzioni_testo").val($("#" + fieldId).val()); + claid = fieldId.substring(13); + } + } + } + refreshClaList(claid); }); // Evento: click sull'icona rimuovi clausola - $('#cla-TabContent').on('click', '.removeCla', function() { + $('#cla-TabContent').on('click', '.removeCla', function() { var claListItemId = $(this).closest('li').attr('id'); var claIdNum = claListItemId.substr(6); claListLen--; - var thisIs = $("#" + claListItemId); - $("#" + claListItemId).fadeOut(300, function(){ - thisIs.remove(); - delete queryJson["Clausola" + claIdNum]; + var thisIs = $("#" + claListItemId); + $("#" + claListItemId).fadeOut(300, function() { + thisIs.remove(); + delete queryJson["Clausola" + claIdNum]; delete window["context" + claIdNum]; - refreshClaList(); - refreshSortables(); - }); + refreshClaList(); + refreshSortables(); + }); }); // Evento: click sull'icona rimuovi condizione $('#sortable0').on('click', '.removeCond', function() { var thisIs = $(this).closest('ul').parent(); - $(this).closest('ul').fadeOut(300, function(){ - thisIs.remove(); + $(this).closest('ul').fadeOut(300, function() { + thisIs.remove(); condListLen--; if (claListLen == 0 && condListLen == 0) { $('#sortable0').html(emptyClaList); @@ -354,80 +373,80 @@ $(document).ready(function() { refreshClaList(); refreshSortables(); refreshConnectWith(); - }); + }); }); - + // Evento: click sulla lista di clausole nel dropbox "Aggiungi clausola di tipo:" o "aggiungi condizione logica:" $('.addCCbtn').on('click', function() { - var addCC = $(this).attr('id'); + var addCC = $(this).attr('id'); $('#collapseLogic').show(); switch (addCC) { - case "btnAddCla1": - tabID++; - addGramCla("#sortable0",1,tabID,1); - break; - case "btnAddCla2": - tabID++; - addSyntCla("#sortable0",1,tabID,1); - break; - case "btnAddCla3": - tabID++; - addMetaCla("#sortable0",0,tabID,0); - break; - case "btnAddCond": - addLogicCond("#sortable0","OR"); - break; - default: + case "btnAddCla1": + tabID++; + addGramCla("#sortable0", 1, tabID, 1); + break; + case "btnAddCla2": + tabID++; + addSyntCla("#sortable0", 1, tabID, 1); + break; + case "btnAddCla3": + tabID++; + addMetaCla("#sortable0", 0, tabID, 0); + break; + case "btnAddCond": + addLogicCond("#sortable0", "OR"); + break; + default: $('#collapseLogic').hide(); break; - }; - refreshClaList(); - refreshSortables(); + }; + refreshClaList(); + refreshSortables(); }); // Evento: clausola spostata nella lista - $('#sortable0').sortable({ - opacity: 0.6, - cursor: 'move', - update: function() { + $('#sortable0').sortable({ + opacity: 0.6, + cursor: 'move', + update: function() { refreshClaList(); refreshSortables(); - } + } }); - + // Evento: cambiato il tipo della condizione logica $('#cla-TabContent').on('change', '.condType', function() { var condtype = $(this).val(); var condId = $(this).attr('id').substring(12); if (condtype == "AND") { - $("#cond" + condId).removeClass( "condLI-OR bg-lida13" ) - $("#cond" + condId).addClass( "condLI-AND bg-lida12" ) + $("#cond" + condId).removeClass("condLI-OR bg-lida13") + $("#cond" + condId).addClass("condLI-AND bg-lida12") //$(this).removeClass( "bg-lida13" ) //$(this).addClass( "bg-lida12" ) } else { - $("#cond" + condId).removeClass( "condLI-AND bg-lida12" ) - $("#cond" + condId).addClass( "condLI-OR bg-lida13" ) + $("#cond" + condId).removeClass("condLI-AND bg-lida12") + $("#cond" + condId).addClass("condLI-OR bg-lida13") //$(this).removeClass( "bg-lida12" ) //$(this).addClass( "bg-lida13" ) }; refreshClaList(); }); - + // Evento: click sul bottone di edit delle clausole $('#cla-TabContent').on('click', '.claAct', function() { var claListItemId = $(this).closest('li').attr('id'); var tabPanelId = "#" + claListItemId.substring(3); - if ($(this).prop('checked')) { - $(tabPanelId).attr("data-claActive", 1); - $(this).closest('li').find('.clatext').fadeTo( "slow", 1 ); - } else { + if ($(this).prop('checked')) { + $(tabPanelId).attr("data-claActive", 1); + $(this).closest('li').find('.clatext').fadeTo("slow", 1); + } else { $(tabPanelId).attr("data-claActive", 0); - $(this).closest('li').find('.clatext').fadeTo( "slow", 0.6 ); + $(this).closest('li').find('.clatext').fadeTo("slow", 0.6); } refreshSortables(); - }); - + }); + // Evento: click sull'icona di refresh dei radio button $('#cla-TabContent').on('click', '.radioReset', function() { fSet = $(this).parent().siblings('fieldset'); @@ -435,15 +454,15 @@ $(document).ready(function() { radioChecked = fSet.find(":checked")[0]; radioChecked.checked = false; }; - refreshClaList(); - }); + refreshClaList(); + }); // Evento: click sull'icona di trash del contesto $('#rigaRicerca').on('click', '.trashClaCont', function() { var claIdNum = $(this)[0].id.substring(15); resetContext(claIdNum); refreshClaList(); - }); + }); // Evento: click sull'icona di add del contesto $('#rigaRicerca').on('click', '.addClaCont', function() { @@ -451,8 +470,8 @@ $(document).ready(function() { var selectedCanti = $(this).closest('.card').find('.ui-selected'); if (selectedCanti.length == 0) { $(this).closest('.card').find('.ui-selectee').each(function() { - $(this).addClass( "ui-selected" ); - window["context" + claIdNum][$(this).attr("id").substring(0,1)][$(this).attr("id").substring(2)] = 1; + $(this).addClass("ui-selected"); + window["context" + claIdNum][$(this).attr("id").substring(0, 1)][$(this).attr("id").substring(2)] = 1; }); }; parseContext(claIdNum); @@ -461,30 +480,30 @@ $(document).ready(function() { $(this).closest('.card').find('div .sel-canti-intro').text("Selezionati tutti i canti."); }; refreshClaList(); - }); - + }); + // Evento: click sull'icona di save local $('#advancedSearchDiv').on('click', 'ion-icon[name="save-outline"]', function() { var fileA = document.createElement("a"); - fileA.href = window.URL.createObjectURL(new Blob([JSON.stringify(queryJson)], {type: "text/plain;charset=utf-8"})); + fileA.href = window.URL.createObjectURL(new Blob([JSON.stringify(queryJson)], { type: "text/plain;charset=utf-8" })); fileA.download = "LiDaQuery.txt"; fileA.click(); fileA.remove(); - }); - + }); + // Evento: click sull'icona di load local $('#advancedSearchDiv').on('click', 'ion-icon[name="folder-open-outline"]', function() { $('#apriFile').click(); - }); - + }); + $("#apriFile").on('change', function() { var file = $(this).prop('files')[0]; var reader = new FileReader(); - reader.onload = function(data){ + reader.onload = function(data) { queryJson = JSON.parse(data.target.result) - makeUpGui(queryJson); - }; - if (file !== '') { + makeUpGui(queryJson); + }; + if (file !== '') { reader.readAsText(file); $("#apriFile")[0].value = ''; }; @@ -493,14 +512,14 @@ $(document).ready(function() { // Evento: SCELTA CATEGORIA GRAMMATICALE $('#cla-TabContent').on('change', 'select.catgram', function(e) { e.preventDefault(); - var tabPaneId = ($(this).closest('.tab-pane').attr("id")); + var tabPaneId = ($(this).closest('.tab-pane').attr("id")); var selectedValue = $(this).val(); - addCatgramSubcla(tabPaneId,selectedValue); - refreshClaList(); + addCatgramSubcla(tabPaneId, selectedValue); + refreshClaList(); }); // Evento: Submit form - $("form").submit(function(e){ + $("form").submit(function(e) { e.preventDefault(); }); @@ -510,7 +529,7 @@ $(document).ready(function() { resetSimpleGui(); refreshClaList(); }); - + // Evento: click sul bottone di reset azanzata $('#cleanresult2').on('click', function() { resetResult(); @@ -519,9 +538,9 @@ $(document).ready(function() { }); // Evento: click sull'icona rimuovi nota - $('#displaynote').on('click', '.closeNote', function() { + $('#displaynote').on('click', '.closeNote', function() { var noteListItemId = $(this).closest('.card'); - if (($(noteListItemId).siblings(".card-body").length == 0) && !($(noteListItemId).hasClass("noteCardGroup")) ) { + if (($(noteListItemId).siblings(".card-body").length == 0) && !($(noteListItemId).hasClass("noteCardGroup"))) { $(noteListItemId).parent().remove() } else { $(noteListItemId).remove(); @@ -532,14 +551,14 @@ $(document).ready(function() { }); // Evento: click sull'icona rimuovi periodo - $('#displayinfo').on('click', '.closeStruct', function() { + $('#displayinfo').on('click', '.closeStruct', function() { //$('#displayinfo').empty(); //$('#displayinfo').append($(emptyInfo)) $('#infoCard0').attr('style', "display: flex;"); $('#structGroupCard0').attr('style', "display: none;"); resetGraphStruct() }); - + // Variabili JSON per i filtri var verboJson = { "filtriverbo": { @@ -550,16 +569,16 @@ $(document).ready(function() { "Pers": ["Impersonale"], "Rifl": ["Riflessivo"], "Coniugazione": ["Qualsiasi coniugazione", "Prima coniugazione", "Seconda coniugazione", "Terza coniugazione", "Essere coniugazione", "Avere coniugazione"], - "Tempi": ["Qualsiasi tempo verbale", "Indicativo presente", "Indicativo passato prossimo", "Indicativo imperfetto", "Indicativo passato remoto", - "Indicativo trapassato prossimo", "Indicativo trapassato remoto", "Indicativo futuro semplice", "Indicativo futuro anteriore", "Congiuntivo presente", - "Congiuntivo imperfetto", "Congiuntivo passato", "Congiuntivo trapassato", "Condizionale presente", "Condizionale passato", "Imperativo presente", + "Tempi": ["Qualsiasi tempo verbale", "Indicativo presente", "Indicativo passato prossimo", "Indicativo imperfetto", "Indicativo passato remoto", + "Indicativo trapassato prossimo", "Indicativo trapassato remoto", "Indicativo futuro semplice", "Indicativo futuro anteriore", "Congiuntivo presente", + "Congiuntivo imperfetto", "Congiuntivo passato", "Congiuntivo trapassato", "Condizionale presente", "Condizionale passato", "Imperativo presente", "Infinito presente", "Infinito passato", "Participio presente", "Participio passato", "Gerundio presente", "Gerundio passato"], - "Persona" : ["Qualsiasi persona", "1ª persona singolare", "2ª persona singolare", "3ª persona singolare", "1ª persona plurale", "2ª persona plurale", "3ª persona plurale"], + "Persona": ["Qualsiasi persona", "1ª persona singolare", "2ª persona singolare", "3ª persona singolare", "1ª persona plurale", "2ª persona plurale", "3ª persona plurale"], "Funzione": ["Tutte le funzioni", "Aggettivo", "Sostantivo maschile", "Sostantivo femminile"], "Declinazione": ["Tutte le declinazioni", "Prima declinazione", "Seconda declinazione", "Terza declinazione"], } } - + var sostantivoJson = { "filtrisostantivo": { "Numero": ["Singolare", "Plurale"], @@ -600,7 +619,7 @@ $(document).ready(function() { "Tipo_Riflessivi": ["Qualsiasi tipo (Riflessivi)", "Proprio", "Lessicalizzato", "Impersonale", "Passivo", "Reciproco"] } } - + var articoloJson = { "filtriarticolo": { "Genere": ["Femminile", "Maschile"], @@ -688,17 +707,17 @@ $(document).ready(function() { var categorieJson = $.extend({}, verboJson, sostantivoJson, pronomeJson, aggettivoJson, articoloJson, avverbioJson, preposizioneJson, congiunzioneJson, onomasticacitazioneJson); - // Variabili testuali per compattezza - const iconReset = '
\ + // Variabili testuali per compattezza + const iconReset = '
\
'; - const iconCloseCond = '
'; + const iconCloseCond = '
'; const emptyClaList = '
  • Nessuna clausola aggiunta.
  • '; const defaultCond = '
    Clausole e condizioni in AND di default
    '; const emptyNoteList = '
    Nessun commento visualizzato
    '; //const emptyInfo = '
    Nessuna struttura visualizzata
    '; - const canticheList = ["Inferno","Purgatorio","Paradiso"]; + const canticheList = ["Inferno", "Purgatorio", "Paradiso"]; const cla0JsonText = '{"queryText": "", "lemma_forma": "lemma", "opzioni_testo": "parola", "TipoClausola": "0", "Attiva": "0"}'; const condLIplaceholderText1 = 'Trascina qui almeno 1 clausola o condizione'; const condLIplaceholderText2 = 'Trascina qui almeno 2 clausole o condizioni'; @@ -706,7 +725,7 @@ $(document).ready(function() { const condLIplaceholderText2d = 'Trascina qui almeno 2 clausole o condizioni, oppure attiva le clausole inattive'; const condLIplaceholderPart1 = '
  • '; - + // Variabili e costanti funzionali var minimapScrolling = false; var tabID = 0; @@ -717,7 +736,7 @@ $(document).ready(function() { const cc0 = new Array(34).fill(0); const cc1 = new Array(33).fill(0); const cc2 = new Array(33).fill(0); - const contextEmpty = [cc0,cc1,cc2]; + const contextEmpty = [cc0, cc1, cc2]; var queryJson = JSON.parse('{"EsprLogica":"", "LogicaGui":"", "QueryAvanzata": "0"}'); queryJson.LiDaVersion = "1.0"; queryJson.unitaRicerca = "verso"; @@ -731,77 +750,110 @@ $(document).ready(function() { // Fine variabili - getJsonQuery = function(){ + getJsonQuery = function() { return queryJson; }; // Funzioni di gestione del tab Periodo, usate da synthgraph.js - fillStructCard = function(lisid){ -/* var structGroupCard = $('
    '); - var commentHeader = $('
    ') - var rigaNota = $('
    '); - var buttons = $('
    ') - var closeButton = $('
  • '; } else { condLIplaceholder = condLIplaceholderPart1 + sortableID.slice(-1) + condLIplaceholderPart2 + condLIplaceholderText2 + ''; - } - //$("#" + sortableID).append(condLIplaceholder).hide().fadeIn(300); - $("#" + sortableID).append(function(){ + } + //$("#" + sortableID).append(condLIplaceholder).hide().fadeIn(300); + $("#" + sortableID).append(function() { return $(condLIplaceholder).hide(); }); $(placeholderID).fadeTo(100, 0.9).fadeTo(300, 0.6); - + }; - if (inactiveLI == 0){ - $(iconBtn).attr("class","btn btn-sm btn-outline-success iconClClass removeCond text-success border rounded px-1 pb-0"); + if (inactiveLI == 0) { + $(iconBtn).attr("class", "btn btn-sm btn-outline-success iconClClass removeCond text-success border rounded px-1 pb-0"); $(iconBtn).prop("disabled", false); - $(iconDiv).attr("class","col-md-auto p-0 mr-2 mt-0 text-right text-success"); + $(iconDiv).attr("class", "col-md-auto p-0 mr-2 mt-0 text-right text-success"); }; break; - case 1: - if ($(placeholderID).length) { - $(placeholderID).fadeOut(300, function(){ - if (inactiveLI > 0){ + case 1: + if ($(placeholderID).length) { + $(placeholderID).fadeOut(300, function() { + if (inactiveLI > 0) { $(placeholderID).text(condLIplaceholderText1d); } else { $(placeholderID).text(condLIplaceholderText1); - }; - $(placeholderID).fadeTo(100, 0.9).fadeTo(300, 0.6); - }); + }; + $(placeholderID).fadeTo(100, 0.9).fadeTo(300, 0.6); + }); } else { - if (inactiveLI > 0){ + if (inactiveLI > 0) { condLIplaceholder = condLIplaceholderPart1 + sortableID.slice(-1) + condLIplaceholderPart2 + condLIplaceholderText1d + ''; } else { condLIplaceholder = condLIplaceholderPart1 + sortableID.slice(-1) + condLIplaceholderPart2 + condLIplaceholderText1 + ''; - } - //$("#" + sortableID).append(condLIplaceholder).hide().fadeIn(300); - $("#" + sortableID).append(function(){ + } + //$("#" + sortableID).append(condLIplaceholder).hide().fadeIn(300); + $("#" + sortableID).append(function() { return $(condLIplaceholder).hide(); }); $(placeholderID).fadeTo(100, 0.9).fadeTo(300, 0.6); }; - $(iconBtn).attr("class","btn btn-sm iconClClass NOremoveCond text-muted border rounded px-1 pb-0"); + $(iconBtn).attr("class", "btn btn-sm iconClClass NOremoveCond text-muted border rounded px-1 pb-0"); $(iconBtn).prop("disabled", true); - $(iconDiv).attr("class","col-md-auto p-0 mr-2 mt-0 text-right text-muted"); + $(iconDiv).attr("class", "col-md-auto p-0 mr-2 mt-0 text-right text-muted"); break; - case 2: - if ($(placeholderID).length) { - $(placeholderID).fadeOut(300, function(){ - $(placeholderID).remove(); - }); + case 2: + if ($(placeholderID).length) { + $(placeholderID).fadeOut(300, function() { + $(placeholderID).remove(); + }); //$(placeholderID).remove(); }; - $(iconBtn).attr("class","btn btn-sm iconClClass NOremoveCond text-muted border rounded px-1 pb-0"); + $(iconBtn).attr("class", "btn btn-sm iconClClass NOremoveCond text-muted border rounded px-1 pb-0"); $(iconBtn).prop("disabled", true); - $(iconDiv).attr("class","col-md-auto p-0 mr-2 mt-0 text-right text-muted"); + $(iconDiv).attr("class", "col-md-auto p-0 mr-2 mt-0 text-right text-muted"); break; default: - if ($(placeholderID).length) { - $(placeholderID).fadeOut(300, function(){ - $(placeholderID).remove(); - }); + if ($(placeholderID).length) { + $(placeholderID).fadeOut(300, function() { + $(placeholderID).remove(); + }); //$(placeholderID).remove(); }; }; @@ -1270,16 +1339,16 @@ $(document).ready(function() { queryJson.EsprLogica = logicExprString.split(' '); queryJson.LogicaGui = guiLogicString.split(' '); }; - + // Funzione di refresh dei collegamenti tra elementi sortable - function refreshConnectWith(){ - for (var i=0; i <= condListLen; i++) { + function refreshConnectWith() { + for (var i = 0; i <= condListLen; i++) { var cw = ""; - for (var j=0; j <= condListLen; j++) { + for (var j = 0; j <= condListLen; j++) { if (i != j) { cw = cw + "#sortable" + j + ", "; }; - $( "#sortable" + i ).sortable( "option", "connectWith", cw.slice(0, -2) ); + $("#sortable" + i).sortable("option", "connectWith", cw.slice(0, -2)); }; }; }; @@ -1289,10 +1358,10 @@ $(document).ready(function() { var percentageWidth = (element.width() / element.parent().width()) * 100; element.width(percentageWidth + '%'); }; - + // Funzione di parsing delle clausole e delle condizioni logiche - function parseCond(sortableList, condType, forGui){ + function parseCond(sortableList, condType, forGui) { var condText = ""; var items = $(sortableList).children("li"); var itemsText = []; @@ -1300,49 +1369,49 @@ $(document).ready(function() { if ($(this).hasClass("condLI-AND")) { var andID = "#" + $(this).children("ul").attr("id"); var andText = parseCond(andID, "AND", forGui); - if (andText.length){ + if (andText.length) { itemsText.push(andText); - }; + }; }; if ($(this).hasClass("condLI-OR")) { - var orID = "#" + $(this).children("ul").attr("id"); + var orID = "#" + $(this).children("ul").attr("id"); var orText = parseCond(orID, "OR", forGui); - if (orText.length){ + if (orText.length) { itemsText.push(orText); - }; + }; }; if ($(this).hasClass("claLI")) { var claNum = "Clausola" + $(this)[0].id.substr(6); - if (forGui || ($(this).find("input")[0].checked == true)){ + if (forGui || ($(this).find("input")[0].checked == true)) { itemsText.push(claNum); }; }; }); var iTlen = itemsText.length; switch (iTlen) { - case 0: - break; - case 1: - if (forGui) { + case 0: + break; + case 1: + if (forGui) { condText = "( " + condType + " " + itemsText[0] + " )"; } else { - condText += itemsText[0]; - } - break; - default: - condText = "( " + condType + " "; + condText += itemsText[0]; + } + break; + default: + condText = "( " + condType + " "; for (let i = 0; i < iTlen; i++) { condText += itemsText[i] + " "; } - condText += ")"; - }; + condText += ")"; + }; return condText; }; function hideContextCanti(claIdNum) { $('#selectable-xX' + claIdNum + " .ui-selected").each(function() { $(this).attr('style', "display: none;"); - $(this).removeClass( "ui-selected" ) + $(this).removeClass("ui-selected") }); }; @@ -1355,7 +1424,7 @@ $(document).ready(function() { if (queryJson["QueryAvanzata"] == 1) { $("#cla-Advanced").attr('style', "display: block;"); $("#searchToggle").prop("checked", true); - } else { + } else { $("#cla-Advanced").attr('style', "display: none;"); $("#searchToggle").prop("checked", false); }; @@ -1364,8 +1433,8 @@ $(document).ready(function() { $("#queryText").val(queryJson["Clausola0"].queryText); $("#opzioni_testo").val(queryJson["Clausola0"].opzioni_testo); var qText = queryJson["Clausola0"].queryText; - if (qText !== null && qText !== '') {qText = ' "' + qText + '"';} - setLemmaForma(qText,queryJson["Clausola0"].lemma_forma); + if (qText !== null && qText !== '') { qText = ' "' + qText + '"'; } + setLemmaForma(qText, queryJson["Clausola0"].lemma_forma); resetContext(0); window.context0 = JSON.parse(queryJson.Clausola0.contesto); parseContext(0); @@ -1377,7 +1446,7 @@ $(document).ready(function() { var claParent = []; // array di coppie [elemento, elemento padre] var treeLevel = []; // pila di elementi padre var condNum = 0; - for (var i=0; i < guiLogicString.length; i++) { + for (var i = 0; i < guiLogicString.length; i++) { switch (guiLogicString[i]) { case "(": break; @@ -1385,13 +1454,13 @@ $(document).ready(function() { treeLevel.pop(); break; case "OR": - claParent.push([guiLogicString[i], treeLevel[treeLevel.length - 1]]); - treeLevel.push("#sortable" + ++condNum); + claParent.push([guiLogicString[i], treeLevel[treeLevel.length - 1]]); + treeLevel.push("#sortable" + ++condNum); break; case "AND": if (i > 1) { - claParent.push([guiLogicString[i], treeLevel[treeLevel.length - 1]]); - treeLevel.push("#sortable" + ++condNum); + claParent.push([guiLogicString[i], treeLevel[treeLevel.length - 1]]); + treeLevel.push("#sortable" + ++condNum); } else { treeLevel.push("#sortable0"); }; @@ -1400,13 +1469,13 @@ $(document).ready(function() { claParent.push([guiLogicString[i].replace("Clausola", ""), treeLevel[treeLevel.length - 1]]); }; }; - - - $(claParent).each(function(){ + + + $(claParent).each(function() { var itm = $(this)[0] if ($(this)[0] == "OR" || $(this)[0] == "AND") { - addLogicCond($(this)[1],$(this)[0]); - } + addLogicCond($(this)[1], $(this)[0]); + } if (itm != "OR" && itm != "AND") { clau2Make = queryJson["Clausola" + itm].TipoClausola; active = queryJson["Clausola" + itm].Attiva @@ -1414,15 +1483,15 @@ $(document).ready(function() { switch (clau2Make) { case "Grammaticale": selectedValue = queryJson["Clausola" + itm].typeGramm0; - addGramCla($(this)[1],active,tabID,0); - $("#lemma_formaN").val(queryJson["Clausola" + itm].lemma_forma); - $("#queryTextN").val(queryJson["Clausola" + itm].queryText); - $("#opzioni_testoN").val(queryJson["Clausola" + itm].opzioni_testo); - /*$("#lemma_forma" + tabID).val(queryJson["Clausola" + itm].lemma_forma); + addGramCla($(this)[1], active, tabID, 0); + $("#lemma_formaINIT").val(queryJson["Clausola" + itm].lemma_forma); + $("#queryTexINIT").val(queryJson["Clausola" + itm].queryText); + $("#opzioni_testoINIT").val(queryJson["Clausola" + itm].opzioni_testo); + $("#lemma_forma" + tabID).val(queryJson["Clausola" + itm].lemma_forma); $("#queryText" + tabID).val(queryJson["Clausola" + itm].queryText); $("#opzioni_testo" + tabID).val(queryJson["Clausola" + itm].opzioni_testo); - */ - + + if (selectedValue != "all") { $("#grammtypes" + tabID).val(selectedValue); addCatgramSubcla("cla" + tabID, selectedValue); @@ -1446,15 +1515,15 @@ $(document).ready(function() { parseContext(tabID); break; case "Sintattico": - addSyntCla($(this)[1],active,tabID,0); - $("#lemma_formaN").val(queryJson["Clausola" + itm].lemma_forma); - $("#queryTextN").val(queryJson["Clausola" + itm].queryText); - $("#opzioni_testoN").val(queryJson["Clausola" + itm].opzioni_testo); - /*$("#lemma_forma" + tabID).val(queryJson["Clausola" + itm].lemma_forma); + addSyntCla($(this)[1], active, tabID, 0); + $("#lemma_formaINIT").val(queryJson["Clausola" + itm].lemma_forma); + $("#queryTextINIT").val(queryJson["Clausola" + itm].queryText); + $("#opzioni_testoINIT").val(queryJson["Clausola" + itm].opzioni_testo); + $("#lemma_forma" + tabID).val(queryJson["Clausola" + itm].lemma_forma); $("#queryText" + tabID).val(queryJson["Clausola" + itm].queryText); $("#opzioni_testo" + tabID).val(queryJson["Clausola" + itm].opzioni_testo); - */ - + + if (queryJson["Clausola" + itm].typeSyntax0 != ".+") { $("#cla" + tabID + " #synttypes").val(queryJson["Clausola" + itm].typeSyntax0); } @@ -1465,52 +1534,52 @@ $(document).ready(function() { parseContext(tabID); break; case "Metafora": - addMetaCla($(this)[1],active,tabID,0); + addMetaCla($(this)[1], active, tabID, 0); break; default: - }; - }; + }; + }; }); refreshClaList(); - refreshSortables(); + refreshSortables(); }; - + function resetSimpleGui() { $('#queryText').val(""); - setLemmaForma("","forma"); + setLemmaForma("", "forma"); $('#opzioni_testo').val("parola"); resetContext(0); }; - - function setLemmaForma(qText,newSelection) { - var newOptions = {['La forma' + qText]: 'forma', ['Il lemma' + qText]: 'lemma', ['Il testo' + qText]: 'testo'}; - $("#lemma_forma").empty(); - $.each(newOptions, function(key,value) { - $("#lemma_forma").append($("").attr("value", value).text(key)); - }); - $("#lemma_forma").val(newSelection); + + function setLemmaForma(qText, newSelection) { + var newOptions = { ['La forma' + qText]: 'forma', ['Il lemma' + qText]: 'lemma', ['Il testo' + qText]: 'testo' }; + $("#lemma_forma").empty(); + $.each(newOptions, function(key, value) { + $("#lemma_forma").append($("").attr("value", value).text(key)); + }); + $("#lemma_forma").val(newSelection); }; - + function resetContext(claIdNum) { $('#selectable-xX' + claIdNum + " .ui-selectee").each(function() { $(this).attr('style', "line-height: 1.2em"); }); - $('#selectable-xX' + claIdNum + " .ui-selected").removeClass( "ui-selected" ) + $('#selectable-xX' + claIdNum + " .ui-selected").removeClass("ui-selected") $('#selectable-xX' + claIdNum + ' .sel-canti-intro').each(function() { $(this).text("Seleziona i canti:") });; $("#contextText-xX" + claIdNum).html("Tutta l'opera."); window["context" + claIdNum] = JSON.parse(JSON.stringify(contextEmpty)); $('#selectable-xX' + claIdNum + " .show").removeClass("show"); - + $("#contextDiv" + claIdNum).hide(); //Nik work around per non mostrare context }; function resetAdvGui() { - var tabsContent=$("#cla-TabContent").find(".tab-pane:not(:first)"); + var tabsContent = $("#cla-TabContent").find(".tab-pane:not(:first)"); if ($(tabsContent).length) { var claIdNum = ''; - $(tabsContent).each(function(){ + $(tabsContent).each(function() { claIdNum = $(this)[0].id.substring(3); delete window["context" + claIdNum]; $(this).remove(); @@ -1519,21 +1588,21 @@ $(document).ready(function() { claListLen = 0; condListLen = 0; tabID = 0; - $('#sortable0').html(emptyClaList); + $('#sortable0').html(emptyClaList); }; function parseContext(claIdNum) { var context = window["context" + claIdNum]; - var contextStringParts = ["","",""]; + var contextStringParts = ["", "", ""]; var contextString = []; var rangeHolderS = 0; var rangeHolderE = -1; var lastElem = ""; var totCan = 0; - for (var i=0; i < 3; i++) { - for (var j=0; j <= context[i].length; j++) { + for (var i = 0; i < 3; i++) { + for (var j = 0; j <= context[i].length; j++) { if (context[i][j] == 1) { - if (j == (rangeHolderE+1)) { + if (j == (rangeHolderE + 1)) { rangeHolderE++; } else { rangeHolderS = j; @@ -1542,10 +1611,10 @@ $(document).ready(function() { totCan++; } else { if (rangeHolderE >= 0) { - if ( rangeHolderS == rangeHolderE) { - lastElem = (rangeHolderE+1); + if (rangeHolderS == rangeHolderE) { + lastElem = (rangeHolderE + 1); } else { - lastElem = (rangeHolderS+1) + "-" + (rangeHolderE+1); + lastElem = (rangeHolderS + 1) + "-" + (rangeHolderE + 1); }; rangeHolderE = -1; }; @@ -1567,18 +1636,18 @@ $(document).ready(function() { } }; if ((contextString.toString() != "") && (totCan < 100)) { - $("#contextText-xX" + claIdNum).html(contextString.toString()+"."); + $("#contextText-xX" + claIdNum).html(contextString.toString() + "."); } else { resetContext(claIdNum) } }; - + function managePage() { - if (currPage == 0){ - numeroPagine = Math.ceil(numeroContesti/nRisultatiPerPag); + if (currPage == 0) { + numeroPagine = Math.ceil(numeroContesti / nRisultatiPerPag); $("#paginaLista option").remove(); for (let i = 1; i <= numeroPagine; i++) { - $('#paginaLista').append(``); + $('#paginaLista').append(``); }; $("#pagPrecedente").addClass("disabled"); if (numeroPagine > 1) { @@ -1590,7 +1659,7 @@ $(document).ready(function() { } else { if ((currPage == 1) && (currPage == numeroPagine)) { $("#pagPrecedente").addClass("disabled") - $("#pagSuccessiva").addClass("disabled") + $("#pagSuccessiva").addClass("disabled") } else { if (currPage == 1) { $("#pagPrecedente").addClass("disabled") @@ -1598,23 +1667,23 @@ $(document).ready(function() { } else { if (currPage == numeroPagine) { $("#pagPrecedente").removeClass("disabled") - $("#pagSuccessiva").addClass("disabled") + $("#pagSuccessiva").addClass("disabled") } else { $("#pagPrecedente").removeClass("disabled") - $("#pagSuccessiva").removeClass("disabled") - } + $("#pagSuccessiva").removeClass("disabled") + } } }; }; - $.manageResultList((currPage-1)*nRisultatiPerPag, nRisultatiPerPag); + $.manageResultList((currPage - 1) * nRisultatiPerPag, nRisultatiPerPag); if (latestPhraseId != "") { document.getElementById(latestPhraseId).scrollIntoView({ - behavior: "smooth", - }); + behavior: "smooth", + }); latestPhraseId = ""; } }; - + function incSize(currentSize, incr, min, max) { fSize = Math.max((parseFloat(currentSize) + incr) % max, min); return (fSize) + 'px'; @@ -1634,7 +1703,7 @@ $(document).ready(function() { $("#style2-Boot").prop('disabled', true); $("#style2-Custom").prop('disabled', true); $("body").fadeIn(fadeDuration); - }); + }); break; case "style2": $("body").fadeOut(fadeDuration, function() { @@ -1644,24 +1713,25 @@ $(document).ready(function() { $("#style1-Boot").prop('disabled', true); $("#style1-Custom").prop('disabled', true); $("body").fadeIn(fadeDuration); - }); + }); break; default: }; - $('#bgImg').replaceWith(bgImgEl); - drawMinimap(currentMinimap, false, 0); - Cookies.set('LiDa_style', newStyle); }; + $('#bgImg').replaceWith(bgImgEl); + drawMinimap(currentMinimap, false, 0); + Cookies.set('LiDa_style', newStyle); + }; }; - + }); $(window).on('load', function() { - var cantoHeightToSet = $("body")[0].clientHeight*cssCantoHeight; - var maxCantoHeightToSet = $("body")[0].clientHeight*cssTableMainHeight-110; // 63 padding top + 47 margine bottom - $(visCantoClass).css("max-height", maxCantoHeightToSet); - $(visCantoClass).css("height", cantoHeightToSet); - $(displayCantoId).css("max-height", maxCantoHeightToSet); + var cantoHeightToSet = $("body")[0].clientHeight * cssCantoHeight; + var maxCantoHeightToSet = $("body")[0].clientHeight * cssTableMainHeight - 110; // 63 padding top + 47 margine bottom + $(visCantoClass).css("max-height", maxCantoHeightToSet); + $(visCantoClass).css("height", cantoHeightToSet); + $(displayCantoId).css("max-height", maxCantoHeightToSet); $(displayCantoId).css("height", cantoHeightToSet); var bgImgEl = document.createElement("IMG"); bgImgEl.id = "bgImg";