upskill-event-manager/assets/js/dropdown-list.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

4 lines
No EOL
2.3 KiB
JavaScript

var WPForms=window.WPForms||{};WPForms.Admin=WPForms.Admin||{},WPForms.Admin.Builder=WPForms.Admin.Builder||{},WPForms.Admin.Builder.DropdownList=WPForms.Admin.Builder.DropdownList||function(n){function o(t){const s=this,i={class:"",title:"",list:[],container:null,scrollableContainer:null,button:null,buttonDistance:10,onSelect:null,itemFormat(t){return t.text}};s.options=n.extend(i,t),s.$el=null,s.$builder=n("#wpforms-builder"),s.close=function(){s.$el.addClass("closed")},s.open=function(){s.$el.removeClass("closed"),s.setPosition(),s.$builder.on("click.DropdowmList",function(t){var t=n(t.target);t.closest(s.$el).length||t.hasClass("button-insert-field")||(s.$builder.off("click.DropdowmList"),(t=n(s.options.button)).hasClass("active")&&t.trigger("click"))})},s.generateHtml=function(){var t=s.options.list;if(!t||0===t.length)return"";var o=("function"==typeof s.options.itemFormat?s.options:i).itemFormat,n=[];for(const e in t)n.push(`<li data-value="${t[e].value}">${o(t[e])}</li>`);return`<div class="wpforms-builder-dropdown-list closed ${s.options.class}">
<div class="title">${s.options.title}</div>
<ul>${n.join("")}</ul>
</div>`},s.attach=function(){var t=s.generateHtml();s.$el&&s.$el.length&&s.$el.remove(),s.$el=n(t),s.$button=n(s.options.button),s.$container=s.options.container?n(s.options.container):s.$button.parent(),s.$scrollableContainer=s.options.scrollableContainer?n(s.options.scrollableContainer):null,s.$container.append(s.$el),s.setPosition()},s.setPosition=function(){var t=s.$button.offset(),o=s.$container.offset(),n=s.$container.position(),e=s.$el.height(),i=s.$scrollableContainer?s.$scrollableContainer.scrollTop():0;let l=t.top-o.top-e-s.options.buttonDistance;i+n.top-e<0&&(l=t.top-o.top+s.$button.height()+s.options.buttonDistance-11),s.$el.css("top",l),0===s.$container.closest(".wpforms-field-option").length&&s.$el.css("left",t.left-o.left)},s.events=function(){s.$el.find("li").off().on("click",function(t){var o;"function"==typeof s.options.onSelect&&(o=n(this),s.options.onSelect(t,o.data("value"),o.text(),o,s))})},s.init=function(t=null){s.options.list=t||s.options.list,s.attach(),s.events(),s.$button.data("dropdown-list",s)},s.destroy=function(){s.$button.data("dropdown-list",null),s.$el.remove()},s.init()}return{init(t){return new o(t)}}}((document,window,jQuery));