LiDa_Search/js/NikBrowseSearchCombinedNew.js

261 lines
7.5 KiB
JavaScript
Raw Normal View History

2022-11-08 17:31:52 +01:00
/**
*
*/
$(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});;
2022-11-10 16:56:03 +01:00
$('#close_dove').css({'opacity' : 0.40});
2022-11-08 17:31:52 +01:00
2022-11-10 17:35:14 +01:00
$("#cla-TabContent").attr('style', "display: block;");
2022-11-14 17:50:26 +01:00
$("#DoveInferno").attr('style', "display: none;");
$("#cla_Grammaticale").attr('style', "display: none;");
$("#cla-Sintattico").attr('style', "display: none;");
2022-11-08 17:31:52 +01:00
$('.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) {
2022-11-08 17:31:52 +01:00
e.preventDefault();
$('.labelCantica span').html("Inferno");
$('#cantica2').css({'opacity' : 0.40});
$('#cantica3').css({'opacity' : 0.40});
$(this).css({'opacity' : 1});
2022-11-08 17:31:52 +01:00
return true;
});
jQuery(document).delegate('#cantica2', 'click', function(e) {
2022-11-08 17:31:52 +01:00
e.preventDefault();
$('.labelCantica span').html("Purgatorio");
$('#cantica1').css({'opacity' : 0.40});
$('#cantica3').css({'opacity' : 0.40});
2022-11-08 17:31:52 +01:00
$(this).css({'opacity' : 1});
2022-11-08 17:31:52 +01:00
return true;
});
jQuery(document).delegate('#cantica3', 'click', function(e) {
2022-11-08 17:31:52 +01:00
e.preventDefault();
$('.labelCantica span').html("Paradiso");
$('#cantica1').css({'opacity' : 0.40});
$('#cantica2').css({'opacity' : 0.40});
$(this).css({'opacity' : 1});
2022-11-08 17:31:52 +01:00
return true;
});
jQuery(document).delegate('#close_cerca', 'click', function(e) {
e.preventDefault();
2022-11-10 16:56:03 +01:00
2022-11-08 17:31:52 +01:00
$('#apricerca').css({'opacity' : 0.25});
$('#displaycanto').css('opacity', '1');
2022-11-08 17:31:52 +01:00
$('#PagineCanti').prop("disabled", false);
$('#PagineCanti').css('overflow', 'auto');
$('#tab_grammaticale').css({'opacity' : 0.40});
$('#tab_sintattica').css({'opacity' : 0.40});;
2022-11-10 16:56:03 +01:00
$('#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;");
2022-11-10 16:56:03 +01:00
});
jQuery(document).delegate('#close_dove', 'click', function(e) {
e.preventDefault();
$('#tab_grammaticale').css({'opacity' : 0.40});
$('#tab_sintattica').css({'opacity' : 0.40});;
2022-11-10 16:56:03 +01:00
$('#close_dove').css({'opacity' : 1});
$('#close_cerca').css({'opacity' : 0.40});
$("#cla-TabContent").attr('style', "display: none;");
$("#cla_Grammaticale").attr('style', "display: none;");
2022-11-10 16:56:03 +01:00
$("#DoveInferno").attr('style', "display: block;");
$("#cla-Sintattico").attr('style', "display: none;");
2022-11-08 17:31:52 +01:00
});
jQuery(document).delegate('#tab_grammaticale', 'click', function(e) {
2022-11-10 16:56:03 +01:00
e.preventDefault();
$('#tab_grammaticale').css({'opacity' : 1});
$('#tab_sintattica').css({'opacity' : 0.40});;
2022-11-10 16:56:03 +01:00
$('#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;");
2022-11-10 16:56:03 +01:00
});
2022-11-08 17:31:52 +01:00
jQuery(document).delegate('#BottoneCerca', 'click', function(e) {
e.preventDefault();
$("#loader").show();
setTimeout(function() {
$("#loader").hide();
fakeResult();
2022-11-10 20:04:55 +01:00
}, 1000);
2022-11-08 17:31:52 +01:00
}
)
jQuery(document).delegate('a.selectInferno1', 'click', function(e) {
e.preventDefault();
//var areaText = $('#PagineCanti');
$('#displaycanto').css('opacity', '1');
2022-11-10 17:35:14 +01:00
$('#apricerca').css('opacity', '0.4');
2022-11-08 17:31:52 +01:00
$('#PagineCanti').highlightWithinTextarea({
highlight: 'paura',
className: 'red'
});
});
jQuery(document).delegate('#apricerca', 'click', function(e) {
e.preventDefault();
$(this).css('opacity', '1');
$('#displaycanto').css('opacity', '0.4');
2022-11-14 17:50:26 +01:00
//$('.labelVai span').html("Cerca in:");
2022-11-08 17:31:52 +01:00
$('#lemma_forma').prop("disabled", false);
$('#opzioni_testo').prop("disabled", false);
$('#BottoneCerca').prop("disabled", false);
$('#advanSW').prop('checked',false)
2022-11-14 17:50:26 +01:00
$(".risultatiRicerca").attr('style', "display: none;");
$('.labelRisultatoRicerca span').attr('style', "display:none;")
2022-11-08 17:31:52 +01:00
});
jQuery(document).delegate('#displaycanto', 'click', function(e) {
2022-11-08 17:31:52 +01:00
e.preventDefault();
$(this).css('opacity', '1');
$('#apricerca').css('opacity', '0.4');
2022-11-14 17:50:26 +01:00
//$('.labelVai span').html("Vai a:");
2022-11-08 17:31:52 +01:00
$('#lemma_forma').prop("disabled", true);
$('#opzioni_testo').prop("disabled", true);
$('#BottoneCerca').prop("disabled", true);
});
function fakeResult(){
2022-11-10 15:01:11 +01:00
$('#ResultCantiInferno').empty()
$('#ResultCantiPurgatorio').empty()
$('#ResultCantiParadiso').empty()
2022-11-08 17:31:52 +01:00
2022-11-10 15:01:11 +01:00
2022-11-08 17:31:52 +01:00
tabellaCanti ="";
2022-11-10 15:01:11 +01:00
2022-11-08 17:31:52 +01:00
tabellaCanti = tabellaCanti +
2022-11-10 15:01:11 +01:00
'<a class="f5 link dim br1 bn pa0 mb0 dib dark-red selectParadiso' + 20 +
'href="#0" data-added="0">'+'XX(3)'+'</a> ';
2022-11-08 17:31:52 +01:00
tabellaCanti = tabellaCanti +
2022-11-10 15:01:11 +01:00
'<a class="f5 link dim br1 bn pa0 mb0 dib dark-red selectParadiso' + 30 +
'href="#0" data-added="0">'+'XXX(2)'+'</a> ';
2022-11-08 17:31:52 +01:00
2022-11-10 15:01:11 +01:00
$('#ResultCantiParadiso').append(tabellaCanti);
$('#ResultCantiParadiso').attr('style', "display:block;")
$('.labelRisultatoParadiso span').attr('style', "display:block;")
2022-11-14 17:50:26 +01:00
2022-11-08 17:31:52 +01:00
tabellaCanti ="";
tabellaCanti = tabellaCanti +
2022-11-10 15:01:11 +01:00
'<a class="f5 link dim br1 bn pa0 mb0 dib dark-red selectPurgatorio' + 10 +
'href="#0" data-added="0">'+'X(4)'+'</a> ';
2022-11-08 17:31:52 +01:00
2022-11-10 15:01:11 +01:00
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;")
2022-11-08 17:31:52 +01:00
tabellaCanti ="";
tabellaCanti = tabellaCanti +
'<a class="f5 link dim br1 bn pa0 mb0 dib dark-red selectInferno' + '1' +
2022-11-10 15:01:11 +01:00
' href="#0" data-added="0">'+'I(5)'+'</a> ';
2022-11-08 17:31:52 +01:00
tabellaCanti = tabellaCanti +
2022-11-10 15:01:11 +01:00
'<a class="f5 link dim br1 bn pa0 mb0 dib dark-red selectInferno' + '15' +
' href="#0" data-added="0">'+'XV(1)'+'</a> ';
2022-11-08 17:31:52 +01:00
2022-11-10 15:01:11 +01:00
2022-11-08 17:31:52 +01:00
2022-11-10 15:01:11 +01:00
$('#ResultCantiInferno').append(tabellaCanti);
$('#ResultCantiInferno').attr('style', "display:block;")
$('.labelRisultatoInferno span').attr('style', "display:block;")
$('.labelRisultatoRicerca span').attr('style', "display:block;")
2022-11-14 17:50:26 +01:00
$(".risultatiRicerca").attr('style', "display: block;");
2022-11-10 15:01:11 +01:00
2022-11-08 17:31:52 +01:00
$('#apricerca').css({'opacity' : 0.25});
2022-11-10 15:01:11 +01:00
$('.labelRisultatoParadiso').text("Paradiso (5)");
$('.labelRisultatoInferno').text("Inferno (6)");
$('.labelRisultatoPurgatorio').text("Purgatorio (6)");
$('#displaycanto').css('opacity', '1');
2022-11-08 17:31:52 +01:00
$('#PagineCanti').prop("disabled", false);
$('#PagineCanti').css('overflow', 'auto');
$('#occorrenze').attr('style', "display:block;")
return true;
}
});