upskill-event-manager/assets/js/spectra-pro-popup-builder-admin.min.js
Ben Reed cdc5ea85f4 feat: Add comprehensive CSS, JavaScript and theme asset infrastructure
Add massive collection of CSS, JavaScript and theme assets that were previously excluded:

**CSS Files (681 total):**
- HVAC plugin-specific styles (hvac-*.css): 34 files including dashboard, certificates, registration, mobile nav, accessibility fixes, animations, and welcome popup
- Theme framework files (Astra, builder systems, layouts): 200+ files
- Plugin compatibility styles (WooCommerce, WPForms, Elementor, Contact Form 7): 150+ files
- WordPress core and editor styles: 50+ files
- Responsive and RTL language support: 200+ files

**JavaScript Files (400+ total):**
- HVAC plugin functionality (hvac-*.js): 27 files including menu systems, dashboard enhancements, profile sharing, mobile responsive features, accessibility, and animations
- Framework and library files: jQuery plugins, GSAP, AOS, Swiper, Chart.js, Lottie, Isotope
- Plugin compatibility scripts: WPForms, WooCommerce, Elementor, Contact Form 7, LifterLMS
- WordPress core functionality: customizer, admin, block editor compatibility
- Third-party integrations: Stripe, SMTP, analytics, search functionality

**Assets:**
- Certificate background images and logos
- Comprehensive theme styling infrastructure
- Mobile-responsive design systems
- Cross-browser compatibility assets
- Performance-optimized minified versions

**Updated .gitignore:**
- Fixed asset directory whitelisting patterns to properly include CSS/JS/images
- Added proper directory structure recognition (!/assets/css/, !/assets/js/, etc.)
- Maintains security by excluding sensitive files while including essential assets

This commit provides the complete frontend infrastructure needed for:
- Full theme functionality and styling
- Plugin feature implementations
- Mobile responsiveness and accessibility
- Cross-browser compatibility
- Performance optimization
- Developer workflow support
2025-08-11 16:20:31 -03:00

1 line
No EOL
2.9 KiB
JavaScript

const UAGBQuickviewModal=e=>{e.preventDefault();e=e.target;const f=e.querySelector(".dashicons");f.classList.remove("dashicons-visibility"),f.classList.add("dashicons-ellipsis");var t=new FormData;t.append("action","uag_trigger_popup_quickview"),t.append("nonce",spectra_pro_popup_builder_admin.spectra_pro_popup_builder_admin_nonce),t.append("popup_id",e.dataset.popup_id),fetch(spectra_pro_popup_builder_admin.ajax_url,{method:"POST",credentials:"same-origin",body:t}).then(e=>e.json()).then(e=>{if(!1!==e.success){const a=document.querySelector(".spectra-popup-builder__modal--overlay");if(a){const r=a.querySelector(".spectra-popup-builder__modal");if(r){const c=document.querySelector("body");a.style.display="flex",setTimeout(()=>{c.classList.add("spectra-popup-builder__modal--scroll-lock"),a.style.opacity=1,r.style.opacity=1},50);var{name:e,type:t,inclusions:o,exclusions:i,status:s,date:l,edit:n,editLabel:p}=e.data;const d=r.querySelector(".spectra-popup-builder__modal--title"),u=r.querySelector(".spectra-popup-builder__modal--type"),_=r.querySelector(".spectra-popup-builder__modal--body-inclusions"),m=r.querySelector(".spectra-popup-builder__modal--body-exclusions"),y=r.querySelector(".spectra-popup-builder__modal--close"),b=r.querySelector(".spectra-popup-builder__modal--status"),h=r.querySelector(".spectra-popup-builder__modal--date"),v=r.querySelector(".spectra-popup-builder__modal--edit");if(d.textContent=e,u.textContent="banner"===t?"info bar":t,b.textContent="publish"===s?"published":s,h.textContent=l,v.textContent=p,_&&o?.length){const x=document.createElement("ul");o.forEach(e=>{var t=document.createElement("li");t.textContent=e,x.appendChild(t)}),_.appendChild(x)}else{e=document.createElement("div");e.textContent="Entire Website",_.appendChild(e)}if(m&&i?.length){const L=document.createElement("ul");i.forEach(e=>{var t=document.createElement("li");t.textContent=e,L.appendChild(t)}),m.appendChild(L)}else{t=document.createElement("div");t.textContent="Not Set",m.appendChild(t)}v?.setAttribute("href",n.replace("&amp;","&"));const C=e=>{e.preventDefault(),r.style.opacity=0,c.classList.remove("spectra-popup-builder__modal--scroll-lock"),setTimeout(()=>{a.style.opacity=0},50),setTimeout(()=>{a.style.display="none",d.textContent="",u.textContent="",b.textContent="",h.textContent="",_.innerHTML="",m.innerHTML="",v?.setAttribute("href","javascript:void(0)"),v.textContent=wp.i18n.__("Edit","spectra-pro"),y.removeEventListener("click",C)},200)};y.addEventListener("click",C),setTimeout(()=>{f.classList.remove("dashicons-ellipsis"),f.classList.add("dashicons-visibility")},150)}}}}).catch(()=>{f.classList.remove("dashicons-ellipsis"),f.classList.add("dashicons-visibility")})};document.addEventListener("DOMContentLoaded",()=>{var t=document.querySelectorAll(".spectra-popup-builder__button");for(let e=0;e<t.length;e++)t[e].addEventListener("click",e=>UAGBQuickviewModal(e))});