← Back
Editing: settings.js
(function( $ ) { /** * Settings-form helper for the SVG Animator module. * * Beaver Builder loads this file with the module settings form and runs * init() every time the form opens, inside the window that owns * FLBuilder/FLBuilderConfig. That is the only reliable place to enhance a * form field: the `fl_builder_ui_enqueue_scripts` action fires in the * iframe-UI parent window, which never loads the builder JS. * * @since 1.37.8 */ FLBuilder.registerModuleHelper( 'uabb-svg-animator', { /** * Turn the icon <select> into a searchable select2 dropdown, mirroring * how Beaver Builder enhances its own font-family field. */ init: function() { if ( 'undefined' === typeof FLBuilderConfig || ! FLBuilderConfig.select2Enabled || 'function' !== typeof $.fn.select2 ) { return; } var $select = $( '.fl-builder-settings:visible select.uabb-svg-icon-select' ); if ( $select.length && ! $select.data( 'select2' ) ) { $select.select2( { width: '100%' } ); } } } ); })( jQuery );
Save File
Cancel