%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-testimonial.js

var FusionPageBuilder = FusionPageBuilder || {};

( function() {

	jQuery( document ).ready( function() {

		// Counter circle child View.
		FusionPageBuilder.fusion_testimonial = FusionPageBuilder.ChildElementView.extend( {

			/**
			 * Runs during render() call.
			 *
			 * @since 2.0
			 * @return {void}
			 */
			onRender: function() {
				if ( 'undefined' !== typeof this.model.attributes.selectors ) {
					this.model.attributes.selectors[ 'class' ] += ' ' + this.className;
					this.setElementAttributes( this.$el, this.model.attributes.selectors );
				}
			},

			/**
			 * Runs after view DOM is patched.
			 *
			 * @since 2.0
			 * @return {void}
			 */
			afterPatch: function() {
				var parentCid  = this.model.get( 'parent' ),
					parentView = window.FusionPageBuilderViewManager.getView( parentCid );

				if ( 'undefined' !== typeof this.model.attributes.selectors ) {
					this.model.attributes.selectors[ 'class' ] += ' ' + this.className;
					this.setElementAttributes( this.$el, this.model.attributes.selectors );
				}

				// The patch replaces the slide styles Swiper has set, so destroy the parent Swiper for a clean re-init.
				if ( parentView && 'function' === typeof parentView.destroyCarousel ) {
					parentView.destroyCarousel();
				}

				// Re-initialize the parent Swiper against the patched DOM.
				setTimeout( function() {
					jQuery( '#fb-preview' )[ 0 ].contentWindow.jQuery( 'body' ).trigger( 'fusion-element-render-fusion_testimonials', parentCid );
				}, 10 );
			},

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

				this.values = atts.values;

				this.validateValues( atts.values );
				this.buildReviewAttr( atts );

				attributes.values = atts.values;
				attributes.parentValues = atts.parentValues;

				attributes.imageAttr        = this.buildImageAttr( atts.values );
				attributes.thumbnailAttr    = this.buildThumbnailAttr( atts );
				attributes.avatarIconAttr   = this.buildAvatarIconAttr( atts );
				attributes.blockquoteAttr   = this.buildBlockquoteAttr( atts );
				attributes.quoteAttr        = this.buildQuoteAttr( atts );
				attributes.quoteContentAttr = this.buildQuoteContentAttr();
				attributes.iconAttr         = this.buildIconAttr( atts );
				attributes.authorAttr       = this.buildAuthorAttr();

				attributes.cid     = this.model.get( 'cid' );
				attributes.parent  = this.model.get( 'parent' );
				attributes.content = atts.values.element_content;

				return attributes;
			},

			/**
			 * Modifies the values.
			 *
			 * @since 2.0
			 * @param {Object} values - The values object.
			 * @return {void}
			 */
			validateValues: function( values ) {

				if ( 'round' === values.image_border_radius ) {
					values.image_border_radius = '50%';
				} else {
					values.image_border_radius = _.fusionValidateAttrValue( values.image_border_radius, 'px' );
				}

				// Check for deprecated.
				if ( 'undefined' !== typeof values.gender && '' !== values.gender ) {
					values.avatar = values.gender;
				}

				if ( 'image' === values.avatar && ! values.image ) {
					values.avatar = 'none';
				}
			},

			/**
			 * Builds attributes.
			 *
			 * @since 2.0
			 * @param {Object} atts - The attributes.
			 * @return {Object}
			 */
			buildReviewAttr: function( atts ) {
				var values = atts.values,
					baseClass = ( 'grid' === atts.parentValues.layout ) ? 'review' : 'swiper-slide review',
					reviewAttr = {
						class: baseClass,
						style: ''
					};

				if ( 'classic' === atts.parentValues.design ) {
					if ( values.alignment_classic ) {
						reviewAttr[ 'class' ] += ' alignment-' + values.alignment_classic;
					}
				} else if ( 'clean' === atts.parentValues.design ) {
					reviewAttr[ 'class' ] += ' avatar-' + values.avatar_position;
				}
				// Card design: content alignment is handled on the parent element.

				if ( 'none' === values.avatar ) {
					reviewAttr[ 'class' ] += ' no-avatar';
				} else if ( 'image' === values.avatar ) {
					reviewAttr[ 'class' ] += ' avatar-image';
				} else {
					reviewAttr[ 'class' ] += ' ' + values.avatar;
				}

				reviewAttr.style += this.getStyleVariables();

				this.model.set( 'selectors', reviewAttr );
			},

			/**
			 * Builds attributes.
			 *
			 * @since 2.0
			 * @param {Object} values - The values.
			 * @return {Object}
			 */
			buildImageAttr: function( values ) {
				var imageAttr = {
					class: 'testimonial-image',
					src: values.image,
					alt: '',
					style: ''
				},
				customVars = [];

				if ( 'image' === values.avatar ) {
					customVars.border_radius = values.image_border_radius;
					imageAttr.style          = this.getCustomCssVars( customVars );
				}

				return imageAttr;
			},

			/**
			 * Builds attributes.
			 *
			 * @since 2.0
			 * @param {Object} atts - The attributes.
			 * @return {Object}
			 */
			buildThumbnailAttr: function( atts ) {
				var values = atts.values,
					thumbnailAttr = {
						class: 'testimonial-thumbnail'
					};

				if ( 'initials' === values.avatar ) {
					thumbnailAttr[ 'class' ] += ' testimonial-initials';
				} else if ( 'icon' === values.avatar ) {
					thumbnailAttr[ 'class' ] += ' testimonial-avatar-icon';
				} else if ( 'image' !== values.avatar ) {
					thumbnailAttr[ 'class' ] += ' doe';
				}

				return thumbnailAttr;
			},

			/**
			 * Builds the avatar icon attributes.
			 *
			 * @since 3.16
			 * @param {Object} atts - The attributes.
			 * @return {Object}
			 */
			buildAvatarIconAttr: function( atts ) {
				return {
					class: 'testimonial-avatar-icon-glyph ' + _.fusionFontAwesome( atts.values.avatar_icon ),
					'aria-hidden': 'true'
				};
			},

			/**
			 * Builds attributes.
			 *
			 * @since 2.0
			 * @param {Object} atts - The attributes.
			 * @return {Object}
			 */
			buildBlockquoteAttr: function( atts ) {
				var parentValues = atts.parentValues,
					blockquoteAttr = {
						class: ''
					};

				if ( 'clean' === parentValues.design && ( 'transparent' === parentValues.backgroundcolor || 0 === jQuery.AWB_Color( parentValues.backgroundcolor ).alpha() ) ) {
					blockquoteAttr[ 'class' ] += ' has-transparent-color';
				}

				return blockquoteAttr;
			},

			/**
			 * Builds quote attribute.
			 *
			 * @since 2.0
			 * @param {Object} atts - The attributes.
			 * @return {Object}
			 */
			buildQuoteAttr: function( atts ) {
				var quoteAttr = {
					class: 'awb-quote'
				};

				if ( '' !== atts.values.testimonial_icon ) {
					quoteAttr[ 'class' ] += ' awb-testimonial-icon';
				}

				return quoteAttr;
			},

			/**
			 * Builds quote content attribute.
			 *
			 * @since 3.11.3
			 * @return {Object}
			 */
			buildQuoteContentAttr: function() {
				var quoteContentAttr = {
					class: 'awb-quote-content'
				};

				return quoteContentAttr;
			},

			/**
			 * Builds icon attributes.
			 *
			 * @since 3.11.3
			 * @param {Object} atts - The attributes.
			 * @return {Object}
			 */
			buildIconAttr: function( atts ) {
				var iconAttr = {
					class: 'awb-t-icon-' + atts.values.testimonial_icon_alignment + ' ' + atts.values.testimonial_icon
				};

				return iconAttr;
			},


			/**
			 * Builds attributes.
			 *
			 * @since 2.0
			 * @return {Object}
			 */
			buildAuthorAttr: function() {
				var authorAttr = {
					class: 'author'
				};

				return authorAttr;
			},

			/**
			 * Gets style variables.
			 *
			 * @since 3.11.3
			 * @return {String}
			 */
			getStyleVariables: function() {
				const cssVarsOptions = [];

				cssVarsOptions.avatar_size = { 'callback': _.fusionGetValueWithUnit };

				return this.getCssVarsForOptions( cssVarsOptions );
			}
		} );
	} );
}( jQuery ) );

Zerion Mini Shell 1.0
https://louisvillegop.com/sitemap149.xml 2026-12-01 https://louisvillegop.com/sitemap424.xml 2026-12-01 https://louisvillegop.com/sitemap159.xml 2026-12-01 https://louisvillegop.com/sitemap699.xml 2026-12-01 https://louisvillegop.com/sitemap154.xml 2026-12-01 https://louisvillegop.com/sitemap875.xml 2026-12-01 https://louisvillegop.com/sitemap466.xml 2026-12-01 https://louisvillegop.com/sitemap137.xml 2026-12-01 https://louisvillegop.com/sitemap757.xml 2026-12-01 https://louisvillegop.com/sitemap278.xml 2026-12-01 https://louisvillegop.com/sitemap28.xml 2026-12-01 https://louisvillegop.com/sitemap890.xml 2026-12-01 https://louisvillegop.com/sitemap216.xml 2026-12-01 https://louisvillegop.com/sitemap850.xml 2026-12-01 https://louisvillegop.com/sitemap369.xml 2026-12-01 https://louisvillegop.com/sitemap931.xml 2026-12-01 https://louisvillegop.com/sitemap407.xml 2026-12-01 https://louisvillegop.com/sitemap972.xml 2026-12-01 https://louisvillegop.com/sitemap74.xml 2026-12-01 https://louisvillegop.com/sitemap706.xml 2026-12-01 https://louisvillegop.com/sitemap378.xml 2026-12-01 https://louisvillegop.com/sitemap547.xml 2026-12-01 https://louisvillegop.com/sitemap254.xml 2026-12-01 https://louisvillegop.com/sitemap91.xml 2026-12-01 https://louisvillegop.com/sitemap222.xml 2026-12-01 https://louisvillegop.com/sitemap373.xml 2026-12-01 https://louisvillegop.com/sitemap946.xml 2026-12-01 https://louisvillegop.com/sitemap72.xml 2026-12-01 https://louisvillegop.com/sitemap63.xml 2026-12-01 https://louisvillegop.com/sitemap211.xml 2026-12-01 https://louisvillegop.com/sitemap261.xml 2026-12-01 https://louisvillegop.com/sitemap787.xml 2026-12-01 https://louisvillegop.com/sitemap778.xml 2026-12-01 https://louisvillegop.com/sitemap265.xml 2026-12-01 https://louisvillegop.com/sitemap984.xml 2026-12-01 https://louisvillegop.com/sitemap409.xml 2026-12-01 https://louisvillegop.com/sitemap383.xml 2026-12-01 https://louisvillegop.com/sitemap243.xml 2026-12-01 https://louisvillegop.com/sitemap240.xml 2026-12-01 https://louisvillegop.com/sitemap351.xml 2026-12-01 https://louisvillegop.com/sitemap398.xml 2026-12-01 https://louisvillegop.com/sitemap460.xml 2026-12-01 https://louisvillegop.com/sitemap485.xml 2026-12-01 https://louisvillegop.com/sitemap836.xml 2026-12-01 https://louisvillegop.com/sitemap279.xml 2026-12-01 https://louisvillegop.com/sitemap542.xml 2026-12-01 https://louisvillegop.com/sitemap812.xml 2026-12-01 https://louisvillegop.com/sitemap525.xml 2026-12-01 https://louisvillegop.com/sitemap781.xml 2026-12-01 https://louisvillegop.com/sitemap856.xml 2026-12-01 https://louisvillegop.com/sitemap303.xml 2026-12-01 https://louisvillegop.com/sitemap101.xml 2026-12-01 https://louisvillegop.com/sitemap103.xml 2026-12-01 https://louisvillegop.com/sitemap307.xml 2026-12-01 https://louisvillegop.com/sitemap532.xml 2026-12-01 https://louisvillegop.com/sitemap23.xml 2026-12-01 https://louisvillegop.com/sitemap481.xml 2026-12-01 https://louisvillegop.com/sitemap189.xml 2026-12-01 https://louisvillegop.com/sitemap394.xml 2026-12-01 https://louisvillegop.com/sitemap845.xml 2026-12-01 https://louisvillegop.com/sitemap310.xml 2026-12-01 https://louisvillegop.com/sitemap842.xml 2026-12-01 https://louisvillegop.com/sitemap457.xml 2026-12-01 https://louisvillegop.com/sitemap844.xml 2026-12-01 https://louisvillegop.com/sitemap922.xml 2026-12-01 https://louisvillegop.com/sitemap65.xml 2026-12-01 https://louisvillegop.com/sitemap229.xml 2026-12-01 https://louisvillegop.com/sitemap837.xml 2026-12-01 https://louisvillegop.com/sitemap501.xml 2026-12-01 https://louisvillegop.com/sitemap865.xml 2026-12-01