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
1 line
No EOL
5.8 KiB
JavaScript
1 line
No EOL
5.8 KiB
JavaScript
function scrollToQueryId(e){var t,a,e=document.getElementById("uagb-block-queryid-"+e);e&&(e=e.getBoundingClientRect(),t=document.querySelector("#wpadminbar")?.offsetHeight||0,a=window?.pageYOffset||document?.documentElement?.scrollTop,e=e?.top+a-t,window.scrollTo({top:e,behavior:"smooth"}))}function findAncestorWithClass(e,t){for(;e&&!e.classList.contains(t);)e=e.parentNode;return e}function getUpdatedLoopWrapperContent(e){return e.append("action","uagb_update_loop_builder_content"),e.append("postId",uagb_loop_builder?.post_id),e.append("postType",uagb_loop_builder?.what_post_type),e.append("security",uagb_loop_builder?.nonce),fetch(uagb_loop_builder?.ajax_url,{method:"POST",credentials:"same-origin",body:e}).then(e=>{if(e.ok)return e.json();throw new Error("Network response was not ok")}).then(e=>{if(e.success)return e.data;throw new Error(e.data.message)}).catch(e=>{throw e})}document.addEventListener("DOMContentLoaded",function(){function a(a,o){let r;return function(...e){const t=this;clearTimeout(r),r=setTimeout(()=>{r=null,a.apply(t,e)},o)}}async function r(t,e=null,a=null,o=null,r){try{var l=r,u=l?.querySelector(".uagb-loop-search")?.value,n=l?.querySelector(".uagb-loop-sort")?.value,c=o?.value,d=l?.querySelector(".uagb-loop-category-inner"),g=new FormData,i=(u&&g.append("search",u),n&&g.append("sorting",n),c&&g.append("category",c),r?.querySelectorAll(".uagb-cat-checkbox"));const y=[];i?.forEach(e=>{e.checked&&e.getAttribute("data-uagb-block-query-id")===t.target.dataset.uagbBlockQueryId&&y.push(e.value)}),y&&g.append("checkbox",y),e&&g.append("paged",e),a&&g.append("buttonFilter",JSON.stringify(a.type));var s=t.target?.dataset?.uagbBlockQueryId||t.target?.parentElement?.dataset?.uagbBlockQueryId||d?.dataset?.uagbBlockQueryId||t?.dataset?.uagbBlockQueryId||t.target.closest("a")?.getAttribute("data-uagb-block-query-id");scrollToQueryId(s),g.append("queryId",s),g.append("block_id",l?.getAttribute("data-block_id"));const h=await getUpdatedLoopWrapperContent(g);var b=l?.querySelector("#uagb-block-queryid-"+s),p=(b&&h?.content?.wrapper&&(b.innerHTML=h.content.wrapper),l?.querySelectorAll("#uagb-block-pagination-queryid-"+s));p&&h?.content?.pagination&&(p.innerHTML=h?.content?.pagination),p?.forEach(e=>{e.innerHTML=h.content.pagination})}catch(e){throw e}}function o(t){var e=this.closest(".wp-block-uagb-loop-builder");e.querySelectorAll(".uagb-loop-search").forEach(e=>{e.getAttribute("data-uagb-block-query-id")===t.target.dataset.uagbBlockQueryId&&(e.value=t.target.value)}),r(t,null,null,null,e)}function l(t){var e=this.closest(".wp-block-uagb-loop-builder"),a=e.querySelectorAll(".uagb-cat-checkbox");const o=[];a.forEach(e=>{e.checked&&e.getAttribute("data-uagb-block-query-id")===t.target.dataset.uagbBlockQueryId&&o.push(e.value)}),r(t,null,null,null,e)}function u(t){var e=this.closest(".wp-block-uagb-loop-builder");e.querySelectorAll(".uagb-loop-sort").forEach(e=>{e.getAttribute("data-uagb-block-query-id")===t.target.dataset.uagbBlockQueryId&&(e.value=t.target.value)}),r(t,null,null,null,e)}function n(t){var e=this.closest(".wp-block-uagb-loop-builder");e.querySelectorAll(".uagb-loop-category").forEach(e=>{e.getAttribute("data-uagb-block-query-id")===t.target.dataset.uagbBlockQueryId&&(e.value=t.target.value)}),r(t,null,null,this,e)}function c(e,t,a,o){e.querySelectorAll(t).forEach(e=>{e.dataset.uagbBlockQueryId===a&&o(e)})}function d(e){var t=this.closest(".wp-block-uagb-loop-builder");let a=e.target.parentElement.dataset.uagbBlockQueryId;"a"===e.target.tagName.toLowerCase()?a=e.target.dataset.uagbBlockQueryId:"svg"!==e.target.tagName.toLowerCase()&&"path"!==e.target.tagName.toLowerCase()||(a=e.target.closest("a")?.getAttribute("data-uagb-block-query-id"));var o=findAncestorWithClass(e.target.parentNode,"wp-block-uagb-loop-builder");c(o,".uagb-loop-search",a,e=>{e.value=""}),c(o,".uagb-loop-sort",a,e=>{e.value=""}),c(o,".uagb-loop-category",a,e=>{e.value=""}),c(o,".uagb-cat-checkbox",a,e=>{e.checked=!1}),r(e,null,null,null,t)}var e=document.querySelectorAll(".uagb-loop-reset");document.querySelectorAll(".uagb-loop-search").forEach(e=>{var t=a(o,250);e.addEventListener("input",t)}),document.querySelectorAll(".uagb-loop-sort").forEach(e=>{var t=a(u,250);e.addEventListener("change",t)}),document.querySelectorAll(".uagb-loop-category").forEach(e=>{var t=a(n,250);e.addEventListener("change",t)}),document.querySelectorAll(".uagb-cat-checkbox").forEach(e=>{var t=a(l,250);e.addEventListener("click",t)}),e.forEach(e=>{var t=a(d,250);e.addEventListener("click",t)}),document.querySelectorAll(".wp-block-uagb-loop-builder > :not(.uagb-loop-pagination).wp-block-uagb-buttons")?.forEach(function(e){var t=document.createElement("div"),a=(t.classList.add("uagb-loop-pagination"),e.querySelector("a").getAttribute("data-uagb-block-query-id"));t.id="uagb-block-pagination-queryid-"+a,t.innerHTML=e.outerHTML,e.parentNode.insertBefore(t,e.nextSibling),e.parentNode.removeChild(e)}),document.querySelectorAll(".uagb-loop-pagination").forEach(e=>{e.addEventListener("click",function(e){e.preventDefault();var t=this.closest(".wp-block-uagb-loop-builder");"a"===e.target.tagName.toLowerCase()&&r(e,e.target.dataset.uagbBlockQueryPaged,null,null,t),"div"===e.target.tagName.toLowerCase()&&"a"===e.target.parentElement.tagName.toLowerCase()&&r(e,e.target.parentElement.dataset.uagbBlockQueryPaged,null,null,t),"svg"===e.target.tagName.toLowerCase()&&"path"===e.target.tagName.toLowerCase()&&r(e.target.parentElement.parentElement,e?.target?.closest("a")?.getAttribute("data-uagb-block-query-paged"),null,null,t)})}),document.querySelectorAll(".uagb-loop-category-inner ").forEach(e=>{e.addEventListener("click",function(e){e.preventDefault();var t=this.closest(".wp-block-uagb-loop-builder");"a"===e.target.tagName.toLowerCase()&&r(e,null,e.target.children[0].dataset,null,t),"div"===e.target.tagName.toLowerCase()&&"a"===e.target.parentElement.tagName.toLowerCase()&&r(e,null,e.target.dataset,null,t)})})}); |