1function adm_init() { 2 adm_chgraph_init(); 3 adm_chdomain_init(); 4 adm_chftp_init(); 5} 6 7function adm_chftp_init() { 8 $("a[href]").each(function() { 9 var url_add; 10 var url_add_mod; 11 url_add=$(this).attr("href"); 12 var url_add_tmp=url_add; 13 // data-senna-off="true" 14 url_add=url_add.replace("ftp://ftp.finanze.it", "https://swdownload1.agenziaentrate.gov.it"); 15 url_add=url_add.replace("ftp://ftpmdf.finanze.it", "https://swdownload2.agenziaentrate.gov.it"); 16 url_add=url_add.replace("http://www1.adm.gov.it", "https://www.adm.gov.it/statici"); 17 url_add=url_add.replace("https://www1.adm.gov.it", "https://www.adm.gov.it/statici"); 18 url_add=url_add.replace("http://www1.agenziadoganemonopoli.gov.it", "https://www.adm.gov.it/statici"); 19 url_add=url_add.replace("https://www1.agenziadoganemonopoli.gov.it", "https://www.adm.gov.it/statici"); 20 $(this).attr("href", url_add); 21 if (url_add_tmp !== url_add ) 22 $(this).attr("data-senna-off","true"); 23 }); 24 25} 26 27function adm_chgraph_init() { 28 29 $("a[href]").each(function() { 30 var url_add; 31 var url_add_mod; 32 url_add=$(this).attr("href"); 33 url_add=url_add.replace("TelematicoServiziDiUtilitaWeb/", "TelematicoServiziDiUtilitaWebNG/"); 34 url_add=url_add.replace("TelematicoInvioFileWEB/", "TelematicoInvioFileWEBNG/"); 35 $(this).attr("href", url_add); 36 }); 37 38} 39 40function adm_chdomain_init() { 41 42 43 $("a[href]").each(function() { 44 var url_add; 45 var url_add_mod; 46 url_add=$(this).attr("href"); 47 url_add=url_add.replace("//sso.agenziadoganemonopoli.gov.it/", "//sso.adm.gov.it/"); 48 url_add=url_add.replace("//ssotest.agenziadoganemonopoli.gov.it/", "//ssotest.adm.gov.it/"); 49 url_add=url_add.replace("//telematico.agenziadoganemonopoli.gov.it/", "//telematico.adm.gov.it/"); 50 url_add=url_add.replace("telematicoval.agenziadoganemonopoli.gov.it", "telematicoval.adm.gov.it"); 51 url_add=url_add.replace("//telematicoprova.agenziadogane.it/", "//telematicoprova.adm.gov.it/"); 52 url_add=url_add.replace("//telematicoprova.agenziadoganemonopoli.gov.it/", "//telematicoprova.adm.gov.it/"); 53 url_add=url_add.replace("//stdru.agenziadoganemonopoli.gov.it/", "//stdru.adm.gov.it/"); 54 url_add=url_add.replace("//stdru.agenziadogane.it/", "//stdru.adm.gov.it/"); 55 url_add=url_add.replace("//richiestamodifiche.agenziadoganemonopoli.gov.it/", "//richiestamodifiche.adm.gov.it/"); 56 url_add=url_add.replace("//aidaservizi.agenziadogane.it/", "//aidaservizi.adm.gov.it/"); 57 url_add=url_add.replace("//odv.aams.it/", "//odv.adm.gov.it/"); 58 url_add=url_add.replace("//odvval.aams.it/", "//odvval.adm.gov.it/"); 59 url_add=url_add.replace("//aidaonline85.agenziadoganemonopoli.gov.it/", "//aidaonline85.adm.gov.it/"); 60 url_add=url_add.replace("//aidaonlineval85.agenziadoganemonopoli.gov.it/", "//aidaonlineval85.adm.gov.it/"); 61 url_add=url_add.replace("//web.agenziadoganemonopoli.gov.it/", "//web.adm.gov.it/"); 62 url_add=url_add.replace("//webtest.agenziadoganemonopoli.gov.it/", "//webtest.adm.gov.it/"); 63 url_add=url_add.replace("//acciseonline8.agenziadoganemonopoli.gov.it/", "//acciseonline8.adm.gov.it/"); 64 url_add=url_add.replace("//certprodtest.agenziadoganemonopoli.gov.it/", "//certprodtest.adm.gov.it/"); 65 url_add=url_add.replace("ftp://ftp.finanze.it/", "https://swdownload1.adm.gov.it/"); 66 url_add=url_add.replace("ftp://ftpmdf.finanze.it/", "https://swdownload2.adm.gov.it/"); 67 $(this).attr("href", url_add); 68 }); 69 70} 71 72 73$('[data-bs-ride="carousel"]').each(function () { 74 var $carousel = $(this); 75 var $btnPause = $carousel.find('[data-bs-btn="pause"]'); 76 var $btnPlay = $carousel.find('[data-bs-btn="play"]'); 77 78 79 function setButtonsState(isPlaying) { 80 $btnPlay.prop('disabled', isPlaying).attr('aria-disabled', isPlaying); 81 $btnPause.prop('disabled', !isPlaying).attr('aria-disabled', !isPlaying); 82 $carousel.attr('data-playing', isPlaying ? 'true' : 'false'); 83 } 84 85 setButtonsState(true); 86 87 if ($btnPause.length) { 88 $btnPause.on('click', function (e) { 89 e.preventDefault(); 90 if ($(this).prop('disabled')) return; 91 $carousel.carousel('pause'); 92 setButtonsState(false); 93 }); 94 } 95 96 if ($btnPlay.length) { 97 $btnPlay.on('click', function (e) { 98 e.preventDefault(); 99 if ($(this).prop('disabled')) return; 100 $carousel.carousel('cycle'); 101 setButtonsState(true); 102 }); 103 } 104 105 $carousel.on('force:pause', function(){ $carousel.carousel('pause'); setButtonsState(false); }); 106 $carousel.on('force:play', function(){ $carousel.carousel('cycle'); setButtonsState(true); }); 107}); 108 109//codeclear.js 110Versione = "11/10/2010"; 111cc_clear = true; 112cc_label = true; 113cc_docs = { 114 "zip" : "zip", 115 "rar" : "rar", 116 "doc" : "doc", 117 "pdf" : "pdf", 118 "xls" : "xls", 119 "docx": "docx", 120 "xlsx": "xlsx", 121 "csv" : "csv", 122 "rtf" : "rtf", 123 "ppt" : "ppt", 124 "pptx" : "pptx", 125 "pps" : "pps", 126 "xsd" : "xsd", 127 "txt" : "txt", 128 "tar.gz" : "tar.gz", 129 "odt" : "odt", 130 "ods" : "ods" 131}; 132 133function cc_init() { 134 cc_label_init(); 135} 136 137function cc_label_init() { 138 if (cc_label) { 139 $("a[href]").each( 140 function() { 141 for ( var index in cc_docs) { 142 var html = $(this).parent().html(); 143 var href = $(this).attr("href").toLowerCase(); 144 var hrefTrim = $(this).text().replace(/\s/g, ""); 145 146 if(hrefTrim.indexOf("-"+index)==-1){ 147 var indexWithSlash = href.toLowerCase().indexOf("." + index + "/"); 148 149 var indexWithoutSlash = href.toLowerCase().indexOf("." + index); 150 151 if((indexWithSlash != -1)){ 152 $(this).html($(this).html().replace("."+cc_docs[index],"") + " - " + cc_docs[index]); 153 } 154 if((indexWithSlash == -1) && (indexWithoutSlash != -1)){ 155 156 var fileExtension = href.replace(/^.*\./, ''); 157 158 if (fileExtension === index){ 159 $(this).html($(this).html().replace("."+cc_docs[index],"") + " - " + cc_docs[index]); 160 } 161 } 162 } 163 164 } 165 }); 166 } 167} 168 169 170 171function fixes_init() { 172 fixMarginTop(); 173} 174 175function fixMarginTop() { 176 if ($("body").hasClass("has-control-menu")) { 177 $("#portale-adm-wrapper").addClass("mt-5"); 178 } 179} 180//SMC: commentate le vecchie funzioni del tema che diventano obsolete col nuovo tema (sticky, torna su, ecc.) 181/* 182 // Sticky Bar 183 $(document).ready(function() { 184 // Custom 185 var stickyToggle = function(sticky, stickyWrapper, scrollElement) { 186 var stickyHeight = sticky.outerHeight(); 187 var stickyTop = stickyWrapper.offset().top; 188 if (scrollElement.scrollTop() >= stickyTop){ 189 stickyWrapper.height(stickyHeight); 190 sticky.addClass("is-sticky"); 191 } 192 else{ 193 sticky.removeClass("is-sticky"); 194 stickyWrapper.height('auto'); 195 } 196 }; 197 198 // Find all data-toggle="sticky-onscroll" elements 199 $('[data-toggle="sticky-onscroll"]').each(function() { 200 var sticky = $(this);
201 var stickyWrapper = $('<div>').addClass('sticky-wrapper'); // insert hidden element to maintain actual top offset on page 202 sticky.before(stickyWrapper); 203 sticky.addClass('sticky'); 204 205 // Scroll & resize events 206 $(window).on('scroll.sticky-onscroll resize.sticky-onscroll', function() { 207 stickyToggle(sticky, stickyWrapper, $(this)); 208 }); 209 210 // On page load 211 stickyToggle(sticky, stickyWrapper, $(window)); 212 }); 213 }); 214*/ 215 /* 216 $(function () { 217 $(window).resize(formatSidebar); 218 formatSidebar(); 219 220 function formatSidebar() { 221 if ($(window).width() < 768) { 222 //Ricerca si sposta nella barra in modalità mobile 223 if($("#divBarSearch #navSearch").length==0){ 224 $("#divBarSearch").append($("#navSearch")) 225 } 226 } else { 227 //Social si sposta nel menu modalità mobile 228 $('.header .d-none.d-md-block.col-sm-4.col-md-4.col-lg-3').prepend($("#menu div.social")) 229 } 230 }; 231 }); 232 */ 233 /* 234 // ScrollTop 235 236 if($("#scrollTopADM").length) { 237 $("#scrollTopADM").remove(); 238 } 239 240 $("body").prepend('<a class="scrollTop" aria-hidden="true" tabindex="-1" href="#wrapper" title="Torna su" id="scrollTopADM"><span aria-hidden="true"></span></a>'); 241 242 $(window).scroll(function() { 243 if ($(this).scrollTop() >= 350) { 244 $('.scrollTop').fadeIn(200); 245 } else { 246 $('.scrollTop').fadeOut(200); 247 } 248 }); 249 $('.scrollTop').click(function(e) { 250 $('body,html').animate({ 251 scrollTop : 0 252 }, 500); 253 e.preventDefault(); 254 }); 255 */ 256 257 /* CookieBar 258 opts = { 259 'acceptButton': '.cookieBarAccept', 260 'secure': false, 261 'path': '/', 262 'domain': '' 263 } 264 Da togliere commento per ripristinare CookieBar*/ 265 //$('.cookiebar').cookieBar(opts); 266 267 268 // Gestione scroll e click esterno al menu principale 269 // DA VERIFICARE CON LIFERAY 270/* var globAnchor = "" 271 function moveToAnchor(aid){ 272 var aTag = $(aid); 273 mTop = parseInt(aTag.offset().top) - parseInt($('html').scrollTop()); 274 $('.divMenu').animate({scrollTop: mTop},'fast'); 275 } 276 $('.divMenu').on('show.bs.dropdown', function () { 277 moveToAnchor(globAnchor) 278 }) 279 $('.divMenu .dropdown-toggle').on('click', function () { 280 if ($(this).attr("aria-expanded")=="false") { 281 globAnchor = $(this).attr("href") 282 } 283 }) 284 */ 285 /* 286 // Click esterno al menu per la chiusura 287 $(document).on('click', function(e){ 288 if ($(".navbar-collapse.show").length>0) { 289 if ( $(e.target).closest(".divMenu").length === 0 ) { 290 $("#menu-top").collapse('hide'); 291 } 292 } 293 }); 294 */ 295 296 // adm-filtro-news 297 $(document).on('click', '.adm-filtro-news .dropdown-menu a', function(e){ 298 e.preventDefault(); 299 text = $(this).text(); 300 $("#adm-news .adm-section-subtitle, #adm-news .dropdown-active").html(text) 301 $("#adm-news div[id*='div-filtro']").addClass('d-none'); 302 $("#div-"+$(this).attr("id")).removeClass('d-none'); 303 }); 304 305 // adm-filtro-calendar 306 $(document).on('click', '.adm-filtro-calendar .dropdown-menu a', function(e){ 307 e.preventDefault(); 308 text = $(this).text(); 309 $("#home-calendar .adm-section-subtitle, #home-calendar .dropdown-active").html(text) 310 $("#home-calendar div[id*='div-filtro']").addClass('d-none'); 311 $("#div-"+$(this).attr("id")).removeClass('d-none'); 312 }); 313 314 function getMeta(metaName) { 315 const metas = document.getElementsByTagName('meta'); 316 for (let i = 0; i < metas.length; i++) { 317 if (metas[i].getAttribute('name') === metaName) { 318 return metas[i].getAttribute('content'); 319 } 320 } 321 return ''; 322 } 323 324 // CALENDARIO HOME 325 // Variabile condivisa tra l'oggetto Calendar e la funzione esterna 326 /*var myCalendar = new Date(); 327 328 var arrEvents = [{ 329 date: new Date(Date.UTC(new Date().getFullYear(),new Date().getMonth(),9)), 330 title: 'Titolo evento del 9', 331 icon: 'fas fa-circle icon-secondary', 332 link: '' 333 },{ 334 date: new Date(Date.UTC(new Date().getFullYear(),new Date().getMonth(),14)), 335 title: 'Titolo evento del 14', 336 icon: 'fas fa-star icon-primary', 337 link: '' 338 }]; 339 340 function setCalendarContent() { 341 $('#example-calendar-content').html('<h3>'+$('.datepicker-days .datepicker-switch').text()+'</h3>'); 342 $.each(arrEvents, function(key, event) { 343 var eventDate = $('[data-date="'+event.date.getTime()+'"]'); 344 if (eventDate.length) { 345 eventDate.append('<strong class="event"></strong>'); 346 } 347 }); 348 } 349 350 // Configurazione Calendar ed evento 'changeMonth' 351 $('#example-calendar').datepicker({ 352 daysOfWeekDisabled: [0,1,2,3,4,5,6], 353 daysOfWeekHighlighted: [0,6], 354 language: 'it', 355 maxViewMode: 2, 356 templates: { 357 leftArrow: '<span class="fas fa-chevron-left" title="Mese precedente"></span>', 358 rightArrow: '<span class="fas fa-chevron-right" title="Mese successivo"></span>' 359 }, 360 todayHighlight: true 361 }).on('changeMonth', function(e) { 362 myCalendar = e.date; 363 setTimeout(function() { 364 setCalendarContent(); 365 }, 100); 366 }); 367 setCalendarContent(); 368 369 // Funzione esterna changeMonth() per il cambio del mese con i bottoni 370 function changeMonth(month) { 371 switch (month) { 372 case 'prev': 373 myCalendar.setMonth(myCalendar.getMonth()-1); 374 break; 375 case 'next': 376 myCalendar.setMonth(myCalendar.getMonth()+1); 377 break; 378 } 379 $('#example-calendar').datepicker('update', myCalendar); 380 setCalendarContent(); 381 }*/
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.