✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ webm004.cluster127.gra.hosting.ovh.net ​🇻​♯➤ 6.18.42-ovh-vps-grsec-zfs+ #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 54.36.91.62 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.216.191
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ _dyuweyrj4,_dyuweyrj4r,dl

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/docteuh/www/wp-includes-20260826063326/src/options//toggle.js
/* global FusionApp, fusionAllElements, fusionMailchimpMapOption, fusionHubSpotMapOption, fusionHubSpotConsentMapOption */
var FusionPageBuilder = FusionPageBuilder || {};
FusionPageBuilder.options = FusionPageBuilder.options || {};

FusionPageBuilder.options.fusionToggleField = {

	optionToggle: function( context ) {
		var $toggle = this.$el.find( '.fusion-builder-option.toggle' ),
			self      = this;

		// Set context to overall view for easier access.
		this.context = context;

		this.repeaterRowId = 'undefined' === typeof this.repeaterRowId ? 0 : this.repeaterRowId;

		if ( $toggle.length ) {
			$toggle.each( function() {
				self.initToggle( jQuery( this ), context );
			} );
		}
	},

	/**
	 * Init the option.
	 *
	 * @since 2.0.0
	 * @param {Object} $toggle - jQuery object of the DOM element.
	 * @return {void}
	 */
	initToggle: function( $toggle ) {
		var self       = this,
			param      = $toggle.data( 'option-id' ),
			$target    = $toggle.find( '.toggle-wrapper' ),
			option,
			values,
			params,
			attributes,
			fields;


		switch ( this.context ) {

		case 'TO':
		case 'FBE':

			option   = this.options[ param ];
			fields   = option.fields;
			values   = FusionApp.settings;

			break;

		case 'PO':

			option   = this.options[ param ];
			fields   = option.fields;
			values   = FusionApp.data.postMeta._fusion;

			break;

		default:

			option     = fusionAllElements[ this.model.get( 'element_type' ) ].params[ param ];
			fields     = 'undefined' !== typeof option ? option.fields : {};
			attributes = jQuery.extend( true, {}, this.model.attributes );

			if ( 'function' === typeof this.filterAttributes ) {
				attributes = this.filterAttributes( attributes );
			}

			params     = attributes.params;
			values     = 'undefined' !== typeof params ? params : '';


			break;
		}
		self.createToggleRow( fields, values, $target, option.row_title );

		$toggle.on( 'click', '.toggle-title', function() {
			jQuery( this ).parent().find( '.toggle-fields' ).slideToggle( 300 );

			if ( jQuery( this ).find( '.toggle-toggle-icon' ).hasClass( 'fusiona-pen' ) ) {
				jQuery( this ).find( '.toggle-toggle-icon' ).removeClass( 'fusiona-pen' ).addClass( 'fusiona-minus' );
			} else {
				jQuery( this ).find( '.toggle-toggle-icon' ).removeClass( 'fusiona-minus' ).addClass( 'fusiona-pen' );
			}
		} );

		$toggle.one( 'click', '.toggle-title', function() {
			// Init repeaters if exists.
			const $repeater = $toggle.find( '.fusion-builder-option.repeater' );
			if ( $repeater.length && !this.repeaterInitialized ) {
				jQuery( document ).trigger( 'fusion-init-repeater-in-toggle', { $toggle, option: option.fields } );
				this.repeaterInitialized = true;
			}

			//init mailchimp map inside toggle.
			if ( $target.find( '.mailchimp_map' ) ) {
				new fusionMailchimpMapOption( $target );
			}

			//init hubspot map inside toggle.
			if ( $target.find( '.hubspot_map' ) ) {
				new fusionHubSpotMapOption( $target );
			}

			//init hubspot map inside toggle.
			if ( $target.find( '.hubspot_consent_map' ) ) {
				new fusionHubSpotConsentMapOption( $target );
			}
		} );

	},

	/**
	 * Creates a new row for a specific repeater.
	 *
	 * @since 2.0.0
	 * @param {Object} fields - The fields.
	 * @param {Object} values - The values.
	 * @param {Object} $target - jQuery element.
	 * @param {string} rowTitle - The title for this row.
	 * @return {void}
	 */
	createToggleRow: function( fields, values, $target, rowTitle ) {
		var self       = this,
			$html      = '',
			attributes = {},
			repeater   = FusionPageBuilder.template( jQuery( '#fusion-app-repeater-fields' ).html() ),
			depFields  = {},
			value,
			optionId;

		rowTitle   = 'undefined' !== typeof rowTitle && rowTitle ? rowTitle : 'Toggle Row';

		$html += '<div class="toggle-row">';
		$html += '<div class="toggle-title">';
		$html += '<span class="toggle-toggle-icon fusiona-pen"></span>';
		$html += '<h3>' + rowTitle + '</h3>';
		$html += '<span></span>';
		$html += '</div>';
		$html += '<ul class="toggle-fields" style="display:none;">';

		this.repeaterRowId++;

		_.each( fields, function( field ) {
			optionId              = 'builder' === self.context ? field.param_name : field.id;
			value                 = values[ optionId ];
			depFields[ optionId ] = field;

			attributes = {
				field: field,
				value: value,
				context: self.context,
				rowId: self.repeaterRowId
			};
			$html += jQuery( repeater( attributes ) ).html();
		} );

		$html += '</ul>';
		$html += '</div>';

		$target.append( $html );

		if ( 'function' === typeof this.initOptions ) {
			this.initOptions( $target.children( 'div:last-child' ) );
		}

		// Check option dependencies
		if ( 'TO' !== this.context && 'FBE' !== this.context && 'PO' !== this.context && 'undefined' !== typeof this.model && 'undefined' !== typeof this.model.get ) {
			new FusionPageBuilder.Dependencies( fusionAllElements[ this.model.get( 'element_type' ) ].params, this, $target.children( 'div:last-child' ), depFields, this.$el );
		} else {
			new FusionPageBuilder.Dependencies( {}, this, $target.children( 'div:last-child' ), depFields, this.$el );
		}
	}
};


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
12 Sep 2026 11.33 PM
docteuh / users
0755
ajax-select.js
12.816 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
checkbox-set.js
1.391 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
code-block.js
1.849 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
color-palette.js
7.909 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
color-picker.js
1.657 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
column-width.js
2.236 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
connected-sortable.js
1.078 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
date-picker.js
1.621 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
dimension.js
1.498 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
editor.js
3.695 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
export.js
4.012 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
form-options.js
3.945 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
fusion-logics.js
6.861 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
hubspot-consent-map.js
6.297 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
hubspot-map.js
4.634 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
icon-picker.js
7.406 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
icon-redirect-manager.svg
1.299 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
image-focus-point.js
4.166 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
import.js
8.079 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
layout-conditions.js
16.494 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
link-selector-object-20260831193438.js
5.041 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
link-selector.js
4.189 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
mailchimp-map.js
7.183 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
media-upload.js
21.622 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
multi-select.js
9.794 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
nominatim-selector.js
2.22 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
radio-set.js
3.705 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
range.js
5.03 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
raw.js
0.859 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
repeater.js
14.949 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
select.js
7.41 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
sortable-text.js
1.587 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
sortable.js
0.948 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
switch.js
0.651 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
textfield-placeholder.js
0.541 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
toggle.js
5.024 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
typography-sets.js
0.902 KB
20 Nov 2023 7.11 PM
docteuh / users
0644
typography.js
1.118 KB
20 Nov 2023 7.11 PM
docteuh / users
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF