/*====== ENVIA O NUMERO DO PROTOCOLO =======*/ window.onload = function() { const search = document.querySelector('.modal__body form'), input = document.getElementById('search') search.addEventListener('submit', (event) => { event.preventDefault() if (!input.value) { const searchError = document.getElementById("searchError"); searchError.classList.add("visible"); searchError.setAttribute("aria-hidden", false); searchError.setAttribute("aria-invalid", true); }else { window.open("../cons_manifesto/?g_protocolo="+input.value, "_blank") closeModal() } }) } /*=============== SHOW MODAL ===============*/ const showModal = () => { const modalContainer = document.getElementById('modal-protocolo') if(modalContainer){ modalContainer.classList.add('show-modal') modalContainer.addEventListener('click', (even) => { if(even.target === modalContainer) { closeModal() } }) } } /*=============== CLOSE MODAL ===============*/ const closeModal = () => { const modalContainer = document.getElementById('modal-protocolo'), searchError = document.getElementById("searchError") document.getElementById('search').value = ""; modalContainer.classList.remove('show-modal') searchError.classList.remove('visible') } /* ============== LINK DO FORMULARIO =============== */ let openWindow; function windowOpen(item) { openWindow = window.open("../falecon_ouvidoria/?idItem="+item,"openWindow","titlebar=no,top=0,left=10,width=1300,height=700"); } window.addEventListener('load', () => { AOS.init({ duration: 1000, easing: "ease-in-out", once: true, mirror: true }); }); setTimeout(() => { let wspp = document.querySelector(".whatsapp"); if(wspp) wspp.classList.add("w-show"); }, 3000);