Rivista grafica parte ricerca, bug minori corretti

This commit is contained in:
Luca Trupiano 2023-04-18 17:07:53 +02:00
parent c7c7cea39e
commit cf45de06a5
4 changed files with 163 additions and 86 deletions

View File

@ -363,6 +363,11 @@ li::marker {
color: #759F9A !important; color: #759F9A !important;
} }
.form-control:focus, input[type=text]:focus {
border-color: rgba(117, 159, 154) !important;
box-shadow: 0 0 0 0.2rem rgba(117, 159, 154,.5);
}
/* ------- $warning #eace87 -------- */ /* ------- $warning #eace87 -------- */
@ -402,6 +407,9 @@ li::marker {
background-color: #c8d9d7 !important; background-color: #c8d9d7 !important;
} }
.bg-lida10-mix {
background-color: #f3f5f2 !important;
}
/* clausola */ /* clausola */
.bg-lida11 { .bg-lida11 {
background-color: #e3eceb !important; background-color: #e3eceb !important;
@ -419,18 +427,27 @@ li::marker {
/* visualizza e minimap */ /* visualizza e minimap */
.bg-lida-vis, #displayminimap, .claCollBtn { .bg-lida-vis, #displayminimap, .claCollBtn, .nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active {
background-color: #fefeff! important; background-color: #fefeff! important;
} }
/* body */ /* body #dae0e5 */
.body-vis { .body-vis {
background-color: #fcfaf7! important; background-color: #fcfaf7! important;
padding-top: 0px; padding-top: 0px;
} }
.custom-select-sm.bg-light:hover, .custom-select-sm.bg-lida12:hover, .custom-select-sm.bg-lida13:hover { .custom-select-sm.bg-light:hover, .custom-select-sm.bg-lida12:hover, .custom-select-sm.bg-lida13:hover, .custom-select.bg-light:hover, .custom-select.bg-lida12:hover, .custom-select.bg-lida13:hover {
background-color: #dae0e5!important; background-color: #e9ecef!important;
cursor: pointer;
}
.iconClClass.removeCond:hover, .removeCla:hover {
background-color: rgba(0,0,0,.125)!important;
cursor: pointer;
}
.curPoint:hover {
cursor: pointer; cursor: pointer;
} }
@ -438,4 +455,6 @@ li::marker {
cursor: move; cursor: move;
} }
.removeCond, .NOremoveCond {
border-color: rgba(0,0,0,.125)! important;
}

View File

@ -360,8 +360,15 @@ li::marker {
color: #054a29 !important; color: #054a29 !important;
} }
.form-control:focus, input[type=text]:focus {
border-color: rgba(65, 93, 67) !important;
box-shadow: 0 0 0 0.2rem rgba(65,93,67,.5);
}
/* ------- #eace87 -------- */ input2[type=text]:-internal-autofill-selected {
background-color: #d4cbd0! important;
}
/* ------- mark #a996a0 -------- */
.mark { .mark {
background-color: #a996a0 !important; background-color: #a996a0 !important;
@ -399,6 +406,10 @@ li::marker {
background-color: #8dac91 !important; background-color: #8dac91 !important;
} }
.bg-lida10-mix {
background-color: #e0e2d9 !important;
}
/* clausola */ /* clausola */
.bg-lida11 { .bg-lida11 {
background-color: #c6d5c8 !important; background-color: #c6d5c8 !important;
@ -416,11 +427,12 @@ li::marker {
/* visualizza e minimap */ /* visualizza e minimap */
.bg-lida-vis, #displayminimap, .claCollBtn { .bg-lida-vis, #displayminimap, .claCollBtn, .nav-tabs .nav-item.show .nav-link,.nav-tabs .nav-link.active {
background-color: #f8f9fa! important; background-color: #f8f9fa! important;
} }
/* body */ /* body #dae0e5 */
.body-vis { .body-vis {
background-color: #f1ede7! important; background-color: #f1ede7! important;
padding-top: 0px; padding-top: 0px;
@ -430,8 +442,17 @@ li::marker {
border-color: #cbcbc0 !important; border-color: #cbcbc0 !important;
} }
.custom-select-sm.bg-light:hover, .custom-select-sm.bg-lida12:hover, .custom-select-sm.bg-lida13:hover { .custom-select-sm.bg-light:hover, .custom-select-sm.bg-lida12:hover, .custom-select-sm.bg-lida13:hover, .custom-select.bg-light:hover, .custom-select.bg-lida12:hover, .custom-select.bg-lida13:hover {
background-color: #dae0e5!important; background-color: #e9ecef!important;
cursor: pointer;
}
.iconClClass.removeCond:hover, .removeCla:hover {
background-color: rgba(0,0,0,.125)!important;
cursor: pointer;
}
.curPoint:hover {
cursor: pointer; cursor: pointer;
} }
@ -439,5 +460,8 @@ li::marker {
cursor: move; cursor: move;
} }
.removeCond, .NOremoveCond {
border-color: rgba(0,0,0,.125)! important;
}

View File

@ -477,12 +477,12 @@
</li> </li>
</ul> </ul>
<div class="tab-content visInfo w-100 d-flex bg-white" id="vis-TabContent" style="flex-direction: column;"> <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-white" id="vis1" role="tabpanel" aria-labelledby="vis1-tab"> <div class="tab-pane fade show active p-0 bg-lida-vis" id="vis1" role="tabpanel" aria-labelledby="vis1-tab">
<div id='displaynote' class="pt-3 px-3">Visualizza annotazioni<br> <div id='displaynote' class="pt-3 px-3">Visualizza annotazioni<br>
</div> </div>
</div> </div>
<div class="tab-pane fade p-0 bg-white" id="vis0" role="tabpanel" aria-labelledby="vis0-tab"> <div class="tab-pane fade p-0 bg-lida-vis" id="vis0" role="tabpanel" aria-labelledby="vis0-tab">
<div id='displayinfo' class="pt-3 px-3">Visualizza info periodo<br> <div id='displayinfo' class="pt-3 px-3">Visualizza info periodo<br>
</div> </div>
</div> </div>
@ -527,7 +527,7 @@
<span class="text-muted">Reset</span> <span class="text-muted">Reset</span>
</button> </button>
<div class="pr-0 align-self-end ml-1"> <div class="pr-0 align-self-end ml-1">
<input class="form-control-sm pr-0 borderRadiusZero border border-success monMe" <input class="form-control form-control-sm pr-0 borderRadiusZero border border-success monMe"
type="text" id="queryText" type="text" id="queryText"
placeholder=' inserisci un termine' placeholder=' inserisci un termine'
style="height: 32px;"> style="height: 32px;">
@ -546,8 +546,8 @@
<input style="display: none;" type="file" id="apriFile"> <input style="display: none;" type="file" id="apriFile">
<span <span
class="border border-success rounded bg-light p-1 mb-1 align-text-bottom"><ion-icon class="border border-success rounded bg-light p-1 mb-1 align-text-bottom"><ion-icon
name="save-outline"></ion-icon> <ion-icon name="save-outline" class="curPoint"></ion-icon> <ion-icon
name="folder-open-outline"></ion-icon> <ion-icon name="folder-open-outline" class="curPoint"></ion-icon> <ion-icon
name="cloud-upload-outline"></ion-icon> <ion-icon name="cloud-upload-outline"></ion-icon> <ion-icon
name="cloud-download-outline"></ion-icon></span> name="cloud-download-outline"></ion-icon></span>
</div> </div>
@ -584,13 +584,13 @@
<div class="card card-body bg-lida10 p-2"> <div class="card card-body bg-lida10 p-2">
<div class="form-inline input-group px-1 py-2"> <div class="form-inline input-group px-1 py-2">
<select <select
class="form-control custom-select-sm text-muted bg-light monMe btn-outline-success border" class="form-control custom-select custom-select-sm text-muted bg-light monMe btn-outline-success border"
id="lemma_forma"> id="lemma_forma">
<option value="forma">La forma</option> <option value="forma">La forma</option>
<option value="lemma">Il lemma</option> <option value="lemma">Il lemma</option>
<option value="testo">Il testo</option> <option value="testo">Il testo</option>
</select> <select </select> <select
class="form-control custom-select-sm text-muted bg-light ml-2 monMe btn-outline-success border" class="form-control custom-select custom-select-sm text-muted bg-light ml-2 monMe btn-outline-success border"
id="opzioni_testo"> id="opzioni_testo">
<option value="parola">come Parola</option> <option value="parola">come Parola</option>
<option value="sottostringa">come Sottostringa</option> <option value="sottostringa">come Sottostringa</option>
@ -920,7 +920,7 @@
</div> </div>
</div> </div>
<div class="col card p-0 pt-1 ml-2 mt-1 bg-light text-muted"> <div class="col card p-0 pt-1 ml-2 mt-1 text-muted bg-lida-vis">
<div class="row no-gutters p-0 justify-content-end"> <div class="row no-gutters p-0 justify-content-end">
<div <div
class="col px-2 pt-1 align-self-start align-items-start justify-content-end text-right position-absolute" class="col px-2 pt-1 align-self-start align-items-start justify-content-end text-right position-absolute"
@ -1029,14 +1029,14 @@
<div id="cla-Advanced" style="display: d-flex"> <div id="cla-Advanced" style="display: d-flex">
<div class=" p-1 bg-light well" id="cla-list"> <div class="p-1 well bg-lida10-mix" id="cla-list">
<div id="cla-list-row" <div id="cla-list-row"
class="row mx-0 justify-content-between"> class="row mx-0 justify-content-between">
<div class="col-12 p-0"> <div class="col-12 p-0">
<ul id="sortable0" <ul id="sortable0"
class="condLIand list-group ui-sortable"> class="condLIand list-group ui-sortable">
<li id="li-cla0" <li id="li-cla0"
class="list-group-item align-items-center my-1 ui-state-default ui-state-disabled border text-muted bg-white ui-state-disabled-opacity-06 small">Nessuna class="list-group-item align-items-center my-1 ui-state-default ui-state-disabled border text-muted bg-lida-vis ui-state-disabled-opacity-06 small">Nessuna
clausola aggiunta.</li> clausola aggiunta.</li>
</ul> </ul>
</div> </div>
@ -1085,7 +1085,7 @@
name="document-text"></ion-icon></label> name="document-text"></ion-icon></label>
</div> </div>
<select <select
class="form-control custom-select-sm monMe bg-light text-muted border btn-outline-success" class="form-control custom-select custom-select-sm monMe bg-light text-muted border btn-outline-success"
id="lemma_formaN"> id="lemma_formaN">
<option value="forma">La forma</option> <option value="forma">La forma</option>
<option value="lemma">Il lemma</option> <option value="lemma">Il lemma</option>
@ -1093,7 +1093,7 @@
</select> <input type="text" class="form-control form-control-sm monMe" </select> <input type="text" class="form-control form-control-sm monMe"
id="queryTextN" placeholder="inserisci un termine" id="queryTextN" placeholder="inserisci un termine"
aria-describedby="name-desc" name="query"> <select aria-describedby="name-desc" name="query"> <select
class="form-control custom-select-sm monMe bg-light text-muted border btn-outline-success" class="form-control custom-select custom-select-sm monMe bg-light text-muted border btn-outline-success"
id="opzioni_testoN"> id="opzioni_testoN">
<option value="parola">come Parola</option> <option value="parola">come Parola</option>
<option value="sottostringa">come Sottostringa</option> <option value="sottostringa">come Sottostringa</option>
@ -1112,7 +1112,7 @@
<label class="input-group-text"><ion-icon name="options"></ion-icon></label> <label class="input-group-text"><ion-icon name="options"></ion-icon></label>
</div> </div>
<select <select
class="form-control custom-select-sm catgram monMe bg-light text-muted border btn-outline-success" class="form-control custom-select custom-select-sm catgram monMe bg-light text-muted border btn-outline-success"
name="typeGramm0" id="grammtypesN" title="Categoria grammaticale" name="typeGramm0" id="grammtypesN" title="Categoria grammaticale"
value="oggetto"> value="oggetto">
<option value="all">Tutte le categorie</option> <option value="all">Tutte le categorie</option>
@ -1170,7 +1170,7 @@
name="document-text"></ion-icon></label> name="document-text"></ion-icon></label>
</div> </div>
<select <select
class="form-control custom-select-sm monMe bg-light text-muted border btn-outline-success" class="form-control custom-select custom-select-sm monMe bg-light text-muted border btn-outline-success"
id="lemma_formaN"> id="lemma_formaN">
<option value="forma">La forma</option> <option value="forma">La forma</option>
<option value="lemma">Il lemma</option> <option value="lemma">Il lemma</option>
@ -1178,7 +1178,7 @@
</select> <input type="text" class="form-control form-control-sm monMe" </select> <input type="text" class="form-control form-control-sm monMe"
id="queryTextN" placeholder="inserisci un termine" id="queryTextN" placeholder="inserisci un termine"
aria-describedby="name-desc" name="query"> <select aria-describedby="name-desc" name="query"> <select
class="form-control custom-select-sm monMe bg-light text-muted border btn-outline-success" class="form-control custom-select custom-select-sm monMe bg-light text-muted border btn-outline-success"
id="opzioni_testoN"> id="opzioni_testoN">
<option value="parola">come Parola</option> <option value="parola">come Parola</option>
<option value="sottostringa">come Sottostringa</option> <option value="sottostringa">come Sottostringa</option>
@ -1197,7 +1197,7 @@
<label class="input-group-text"><ion-icon name="options"></ion-icon></label> <label class="input-group-text"><ion-icon name="options"></ion-icon></label>
</div> </div>
<select <select
class="form-control custom-select-sm monMe bg-light text-muted border btn-outline-success" class="form-control custom-select custom-select-sm monMe bg-light text-muted border btn-outline-success"
name="typeSyntax0" id="synttypes" title="Tipo sintattico" name="typeSyntax0" id="synttypes" title="Tipo sintattico"
value="oggetto"> value="oggetto">
<option value=".+" class="w-10" <option value=".+" class="w-10"
@ -1781,7 +1781,7 @@
<label class="input-group-text"><ion-icon name="options"></ion-icon></label> <label class="input-group-text"><ion-icon name="options"></ion-icon></label>
</div> </div>
<select <select
class="form-control custom-select-sm monMe bg-light text-muted border btn-outline-success" class="form-control custom-select custom-select-sm monMe bg-light text-muted border btn-outline-success"
name="functionSyntax" id="syntfunc" name="functionSyntax" id="syntfunc"
title="Livello di subordinazione"> title="Livello di subordinazione">
<option value=".+">Qualsiasi livello di subordinazione</option> <option value=".+">Qualsiasi livello di subordinazione</option>
@ -1835,7 +1835,7 @@
<ul> <ul>
<!-- LI CLAUSOLA --> <!-- LI CLAUSOLA -->
<li id="li-claxX1Xx" style="display: none;" <li id="li-claxX1Xx" style="display: none;"
class="claLI card mx-0 my-1 py-1 px-0 list-group-item align-items-center border text-muted bg-white"> class="claLI card mx-0 my-1 py-1 px-0 list-group-item align-items-center border text-muted bg-lida-vis">
<div class="handle container p-0 pl-1"> <div class="handle container p-0 pl-1">
<div <div
class="row no-gutters flex-nowrap align-items-start justify-content-between"> class="row no-gutters flex-nowrap align-items-start justify-content-between">
@ -1854,14 +1854,15 @@
id="headingCxX1Xx"> id="headingCxX1Xx">
<div style="height: 32px; width: 40px;" <div style="height: 32px; width: 40px;"
class="custom-switch p-0 align-self-end text-right text-success"> class="custom-switch p-0 align-self-end text-right text-success">
<input type="checkbox" class="custom-control-input claAct align-self-end text-success border-success btn-success" <input type="checkbox" class="custom-control-input claAct align-self-end text-success border-success btn-success curPoint"
name="cla-attiva" aria-label="attiva" id="actiClaSWxX3Xx"><label class="custom-control-label form-control-sm text-success p-0" name="cla-attiva" aria-label="attiva" id="actiClaSWxX3Xx"><label class="custom-control-label form-control-sm text-success p-0 curPoint"
for="actiClaSWxX1Xx"></label> for="actiClaSWxX1Xx"></label>
</div> </div>
</div> </div>
<div <div class="col-md-auto p-0 m-0 text-right text-success">
class="col-auto pb-0 pl-1 pr-2 pt-1 align-top align-self-start justify-content-end text-right bd-highlight text-success removeCla"> <button class="btn btn-sm removeCla text-success border rounded px-1 pb-0" style="z-index: 1000">
<ion-icon name="close-circle"></ion-icon> <ion-icon name="close-circle"></ion-icon>
</button>
</div> </div>
</div> </div>
</div> </div>
@ -1872,7 +1873,7 @@
<div <div
class="col-auto pr-1 align-self-end align-items-end justify-content-end text-right text-success position-absolute"> class="col-auto pr-1 align-self-end align-items-end justify-content-end text-right text-success position-absolute">
<button id="claCollapsexX1Xx" <button id="claCollapsexX1Xx"
class="btn btn-sm btn-link claCollBtn collapsed mr-2 px-4 pb-0 border border-success text-success btn-outline-success bg-light" class="btn btn-sm btn-link claCollBtn collapsed px-4 pb-0 border text-success btn-outline-success bg-light"
data-toggle="collapse" data-target="#collapseClaxX1Xx" data-toggle="collapse" data-target="#collapseClaxX1Xx"
aria-expanded="false" aria-controls="collapseClaxX1Xx"> aria-expanded="false" aria-controls="collapseClaxX1Xx">
<ion-icon name="pencil"></ion-icon> <ion-icon name="pencil"></ion-icon>
@ -1892,18 +1893,24 @@
<li id="condxX4Xx" style="display: none;" <li id="condxX4Xx" style="display: none;"
class="condLI-xX5Xx mx-0 my-1 p-1 list-group-item align-items-center text-muted bg-xX6Xx"> class="condLI-xX5Xx mx-0 my-1 p-1 list-group-item align-items-center text-muted bg-xX6Xx">
<ul id="sortablexX4Xx" class="handle list-group ui-sortable"> <ul id="sortablexX4Xx" class="handle list-group ui-sortable">
<div class="row ml-0 my-1 pr-2 justify-content-between"> <div class="row ml-0 mb-1 mt-0 pr-2 justify-content-between">
<div class="col-md-auto d-flex flex-nowrap p-0 m-0 small font-weight-bold text-muted align-self-start">
<div class="pl-0 pr-1">
<span class="ui-icon ui-icon-arrowthick-2-n-s"></span>
</div>
<div class="small font-weight-bold text-muted"> <div class="small font-weight-bold text-muted">
<select <select
class="p-0 custom-select-sm small text-muted bg-xX6Xx form-control condType btn-outline-success" class="py-0 custom-select custom-select-sm small text-muted bg-light form-control condType"
id="andOrSelect-xX4Xx"> id="andOrSelect-xX4Xx">
<option>AND</option> <option>AND</option>
<option>OR</option> <option>OR</option>
</select> </select>
</div> </div>
<div class="p-0 mr-3 mt-1 text-right text-success"> </div>
<span class="iconClClass removeCond"><ion-icon <div class="col-md-auto p-0 mr-2 mt-0 text-right text-success">
name="close-circle"></ion-icon></span> <button class="btn btn-sm btn-outline-success iconClClass removeCond text-success border rounded px-1 pb-0" style="z-index: 1000">
<ion-icon name="close-circle"></ion-icon>
</button>
</div> </div>
</div> </div>
<li id="placeholderSortxX4Xx" <li id="placeholderSortxX4Xx"

View File

@ -84,7 +84,7 @@ $(document).ready(function() {
var claIdNum = e.target.id.substr(11); var claIdNum = e.target.id.substr(11);
$("#claCollapse" + claIdNum)[0].removeAttribute("style"); $("#claCollapse" + claIdNum)[0].removeAttribute("style");
$("#claCollapse" + claIdNum).removeClass( "border-bottom-0" ); $("#claCollapse" + claIdNum).removeClass( "border-bottom-0" );
$("#claCollapse" + claIdNum).addClass( "border border-success" ); $("#claCollapse" + claIdNum).addClass( "border" );
$("#claCollapse" + claIdNum).blur(); $("#claCollapse" + claIdNum).blur();
e.stopPropagation(); e.stopPropagation();
}; };
@ -94,7 +94,7 @@ $(document).ready(function() {
if (e.target.id.substr(0,11) == "collapseCla") { if (e.target.id.substr(0,11) == "collapseCla") {
var claIdNum = e.target.id.substr(11); var claIdNum = e.target.id.substr(11);
$("#claCollapse" + claIdNum)[0].setAttribute("style", "border-bottom-left-radius: 0;border-bottom-right-radius: 0;"); $("#claCollapse" + claIdNum)[0].setAttribute("style", "border-bottom-left-radius: 0;border-bottom-right-radius: 0;");
$("#claCollapse" + claIdNum).removeClass( "border border-success" ); $("#claCollapse" + claIdNum).removeClass( "border" );
$("#claCollapse" + claIdNum).addClass( "border-bottom-0" ); $("#claCollapse" + claIdNum).addClass( "border-bottom-0" );
$("#claCollapse" + claIdNum).blur(); $("#claCollapse" + claIdNum).blur();
e.stopPropagation(); e.stopPropagation();
@ -129,7 +129,9 @@ $(document).ready(function() {
// Inizializza sortable // Inizializza sortable
$( "#sortable0" ).sortable({ $( "#sortable0" ).sortable({
items: "> li", items: "> li",
handle: ".handle" handle: ".handle",
opacity: 0.6,
cursor: 'move'
}); });
// Inizializza selectable-xX0 e definisce le funzioni // Inizializza selectable-xX0 e definisce le funzioni
@ -240,16 +242,26 @@ $(document).ready(function() {
var claListItemId = $(this).closest('li').attr('id'); var claListItemId = $(this).closest('li').attr('id');
var claIdNum = claListItemId.substr(6); var claIdNum = claListItemId.substr(6);
claListLen--; claListLen--;
//$("#" + claListItemId)[0].remove();
$("#" + claListItemId).fadeOut('fast',
function(){
$("#" + claListItemId)[0].remove(); $("#" + claListItemId)[0].remove();
delete queryJson["Clausola" + claIdNum]; delete queryJson["Clausola" + claIdNum];
delete window["context" + claIdNum]; delete window["context" + claIdNum];
refreshClaList(); refreshClaList();
refreshSortables(); refreshSortables();
}); });
});
// Evento: click sull'icona rimuovi condizione // Evento: click sull'icona rimuovi condizione
$('#sortable0').on('click', '.removeCond', function() { $('#sortable0').on('click', '.removeCond', function() {
$(this).closest('ul').parent().remove(); //$(this).closest('ul').parent().remove();
var here = this;
$(this).closest('ul').parent().fadeOut('fast',
function(here){
$(here).closest('ul').parent().remove();
condListLen--; condListLen--;
refreshClaList(); refreshClaList();
refreshSortables(); refreshSortables();
@ -258,6 +270,7 @@ $(document).ready(function() {
$('#sortable0').html(emptyClaList); $('#sortable0').html(emptyClaList);
} }
}); });
});
// Evento: click sulla lista di clausole nel dropbox "Aggiungi clausola di tipo:" o "aggiungi condizione logica:" // Evento: click sulla lista di clausole nel dropbox "Aggiungi clausola di tipo:" o "aggiungi condizione logica:"
$('.addCCbtn').on('click', function() { $('.addCCbtn').on('click', function() {
@ -301,13 +314,13 @@ $(document).ready(function() {
if (condtype == "AND") { if (condtype == "AND") {
$("#cond" + condId).removeClass( "condLI-OR bg-lida13" ) $("#cond" + condId).removeClass( "condLI-OR bg-lida13" )
$("#cond" + condId).addClass( "condLI-AND bg-lida12" ) $("#cond" + condId).addClass( "condLI-AND bg-lida12" )
$(this).removeClass( "bg-lida13" ) //$(this).removeClass( "bg-lida13" )
$(this).addClass( "bg-lida12" ) //$(this).addClass( "bg-lida12" )
} else { } else {
$("#cond" + condId).removeClass( "condLI-AND bg-lida12" ) $("#cond" + condId).removeClass( "condLI-AND bg-lida12" )
$("#cond" + condId).addClass( "condLI-OR bg-lida13" ) $("#cond" + condId).addClass( "condLI-OR bg-lida13" )
$(this).removeClass( "bg-lida12" ) //$(this).removeClass( "bg-lida12" )
$(this).addClass( "bg-lida13" ) //$(this).addClass( "bg-lida13" )
}; };
refreshClaList(); refreshClaList();
}); });
@ -328,7 +341,7 @@ $(document).ready(function() {
// Evento: click sull'icona di refresh dei radio button // Evento: click sull'icona di refresh dei radio button
$('#cla-TabContent').on('click', '.radioReset', function() { $('#cla-TabContent').on('click', '.radioReset', function() {
fSet = $(this).siblings('fieldset'); fSet = $(this).parent().siblings('fieldset');
if (fSet.find(":checked").length) { if (fSet.find(":checked").length) {
radioChecked = fSet.find(":checked")[0]; radioChecked = fSet.find(":checked")[0];
radioChecked.checked = false; radioChecked.checked = false;
@ -562,7 +575,10 @@ $(document).ready(function() {
// Variabili testuali per compattezza // Variabili testuali per compattezza
const iconReset = '<div class="text-right text-success radioReset"><ion-icon name="refresh-circle"></ion-icon></div>'; const iconReset2 = '<div class="text-right text-success radioReset"><ion-icon name="refresh-circle"></ion-icon></div>';
const iconReset = '<div class="p-0 align-self-start align-items-start justify-content-end text-right"> \
<button class="btn btn-sm btn-outline-success bg-light radioReset border rounded text-success px-1 pb-0" style="margin-top: 1px !important;margin-right: 1px !important;"> \
<ion-icon name="refresh-circle"></ion-icon></button></div>';
const iconCloseCond = '<div class="p-0 mr-3 mt-0 text-right text-success"><span class="iconClClass removeCond"><ion-icon name="close-circle"></ion-icon></span></div>'; const iconCloseCond = '<div class="p-0 mr-3 mt-0 text-right text-success"><span class="iconClClass removeCond"><ion-icon name="close-circle"></ion-icon></span></div>';
const emptyClaList = '<li id="li-cla0" class="list-group-item align-items-center my-1 ui-state-default ui-state-disabled border text-muted bg-white ui-state-disabled-opacity-06 small">Nessuna clausola aggiunta.</li>'; const emptyClaList = '<li id="li-cla0" class="list-group-item align-items-center my-1 ui-state-default ui-state-disabled border text-muted bg-white ui-state-disabled-opacity-06 small">Nessuna clausola aggiunta.</li>';
const defaultCond = '<div id="cla-defaultCond" class="col-12 p-1 small font-weight-bold text-muted"> Clausole e condizioni in AND di default</div>'; const defaultCond = '<div id="cla-defaultCond" class="col-12 p-1 small font-weight-bold text-muted"> Clausole e condizioni in AND di default</div>';
@ -639,7 +655,7 @@ $(document).ready(function() {
switch (vals.length) { switch (vals.length) {
case 2: case 2:
var element = $('<div />'); var element = $('<div />');
element.attr('class', ' d-flex flex-sm-nowrap pr-2 py-1 mb-1 form-group form-control justify-content-between bg-light'); element.attr('class', 'd-flex flex-sm-nowrap pr-0 py-0 mb-1 form-group form-control-sm border justify-content-between bg-light');
var rbfieldset = $('<fieldset />'); var rbfieldset = $('<fieldset />');
var flexdiv1 = $('<div />'); var flexdiv1 = $('<div />');
var flexdiv2 = $('<div />'); var flexdiv2 = $('<div />');
@ -650,8 +666,10 @@ $(document).ready(function() {
rbfieldset.attr('id', tabPaneId + keys[key].replace(/\s/g, '')); rbfieldset.attr('id', tabPaneId + keys[key].replace(/\s/g, ''));
rbfieldset.attr('class', 'custom-control-inline monMe'); rbfieldset.attr('class', 'custom-control-inline monMe');
flexdiv1.attr('class', 'custom-control custom-radio custom-control-inline m-0 pb-0'); flexdiv1.attr('class', 'custom-control custom-radio custom-control-inline m-0 mr-2 pb-0');
flexdiv1.attr('style', 'padding-top: 2px!important;');
flexdiv2.attr('class', 'custom-control custom-radio custom-control-inline m-0 pb-0'); flexdiv2.attr('class', 'custom-control custom-radio custom-control-inline m-0 pb-0');
flexdiv2.attr('style', 'padding-top: 2px!important;');
input1.attr('class', 'custom-control-input'); input1.attr('class', 'custom-control-input');
input2.attr('class', 'custom-control-input'); input2.attr('class', 'custom-control-input');
input1.attr('type', 'radio'); input1.attr('type', 'radio');
@ -662,8 +680,10 @@ $(document).ready(function() {
input2.attr('value', vals[1]); input2.attr('value', vals[1]);
input1.attr('name', tabPaneId + keys[key]); input1.attr('name', tabPaneId + keys[key]);
input2.attr('name', tabPaneId + keys[key]); input2.attr('name', tabPaneId + keys[key]);
label1.attr('class', 'custom-control-label form-control-sm custom-control-inline m-0 pl-1 text-muted'); label1.attr('class', 'custom-control-label form-control-sm custom-control-inline m-0 pl-0 text-muted curPoint');
label2.attr('class', 'custom-control-label form-control-sm custom-control-inline m-0 pl-1 text-muted'); label1.attr('style', 'padding-top: 2px!important;');
label2.attr('class', 'custom-control-label form-control-sm custom-control-inline m-0 pl-0 text-muted curPoint');
label2.attr('style', 'padding-top: 2px!important;');
label1.attr('for', tabPaneId + vals[0].replace(/\s/g, '')); label1.attr('for', tabPaneId + vals[0].replace(/\s/g, ''));
label2.attr('for', tabPaneId + vals[1].replace(/\s/g, '')); label2.attr('for', tabPaneId + vals[1].replace(/\s/g, ''));
label1.append(vals[0]); label1.append(vals[0]);
@ -682,20 +702,23 @@ $(document).ready(function() {
break; break;
case 1: case 1:
var element = $('<div />'); var element = $('<div />');
element.attr('class', ' d-flex flex-sm-nowrap pr-2 py-1 mb-1 form-group form-control bg-light'); //element.attr('class', ' d-flex flex-sm-nowrap pr-2 py-1 mb-1 form-group form-control bg-light');
element.attr('class', 'd-flex flex-sm-nowrap form-group form-control-sm border px-2 mb-1 pt-1 pb-0 bg-light');
var rbfieldset = $('<fieldset />'); var rbfieldset = $('<fieldset />');
flexdiv1 = $('<div />'); flexdiv1 = $('<div />');
input1 = $('<input />'); input1 = $('<input />');
label1 = $('<label />'); label1 = $('<label />');
rbfieldset.attr('id', tabPaneId + keys[key].replace(/\s/g, '')); rbfieldset.attr('id', tabPaneId + keys[key].replace(/\s/g, ''));
rbfieldset.attr('class', 'custom-control-inline monMe'); rbfieldset.attr('class', 'custom-control-inline monMe align-items-center');
flexdiv1.attr('class', 'custom-control custom-checkbox custom-control-inline'); flexdiv1.attr('class', 'custom-control custom-checkbox custom-control-inline');
input1.attr('class', 'custom-control-input'); flexdiv1.attr('style', 'padding-top: 1px!important;');
input1.attr('class', 'custom-control-input align-self-center');
input1.attr('type', 'checkbox'); input1.attr('type', 'checkbox');
input1.attr('id', tabPaneId + vals[0].replace(/\s/g, '')); input1.attr('id', tabPaneId + vals[0].replace(/\s/g, ''));
input1.attr('value', vals[0]); input1.attr('value', vals[0]);
input1.attr('name', keys[key]); input1.attr('name', keys[key]);
label1.attr('class', 'custom-control-label form-control-sm custom-control-inline m-0 pl-1 text-muted'); label1.attr('class', 'custom-control-label form-control-sm custom-control-inline p-0 text-muted curPoint align-self-start');
label1.attr('style', 'padding-top: 2px!important;');
label1.attr('for', tabPaneId + vals[0].replace(/\s/g, '')); label1.attr('for', tabPaneId + vals[0].replace(/\s/g, ''));
label1.append(vals[0]); label1.append(vals[0]);
@ -707,8 +730,9 @@ $(document).ready(function() {
break; break;
default: default:
var element = $('<div />'); var element = $('<div />');
element.attr('class', ' form-group px-0 pb-1 m-0'); element.attr('class', ' form-group p-0 pb-1 m-0');
var select = $('<select class="form-control custom-select-sm monMe bg-light text-muted border btn-outline-success"/>'); //var select = $('<select class="form-control custom-select-sm monMe bg-light text-muted border btn-outline-success"/>');
var select = $('<select class="custom-select custom-select-sm monMe bg-light text-muted border btn-outline-success"/>');
select.attr('id', tabPaneId + keys[key].replace(/\s/g, '')); select.attr('id', tabPaneId + keys[key].replace(/\s/g, ''));
select.attr('title', keys[key]); select.attr('title', keys[key]);
select.attr('name', keys[key]); select.attr('name', keys[key]);
@ -958,8 +982,8 @@ $(document).ready(function() {
$("#cla-TabContent .ui-sortable:not(:first)").each(function() { $("#cla-TabContent .ui-sortable:not(:first)").each(function() {
var sortableID = $(this)[0].id; var sortableID = $(this)[0].id;
var placeholderID = "#placeholderSort" + sortableID.slice(-1); var placeholderID = "#placeholderSort" + sortableID.slice(-1);
var iconSpan = $(this).find(".iconClClass")[0]; var iconBtn = $(this).find(".iconClClass")[0];
var iconDiv = $(iconSpan).parent()[0]; var iconDiv = $(iconBtn).parent()[0];
var activeUL = $(this).children("li").children("ul").length; var activeUL = $(this).children("li").children("ul").length;
var activeLI = 0; var activeLI = 0;
var inactiveLI = 0; var inactiveLI = 0;
@ -991,8 +1015,9 @@ $(document).ready(function() {
$("#" + sortableID).append(condLIplaceholder); $("#" + sortableID).append(condLIplaceholder);
}; };
if (inactiveLI == 0){ if (inactiveLI == 0){
$(iconSpan).attr("class","iconClClass removeCond"); $(iconBtn).attr("class","btn btn-sm btn-outline-success iconClClass removeCond text-success border rounded px-1 pb-0");
$(iconDiv).attr("class","p-0 mr-3 mt-0 text-right text-success"); $(iconBtn).prop("disabled", false);
$(iconDiv).attr("class","col-md-auto p-0 mr-2 mt-0 text-right text-success");
}; };
break; break;
case 1: case 1:
@ -1010,15 +1035,17 @@ $(document).ready(function() {
} }
$("#" + sortableID).append(condLIplaceholder); $("#" + sortableID).append(condLIplaceholder);
}; };
$(iconSpan).attr("class","iconClClass NOremoveCond"); $(iconBtn).attr("class","btn btn-sm iconClClass NOremoveCond text-muted border rounded px-1 pb-0");
$(iconDiv).attr("class","p-0 mr-3 mt-1 text-right text-muted"); $(iconBtn).prop("disabled", true);
$(iconDiv).attr("class","col-md-auto p-0 mr-2 mt-0 text-right text-muted");
break; break;
case 2: case 2:
if ($(placeholderID).length) { if ($(placeholderID).length) {
$(placeholderID).remove(); $(placeholderID).remove();
}; };
$(iconSpan).attr("class","iconClClass NOremoveCond"); $(iconBtn).attr("class","btn btn-sm iconClClass NOremoveCond text-muted border rounded px-1 pb-0");
$(iconDiv).attr("class","p-0 mr-3 mt-1 text-right text-muted"); $(iconBtn).prop("disabled", true);
$(iconDiv).attr("class","col-md-auto p-0 mr-2 mt-0 text-right text-muted");
break; break;
default: default:
if ($(placeholderID).length) { if ($(placeholderID).length) {