261 lines
7.5 KiB
JavaScript
261 lines
7.5 KiB
JavaScript
/**
|
|
*
|
|
*/
|
|
|
|
|
|
$(document).ready(function() {
|
|
grammarconditions = 0
|
|
sintconditions = 0
|
|
filterconditions = 0
|
|
|
|
|
|
$('#apricerca').css({'opacity' : 0.25});
|
|
$('#lemma_forma').prop("disabled", true);
|
|
$('#opzioni_testo').prop("disabled", true);
|
|
$('#BottoneCerca').prop("disabled", true);
|
|
$('#tab_grammaticale').css({'opacity' : 0.40});
|
|
$('#tab_sintattica').css({'opacity' : 0.40});;
|
|
|
|
$('#close_dove').css({'opacity' : 0.40});
|
|
|
|
$("#cla-TabContent").attr('style', "display: block;");
|
|
$("#DoveInferno").attr('style', "display: none;");
|
|
|
|
$("#cla_Grammaticale").attr('style', "display: none;");
|
|
$("#cla-Sintattico").attr('style', "display: none;");
|
|
|
|
$('.tabs__menu-item').on('click', function() {
|
|
$(this).addClass('bg-white').addClass('red');
|
|
$(this).siblings().removeClass('bg-white').removeClass('red');
|
|
});
|
|
|
|
|
|
var tabellaCanti ="";
|
|
|
|
|
|
|
|
jQuery(document).delegate('#cantica1', 'click', function(e) {
|
|
e.preventDefault();
|
|
|
|
$('.labelCantica span').html("Inferno");
|
|
|
|
$('#cantica2').css({'opacity' : 0.40});
|
|
$('#cantica3').css({'opacity' : 0.40});
|
|
|
|
$(this).css({'opacity' : 1});
|
|
|
|
return true;
|
|
});
|
|
|
|
jQuery(document).delegate('#cantica2', 'click', function(e) {
|
|
e.preventDefault();
|
|
|
|
$('.labelCantica span').html("Purgatorio");
|
|
$('#cantica1').css({'opacity' : 0.40});
|
|
$('#cantica3').css({'opacity' : 0.40});
|
|
|
|
$(this).css({'opacity' : 1});
|
|
return true;
|
|
});
|
|
|
|
|
|
jQuery(document).delegate('#cantica3', 'click', function(e) {
|
|
e.preventDefault();
|
|
|
|
$('.labelCantica span').html("Paradiso");
|
|
|
|
$('#cantica1').css({'opacity' : 0.40});
|
|
$('#cantica2').css({'opacity' : 0.40});
|
|
|
|
$(this).css({'opacity' : 1});
|
|
return true;
|
|
});
|
|
|
|
|
|
|
|
jQuery(document).delegate('#close_cerca', 'click', function(e) {
|
|
e.preventDefault();
|
|
|
|
|
|
$('#apricerca').css({'opacity' : 0.25});
|
|
|
|
|
|
$('#displaycanto').css('opacity', '1');
|
|
$('#PagineCanti').prop("disabled", false);
|
|
$('#PagineCanti').css('overflow', 'auto');
|
|
$('#tab_grammaticale').css({'opacity' : 0.40});
|
|
$('#tab_sintattica').css({'opacity' : 0.40});;
|
|
$('#close_dove').css({'opacity' : 0.40});
|
|
$('#close_cerca').css({'opacity' : 1});
|
|
$("#cla-TabContent").attr('style', "display: block;");
|
|
$("#DoveInferno").attr('style', "display: none;");
|
|
$("#cla_Grammaticale").attr('style', "display: none;");
|
|
$("#cla-Sintattico").attr('style', "display: none;");
|
|
|
|
|
|
});
|
|
jQuery(document).delegate('#close_dove', 'click', function(e) {
|
|
e.preventDefault();
|
|
$('#tab_grammaticale').css({'opacity' : 0.40});
|
|
$('#tab_sintattica').css({'opacity' : 0.40});;
|
|
$('#close_dove').css({'opacity' : 1});
|
|
$('#close_cerca').css({'opacity' : 0.40});
|
|
$("#cla-TabContent").attr('style', "display: none;");
|
|
$("#cla_Grammaticale").attr('style', "display: none;");
|
|
$("#DoveInferno").attr('style', "display: block;");
|
|
$("#cla-Sintattico").attr('style', "display: none;");
|
|
|
|
});
|
|
jQuery(document).delegate('#tab_grammaticale', 'click', function(e) {
|
|
e.preventDefault();
|
|
$('#tab_grammaticale').css({'opacity' : 1});
|
|
$('#tab_sintattica').css({'opacity' : 0.40});;
|
|
$('#close_dove').css({'opacity' : 0.40});
|
|
$('#close_cerca').css({'opacity' : 0.40});
|
|
$("#cla-TabContent").attr('style', "display: none;");
|
|
$("#DoveInferno").attr('style', "display: none;");
|
|
$("#cla_Grammaticale").attr('style', "display: block;");
|
|
$("#cla-Sintattico").attr('style', "display: none;");
|
|
|
|
|
|
});
|
|
jQuery(document).delegate('#tab_sintattica', 'click', function(e) {
|
|
e.preventDefault();
|
|
$('#tab_grammaticale').css({'opacity' : 0.40});
|
|
$('#tab_sintattica').css({'opacity' : 1});;
|
|
$('#close_dove').css({'opacity' : 0.40});
|
|
$('#close_cerca').css({'opacity' : 0.40});
|
|
$("#cla-TabContent").attr('style', "display: none;");
|
|
$("#DoveInferno").attr('style', "display: none;");
|
|
$("#cla_Grammaticale").attr('style', "display: none;");
|
|
$("#cla-Sintattico").attr('style', "display: block;");
|
|
|
|
|
|
});
|
|
|
|
jQuery(document).delegate('#BottoneCerca', 'click', function(e) {
|
|
e.preventDefault();
|
|
$("#loader").show();
|
|
setTimeout(function() {
|
|
$("#loader").hide();
|
|
fakeResult();
|
|
}, 1000);
|
|
}
|
|
)
|
|
|
|
jQuery(document).delegate('a.selectInferno1', 'click', function(e) {
|
|
e.preventDefault();
|
|
//var areaText = $('#PagineCanti');
|
|
$('#displaycanto').css('opacity', '1');
|
|
$('#apricerca').css('opacity', '0.4');
|
|
$('#PagineCanti').highlightWithinTextarea({
|
|
highlight: 'paura',
|
|
className: 'red'
|
|
});
|
|
});
|
|
|
|
jQuery(document).delegate('#apricerca', 'click', function(e) {
|
|
e.preventDefault();
|
|
|
|
$(this).css('opacity', '1');
|
|
$('#displaycanto').css('opacity', '0.4');
|
|
//$('.labelVai span').html("Cerca in:");
|
|
$('#lemma_forma').prop("disabled", false);
|
|
$('#opzioni_testo').prop("disabled", false);
|
|
$('#BottoneCerca').prop("disabled", false);
|
|
$('#advanSW').prop('checked',false)
|
|
$(".risultatiRicerca").attr('style', "display: none;");
|
|
$('.labelRisultatoRicerca span').attr('style', "display:none;")
|
|
|
|
|
|
});
|
|
|
|
jQuery(document).delegate('#displaycanto', 'click', function(e) {
|
|
e.preventDefault();
|
|
|
|
$(this).css('opacity', '1');
|
|
$('#apricerca').css('opacity', '0.4');
|
|
//$('.labelVai span').html("Vai a:");
|
|
$('#lemma_forma').prop("disabled", true);
|
|
$('#opzioni_testo').prop("disabled", true);
|
|
$('#BottoneCerca').prop("disabled", true);
|
|
|
|
|
|
});
|
|
|
|
|
|
function fakeResult(){
|
|
|
|
$('#ResultCantiInferno').empty()
|
|
$('#ResultCantiPurgatorio').empty()
|
|
$('#ResultCantiParadiso').empty()
|
|
|
|
|
|
|
|
tabellaCanti ="";
|
|
|
|
|
|
tabellaCanti = tabellaCanti +
|
|
'<a class="f5 link dim br1 bn pa0 mb0 dib dark-red selectParadiso' + 20 +
|
|
'href="#0" data-added="0">'+'XX(3)'+'</a> ';
|
|
|
|
|
|
tabellaCanti = tabellaCanti +
|
|
'<a class="f5 link dim br1 bn pa0 mb0 dib dark-red selectParadiso' + 30 +
|
|
'href="#0" data-added="0">'+'XXX(2)'+'</a> ';
|
|
|
|
|
|
$('#ResultCantiParadiso').append(tabellaCanti);
|
|
$('#ResultCantiParadiso').attr('style', "display:block;")
|
|
$('.labelRisultatoParadiso span').attr('style', "display:block;")
|
|
|
|
tabellaCanti ="";
|
|
|
|
|
|
tabellaCanti = tabellaCanti +
|
|
'<a class="f5 link dim br1 bn pa0 mb0 dib dark-red selectPurgatorio' + 10 +
|
|
'href="#0" data-added="0">'+'X(4)'+'</a> ';
|
|
|
|
|
|
tabellaCanti = tabellaCanti +
|
|
'<a class="f5 link dim br1 bn pa0 mb0 dib dark-red selectPurgatorio' + 25 +
|
|
'href="#0" data-added="0">'+'XXV(2)'+'</a> ';
|
|
|
|
|
|
$('#ResultCantiPurgatorio').append(tabellaCanti);
|
|
$('#ResultCantiPurgatorio').attr('style', "display:block;")
|
|
$('.labelRisultatoPurgatorio span').attr('style', "display:block;")
|
|
|
|
tabellaCanti ="";
|
|
|
|
tabellaCanti = tabellaCanti +
|
|
'<a class="f5 link dim br1 bn pa0 mb0 dib dark-red selectInferno' + '1' +
|
|
' href="#0" data-added="0">'+'I(5)'+'</a> ';
|
|
|
|
tabellaCanti = tabellaCanti +
|
|
'<a class="f5 link dim br1 bn pa0 mb0 dib dark-red selectInferno' + '15' +
|
|
' href="#0" data-added="0">'+'XV(1)'+'</a> ';
|
|
|
|
|
|
|
|
$('#ResultCantiInferno').append(tabellaCanti);
|
|
$('#ResultCantiInferno').attr('style', "display:block;")
|
|
$('.labelRisultatoInferno span').attr('style', "display:block;")
|
|
$('.labelRisultatoRicerca span').attr('style', "display:block;")
|
|
$(".risultatiRicerca").attr('style', "display: block;");
|
|
|
|
$('#apricerca').css({'opacity' : 0.25});
|
|
|
|
|
|
$('.labelRisultatoParadiso').text("Paradiso (5)");
|
|
$('.labelRisultatoInferno').text("Inferno (6)");
|
|
$('.labelRisultatoPurgatorio').text("Purgatorio (6)");
|
|
$('#displaycanto').css('opacity', '1');
|
|
$('#PagineCanti').prop("disabled", false);
|
|
$('#PagineCanti').css('overflow', 'auto');
|
|
$('#occorrenze').attr('style', "display:block;")
|
|
|
|
return true;
|
|
}
|
|
|
|
}); |