work in progress

This commit is contained in:
cesare 2022-04-22 09:47:19 +02:00
parent 30c6f51421
commit 3fc8c3b189
3 changed files with 273 additions and 121 deletions

View File

@ -40,12 +40,15 @@
<div class=" v-mid">
<div class="f1 fw4 i blue-60">Linking Dante Search, sandbox release</div>
<div class="f1 fw4 i blue-60">Linking Dante Search, sandbox
release</div>
<blockquote class="ph0 mh0 measure f4 lh-copy center mt0">
<cite class="ph0 mh0 measure i f4 lh-copy center">potrai cercare, e non troverai ombra</cite><br/>
<cite class="ph0 mh0 measure f4 lh-copy center">(Inf., canto 32, verso 59)</cite>
<cite class="ph0 mh0 measure i f4 lh-copy center">potrai
cercare, e non troverai ombra</cite><br /> <cite
class="ph0 mh0 measure f4 lh-copy center">(Inf., canto 32,
verso 59)</cite>
</blockquote>
</div>
</div>
@ -64,26 +67,32 @@
Grammaticale</a>
</div>
<div class="w-45 pa1 mr1">
<a class="f6 link dim br1 ba pa1 mb1 dib dark-green add-record-sint"
href="#0" value="Tipo sintattico" data-added="0">Tipo Sintattico</a>
<a
class="f6 link dim br1 ba pa1 mb1 dib dark-green add-record-sint"
href="#0" value="Tipo sintattico" data-added="0">Tipo
Sintattico</a>
</div>
<div class="w-45 pa1 mr1">
<a class="f6 link dim br1 ba pa1 mb1 dib dark-green add-record-metafora"
<a
class="f6 link dim br1 ba pa1 mb1 dib dark-green add-record-metafora"
href="#0" value="Metafora" data-added="0">Metafore</a>
</div>
<div class="w-45 pa1 mr1">
<a class="f6 link dim br1 ba pa1 mb1 dib dark-green add-record-dialogo"
<a
class="f6 link dim br1 ba pa1 mb1 dib dark-green add-record-dialogo"
href="#0" value="Dialogo" data-added="0">Dialoghi</a>
</div>
<div class="w-45 pa1 mr1">
<a class="f6 link dim br1 ba pa1 mb1 dib dark-green add-record-struttura"
href="#0" value="Struttura" data-added="0">Struttura del testo</a>
<a
class="f6 link dim br1 ba pa1 mb1 dib dark-green add-record-struttura"
href="#0" value="Struttura" data-added="0">Struttura del
testo</a>
</div>
</div>
</div>
<div class="fl w-100 w-80-ns pa4">
<div class="fl w-100 w-60-ns pa4">
<div class="bg-washed-blue pv2">
<!-- form -->
@ -120,10 +129,7 @@
</div>
<div class="flex flex-wrap" id='dettaglifiltri'>
</div>
<div class="flex flex-wrap" id='dettaglifiltri'></div>
</div>
@ -139,6 +145,9 @@
</div>
</div>
<div class="fl w-100 w-20-ns pa4">
<div class="bg-washed-blue pv2" id='filtri'>Filtri</div>
</div>
</div>
</div>
@ -205,6 +214,39 @@
</div>
</div>
<!-- TEMPLATE FILTRO -->
<div class="flex items-center justify-center pa1 bg-lightest-blue navy"
style="display: none;" id="filtrogrammaticale">
<nav class="pa1 pa1-ns">
<a class="link dim gray f6 f2-ns dib mr0 delete-written-filter" href="#"
title="Remove"><img src="./images/chiudi1.png"
style="width: 22px; height: 20px;"></a>
</nav>
<!-- <span class="lh-title ml3">Clausola grammaticale</span>-->
<div class="pa1 pa1-ns listacondizioni">
<h4 class="f6 fw6">Clausola grammaticale</h4>
<dl class="f6 lh-title mv2">
<dt class="dib b">categoria:</dt>
<dd class="dib ml0 gray">cat</dd>
</dl>
<dl class="f6 lh-title mv2">
<dt class="dib b">filtro1:</dt>
<dd class="dib ml0 gray">val1</dd>
</dl>
<dl class="f6 lh-title mv2">
<dt class="dib b">filtro2:</dt>
<dd class="dib ml0 gray">val2</dd>
</dl>
</div>
</div>
<!-- DIV DETTAGLIFILTRI -->
<div style="display: none;" id='divdettaglifiltri'>
@ -220,14 +262,17 @@
<nav class="pa1 pa1-ns">
<a class="link dim gray f6 f2-ns dib mr0 remove-filter" href="#" title="Remove"><img src="./images/chiudi1.png"
<a class="link dim gray f6 f2-ns dib mr0 remove-filter" href="#"
title="Remove"><img src="./images/chiudi1.png"
style="width: 22px; height: 20px;"></a>
<a class="link dim gray f6 f2-ns dib mr0 add-details" href="#" title="More" style="display:none"><img src="./images/more-icon.png"
style="width: 22px; height: 20px;"></a>
<a class="link dim gray f6 f2-ns dib mr0 add-details" href="#"
title="More" style="display:none"><img
src="./images/more-icon.png" style="width: 22px; height: 20px;"></a>
<!-- <a class="link dim gray f6 f2-ns dib mr0 set-filter" href="#" title="Set" style="display:none"><img src="./images/smalldone.png"
style="width: 22px; height: 20px;"></a> -->
<a class="link dim gray f6 f2-ns dib mr0 set-filter" href="#"
title="Set" style="display:none"><img
src="./images/smalldone.png" style="width: 22px; height: 20px;"></a>
</nav>
@ -841,9 +886,9 @@
<option value="temp ipo">temporale con valore ipotetico</option>
</optgroup>
</select>
<br/>
<select name="functionSyntax0" class="w-100 db h2 f6 bg-near-white ba b--sliver gray" title="Livello di subordinazione">
</select> <br /> <select name="functionSyntax0"
class="w-100 db h2 f6 bg-near-white ba b--sliver gray"
title="Livello di subordinazione">
<option value=".+">Qualsiasi livello di subordinazione</option>
<optgroup label="Livelli di subordinazione">
@ -858,11 +903,16 @@
<option value="subord vi">subordinata di VI grado</option>
<option value="subord vii">subordinata di VII grado</option>
<option value="coord i">coordinata a una subordinata di I grado</option>
<option value="coord ii">coordinata a una subordinata di II grado</option>
<option value="coord iii">coordinata a una subordinata di III grado</option>
<option value="coord iv">coordinata a una subordinata di IV grado</option>
<option value="coord v">coordinata a una subordinata di V grado</option>
<option value="coord i">coordinata a una subordinata di I
grado</option>
<option value="coord ii">coordinata a una subordinata di
II grado</option>
<option value="coord iii">coordinata a una subordinata di
III grado</option>
<option value="coord iv">coordinata a una subordinata di
IV grado</option>
<option value="coord v">coordinata a una subordinata di V
grado</option>
<option value="pcoord">pseudo-coordinata</option>

View File

@ -59,26 +59,36 @@
Clausole
<div class=" bg-washed-blue pv2">
<!--
<div class="mt3"><input class="bw0 br2 bg-dark-blue pa1 white fw1 tc tracked-tight add-record" type="submit" value="Aggiungi condizione grammaticale" data-added="0"></div>
<div class="mt3"><input class="f6 link dim br3 ba ph1 pv1 mb2 dib mid-gray add-record" value="Categoria grammaticale" data-added="0"></div>
-->
<a class="f6 link dim br1 ba ph3 pv2 mb2 dib dark-green add-record"
<div class="flex flex-column">
<div class="w-45 pa1 mr1">
<a class="f6 link dim br1 ba pa1 mb1 dib dark-green add-record"
href="#0" value="Categoria grammaticale" data-added="0">Categoria
Grammaticale</a> <a
class="f6 link dim br1 ba ph3 pv2 mb2 dib dark-green add-record-sint"
href="#0" value="Tipo sintattico" data-added="0">Tipo
Sintattico</a>
<!--
<div class="mt3"><input class="bw0 br2 bg-dark-blue pa1 white fw1 tc tracked-tight add-record-sint" type="submit" value="Aggiungi condizione sintattica" data-added="0"></div>
-->
<p>
Grammaticale</a>
</div>
<div class="w-45 pa1 mr1">
<a class="f6 link dim br1 ba pa1 mb1 dib dark-green add-record-sint"
href="#0" value="Tipo sintattico" data-added="0">Tipo Sintattico</a>
</div>
<div class="w-45 pa1 mr1">
<a class="f6 link dim br1 ba pa1 mb1 dib dark-green add-record-metafora"
href="#0" value="Metafora" data-added="0">Metafore</a>
</div>
<div class="w-45 pa1 mr1">
<a class="f6 link dim br1 ba pa1 mb1 dib dark-green add-record-dialogo"
href="#0" value="Dialogo" data-added="0">Dialoghi</a>
</div>
<div class="w-45 pa1 mr1">
<a class="f6 link dim br1 ba pa1 mb1 dib dark-green add-record-struttura"
href="#0" value="Struttura" data-added="0">Struttura del testo</a>
</div>
</div>
<div class="fl w-100 w-80-ns pa4">
</div>
</div>
<div class="fl w-100 w-60-ns pa4">
<div class="bg-washed-blue pv2">
<!-- form -->
@ -126,12 +136,27 @@
</form>
<p>
<input style="display: block;"
class="b ph3 pv2 input-reset ba b--black bg-transparent grow pointer f6"
type="submit" name="grammar" id="grammarbutton" value="Cerca"
title="Applica i criteri di ricerca">
<div class="flex items-center justify-left pa2">
<a href="#0" class="f6 no-underline black bg-animate hover-bg-black hover-white inline-flex items-center pa3 ba border-box mr4" id="grammarbutton">
<span class="pl1">Cerca</span>
</a>
<a href="#0" class="f6 no-underline black bg-animate hover-bg-black hover-white inline-flex items-center pa3 ba border-box" id="resetcriteria">
<span class="pr1">Annulla</span>
</a>
</div>
</p>
</div>
</div>
<div class="fl w-100 w-20-ns pa4">
<div class="bg-washed-blue pv2" id='filtri'>
Filtri
</div>
</div>
</div>
@ -200,19 +225,47 @@
</div>
</div>
<!-- TEMPLATE FILTRO -->
<div class="flex items-center justify-center pa4 bg-lightest-blue navy" style="display: none;" id="filtrogrammaticale">
<span class="lh-title ml3">clausola grammaticale</span>
</div>
<!-- DIV DETTAGLIFILTRI -->
<div style="display: none;" id='divdettaglifiltri'>
<div style="display: none;" id='dettaglifiltri'>
<div class="flex flex-wrap" id='dettaglifiltritemplate'></div>
</div>
<!-- CATEGORIA GRAMMATICALE -->
<div style="display: none;" id='categoriagrammaticale'>
<div class="outline w-25">
<div class="flex flex-column">
<div class="outline w-100 pa4 mr2">
<nav class="pa1 pa1-ns">
<a class="link dim gray f6 f2-ns dib mr0 remove-filter" href="#" title="Remove"><img src="./images/chiudi1.png"
style="width: 22px; height: 20px;"></a>
<a class="link dim gray f6 f2-ns dib mr0 add-details" href="#" title="More" style="display:none"><img src="./images/more-icon.png"
style="width: 22px; height: 20px;"></a>
<!-- <a class="link dim gray f6 f2-ns dib mr0 set-filter" href="#" title="Set" style="display:none"><img src="./images/smalldone.png"
style="width: 22px; height: 20px;"></a> -->
</nav>
<div class="outline w-100 pa1 mr1">
<select id="types"
class="w-100 db h2 f6 bg-near-white ba b--sliver gray catgram"
name="categoria" onchange="" title="Macro categoria">
@ -248,15 +301,7 @@
</optgroup>
</select>
</div>
<div class="outline w-100 pa1 mr2">
<a class="f6 link dim br1 ba ph1 mb2 dib dark-green w-40 remove-filter"
href="#0" value="rimuovi" data-added="0">Rimuovi</a>
<a class="f6 link dim br1 ba ph1 mb2 dib dark-green w-40 add-details"
href="#0" value="dettagli" data-added="0" style="display:none" >Filtri categoria</a>
</div>
</div>
</div>
@ -270,7 +315,12 @@
<div style="display: none;" id='tiposintattico'>
<div class="outline w-25 pv4 ph1">
<select id="synttypes"
class="w-100 db h2 f6 bg-near-white ba b--sliver gray"
name="typeSyntax0" title="Tipo sintattico" value="oggetto">
@ -821,6 +871,36 @@
<option value="temp ipo">temporale con valore ipotetico</option>
</optgroup>
</select>
<br/>
<select name="functionSyntax0" class="w-100 db h2 f6 bg-near-white ba b--sliver gray" title="Livello di subordinazione">
<option value=".+">Qualsiasi livello di subordinazione</option>
<optgroup label="Livelli di subordinazione">
<option value="princ">principale</option>
<option value="coord">coordinata a una principale</option>
<option value="subord i">subordinata di I grado</option>
<option value="subord ii">subordinata di II grado</option>
<option value="subord iii">subordinata di III grado</option>
<option value="subord iv">subordinata di IV grado</option>
<option value="subord v">subordinata di V grado</option>
<option value="subord vi">subordinata di VI grado</option>
<option value="subord vii">subordinata di VII grado</option>
<option value="coord i">coordinata a una subordinata di I grado</option>
<option value="coord ii">coordinata a una subordinata di II grado</option>
<option value="coord iii">coordinata a una subordinata di III grado</option>
<option value="coord iv">coordinata a una subordinata di IV grado</option>
<option value="coord v">coordinata a una subordinata di V grado</option>
<option value="pcoord">pseudo-coordinata</option>
<option value="parent">parentetica</option>
<option value="coord 0">coordinata a una parentetica</option>
</optgroup>
</select>
</div>
</div>

View File

@ -136,6 +136,8 @@ $(document).ready(function() {
var categorieJson = $.extend({}, pronomeJson, aggettivoJson, articoloJson, avverbioJson, preposizioneJson, congiunzioneJson, onomasticacitazioneJson);
var categoriaGrammaticaleFiltro='none'
$('.tabs__menu-item').on('click', function() {
$(this).addClass('bg-white').addClass('red');
$(this).siblings().removeClass('bg-white').removeClass('red');
@ -184,11 +186,14 @@ $(document).ready(function() {
sbs.find(".add-details").attr('style', 'display.block')
sbs.find(".set-filter").attr('style', 'display.block')
alert(pare.id)
containerid = 'dettaglio_' + pare.id;//$(this).closest('div').attr('id')
sbs.find(".add-details").attr('target', containerid)
sbs.find(".set-filter").attr('target', containerid)
//if ($('#types').find(":selected").val()=='verbovolgare'){
categoriaGrammaticaleFiltro=$(this).val();
if ($(this).val() == 'verbovolgare') {
var content = jQuery('#categoriaverbo >div'),
@ -316,7 +321,8 @@ $(document).ready(function() {
if (element === undefined) {
var test = jQuery('#' + containerid)
sbs.find(".add-details").attr('style', 'display:none')
sbs.find(".add-details").attr('style', 'display.none')
sbs.find(".set-filter").attr('style', 'display.none')
test.remove()
}
else
@ -397,6 +403,22 @@ $(document).ready(function() {
return false;
}
});
// scrittura del filtro
jQuery(document).delegate('a.set-filter', 'click', function(e) {
e.preventDefault();
var content = jQuery('#filtrogrammaticale'),
size = jQuery('#filtri >div').length + 1,
element = null,
element = content.clone();
alert(categoriaGrammaticaleFiltro + " "+size)
element.attr('id', 'filtro-' + size);
element.find('.delete-written-filter').attr('target','filtro-'+size);
element.attr('style','display.block');
element.appendTo('#filtri');
})
jQuery(document).delegate('a.add-details', 'click', function(e) {
e.preventDefault();