229 lines
6.2 KiB
JavaScript
229 lines
6.2 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);
|
|
$('#close_condizioni').css({'opacity' : 0.40});;
|
|
$('#close_dove').css({'opacity' : 0.40});
|
|
|
|
$("#cla-TabContent").attr('style', "display: block;");
|
|
$("#DoveInferno").attr('style', "display: none;");
|
|
|
|
$("#cla-Advanced").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('#selectInferno', 'click', function(e) {
|
|
e.preventDefault();
|
|
|
|
$('.labelCantica span').html("Inferno");
|
|
|
|
|
|
return true;
|
|
});
|
|
|
|
jQuery(document).delegate('#selectPurgatorio', 'click', function(e) {
|
|
e.preventDefault();
|
|
|
|
$('.labelCantica span').html("Purgatorio");
|
|
|
|
return true;
|
|
});
|
|
|
|
|
|
jQuery(document).delegate('#selectParadiso', 'click', function(e) {
|
|
e.preventDefault();
|
|
|
|
$('.labelCantica span').html("Paradiso");
|
|
|
|
return true;
|
|
});
|
|
|
|
|
|
|
|
jQuery(document).delegate('#close_cerca', 'click', function(e) {
|
|
e.preventDefault();
|
|
|
|
|
|
$('#apricerca').css({'opacity' : 0.25});
|
|
|
|
|
|
$('#browseArea').css('opacity', '1');
|
|
$('#PagineCanti').prop("disabled", false);
|
|
$('#PagineCanti').css('overflow', 'auto');
|
|
$('#close_condizioni').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-Advanced").attr('style', "display: none;");
|
|
|
|
|
|
});
|
|
jQuery(document).delegate('#close_dove', 'click', function(e) {
|
|
e.preventDefault();
|
|
$('#close_condizioni').css({'opacity' : 0.40});;
|
|
$('#close_dove').css({'opacity' : 1});
|
|
$('#close_cerca').css({'opacity' : 0.40});
|
|
$("#cla-TabContent").attr('style', "display: none;");
|
|
$("#cla-Advanced").attr('style', "display: none;");
|
|
$("#DoveInferno").attr('style', "display: block;");
|
|
|
|
});
|
|
jQuery(document).delegate('#close_condizioni', 'click', function(e) {
|
|
e.preventDefault();
|
|
$('#close_condizioni').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-Advanced").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');
|
|
$('#browseArea').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');
|
|
$('#browseArea').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('#browseArea', '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)");
|
|
$('#browseArea').css('opacity', '1');
|
|
$('#PagineCanti').prop("disabled", false);
|
|
$('#PagineCanti').css('overflow', 'auto');
|
|
$('#occorrenze').attr('style', "display:block;")
|
|
|
|
return true;
|
|
}
|
|
|
|
}); |