PageSourceSearch

https://old.comune.catanzaro.it/wp-content/themes/italiawp-child/assets/catanzaro.js

js comune.catanzaro.it collected 2026-10-02 19:17:34 UTC 4,845 bytes, 136 lines download raw bytes

1$(window).load(function () {
2    $(window).scroll(function(){
3        var scrollTop = 200;
4        if($(window).scrollTop() >= scrollTop){
5            $(".Header").addClass("scrolled");
6           
7        }
8        if($(window).scrollTop() < scrollTop){
9            $(".Header").removeClass("scrolled");
10        }
11    })
12
13    if($(".bannerImage").length>0){
14        var currentH=0;
15        $(".bannerImage").each(function(){
16            if($(this).height()>currentH){
17                currentH = $(this).height();
18            }
19        });
20        $(".bannerImage").css("height",currentH+"px");
21    }
22
23});
24
25$(document).ready(function () {
26
27    if($(document).width()>=768){
28        if($(".multimediabox").length>0){
29            var h = 0;
30            $(".multimediabox").each(function(){
31                if($(this).height()>h){
32                    h = $(this).height();
33                }
34            });
35            $(".multimediabox").css("height",h);
36        }
37    }
38
39    $("#calendarEvents").zabuto_calendar({
40        language: "it",
41        action_nav: function () {
42            return myNavFunction(this.id);
43        },
44        ajax: {
45            url: "/wp-admin/admin-ajax.php?action=eventsCalendar",
46            modal: true
47        }
48    });
49    function myNavFunction(id) {
50        $("#date-popover").hide();
51        var nav = $("#" + id).data("navigation");
52        var to = $("#" + id).data("to");
53        console.log('nav ' + nav + ' to: \ + to.month + to.year');
54    }
55    $(document).on("click", '.nextButton', function(event) { 
56        var currentP = parseInt($(".currentPage").html());
57        $(".currentPage").html(currentP+1);
58        clickSearchEvents();
59    });
60    $(document).on("click", '.backButton', function(event) { 
61        var currentP = parseInt($(".currentPage").html());
62        $(".currentPage").html(currentP-1);
63        clickSearchEvents();
64    });
65    $(".Icon-search").click(function(event) { 
66        $(".Header-search").attr('style', 'display: block !important');
67    });
68    $(".Icon-close").click(function(event) { 
69        $(".Header-search").removeAttr('style');
70    });
71
72    
73
74    function clickSearchEvents(){
75        var currentPage = parseInt($(".currentPage").html());
76        var name = $("#eventoNome").val();
77        var tipologia = $("#eventoTipologia").val();
78        var date = $("input[name='date']:checked").val();
79        if(date=="undefined"){
80            date = 0;
81        }
82        $.ajax({
83            type: "GET",
84            url: "/wp-admin/admin-ajax.php",
85            data: "action=searchEvents&name="+name+"&tipologia="+tipologia+"&data="+date+"&pag="+currentPage,
86            dataType: "json",
87            success: function(risposta){
88                var html="<div>Il sistema ha trovato: "+risposta.items+" elementi</div>";
89                $(".currentPage").html(risposta.page)
90                $.each(risposta.data, function(i, item) {
91                    html = html+ "<div class='itemS'><div class='img'><img src='"+item.image+"' /></div>";
92                    html = html +"<div class='conentItem'><a href='"+item.guid+"'><div class='t'>"+item.title+"</div></a>";
93                    html = html +"<div class='c'>"+item.content+"</div><div class='d'>"+item.date+"</div></div><div class='clearfix'></div></div>";
94                });
95                if (risposta.all_pages > 1){
96                    if (risposta.page > 1){
97                        html = html +"<div class='btn btn-primary backButton'>Torna Indietro</div>";
98                    } 
99                    if (risposta.all_pages > risposta.page){
100                        html = html + "<div class='btn btn-primary nextButton'>Altri risutati</div>";
101                    } 
102                  }
103
104
105                $(".risSearch").html(html);
106            },
107            // ed una per il caso di fallimento
108            error: function(){
109              alert("Chiamata fallita!!!");
110            }
111          });
112    }
113
114    $(".btnSearchEvents").click(function(){
115        clickSearchEvents();
116    });
117
118    if($(".at-tableclass").length>0){
119        $(".at-tableclass a").each(function(){
120            var t = $(this).text();
121            if(t=="FAQ Concorso Istruttore Contabile" 
122            || t=="FAQ Concorso Istruttore Amministrativo" 
123            || t=="Procedura Affidamenti Lavori"
124            || t=="Liste di attesa"){
125                $(this).parent().remove();
126            }
127            if(t=="Concorsi"){
128                $(this).text("Concorsi Attivi");
129            }
130            if(t=="Dichiarazioni sostitutive e acquisizione d'ufficio dei dati"){
131                var parent = $(this).parent();
132                parent.append('<li><a target="_blank" href="https://dema.comunecatanzaro.it/portale/" title="Servizi e procedimenti online">Servizi e procedimenti online</a></li>');
133            }
134        });
135    }
136});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.