<# var valueCheck = 'undefined' === typeof param.param_name ? option_value : param.value, isFrontEnd = jQuery( 'body' ).hasClass( 'fusion-builder-live' ), borderRadius = ( 'undefined' !== typeof param.param_name && param.param_name.includes( 'border_radius' ) ) ? true : false, isBoxShadow = ( 'undefined' !== typeof param.param_name && param.param_name.includes( 'box_shadow' ) ) ? true : false, topLabel, rightLabel, bottomLabel, leftLabel, numberOfDimensions, paramOptions = {}; if ( 'undefined' === typeof param.value && 'undefined' !== typeof param.choices ) { param.value = param.choices; } if ( 'undefined' === typeof param.value && 'undefined' !== typeof param.default ) { param.value = param.default; } if ( 'undefined' !== typeof param.value ) { paramOptions = param.value; } if ( 'undefined' !== typeof param.value && 'undefined' !== typeof param.value.units ) { delete param.value.units; } if ( 'object' === typeof param.value && 'string' === typeof valueCheck ) { valueCheck = param.value; } if ( borderRadius ) { topLabel = fusionBuilderText.fusion_dimension_top_left_label; rightLabel = fusionBuilderText.fusion_dimension_top_right_label; bottomLabel = fusionBuilderText.fusion_dimension_bottom_left_label; leftLabel = fusionBuilderText.fusion_dimension_bottom_right_label; } else { topLabel = fusionBuilderText.fusion_dimension_top_label rightLabel = fusionBuilderText.fusion_dimension_right_label bottomLabel = fusionBuilderText.fusion_dimension_bottom_label; leftLabel = fusionBuilderText.fusion_dimension_left_label; } if ( 'object' == typeof valueCheck ) { #> <# if ( 'undefined' !== typeof valueCheck.width && 'undefined' !== typeof valueCheck.height ) { #>
<# } else { #>
<# } #> <# numberOfDimensions = Object.keys( paramOptions ).length; #> <# _.each( paramOptions, function( sub_value, sub_param ) { #> <# var dimension_value = ( 'undefined' !== typeof atts && 'undefined' !== typeof atts.params[ sub_param ] ) ? atts.params[ sub_param ] : valueCheck[ sub_param ], values = 'string' === typeof option_value ? option_value.split(' ') : '', inputClass, content_text; dimension_value = ( 'undefined' !== typeof atts && 'undefined' !== atts.params[ sub_param ] ) ? atts.params[ sub_param ] : valueCheck[ sub_param ]; inputClass = ''; content_text = isFrontEnd ? fusionBuilderText.fusion_dimension_width_label : 'fusiona-expand'; if ( sub_param.indexOf( 'height' ) > -1 || sub_param.indexOf( 'horizontal' ) > -1 ) { if ( isFrontEnd ) { content_text = fusionBuilderText.fusion_dimension_height_label; if ( isBoxShadow ) { content_text = fusionBuilderText.fusion_dimension_horizontal; } } else { content_text = 'fusiona-expand fusion-rotate-315'; } } else if ( sub_param.indexOf( 'width' ) > -1 || sub_param.indexOf( 'vertical' ) > -1 ) { if ( isFrontEnd ) { content_text = fusionBuilderText.fusion_dimension_width_label; if ( isBoxShadow ) { content_text = fusionBuilderText.fusion_dimension_vertical; } } else { content_text = 'fusiona-expand fusion-rotate-45'; } } if ( ! borderRadius && sub_param.indexOf( 'top' ) > -1 || sub_param.indexOf( 'top_left' ) > -1 ) { content_text = isFrontEnd ? topLabel : 'dashicons dashicons-arrow-up-alt'; if ( 4 == values.length ) { dimension_value = values[0]; } } if ( ! borderRadius && sub_param.indexOf( 'right' ) > -1 || sub_param.indexOf( 'top_right' ) > -1 ) { content_text = isFrontEnd ? rightLabel : 'dashicons dashicons-arrow-right-alt'; if ( 4 == values.length ) { dimension_value = values[1]; } } if ( ! borderRadius && sub_param.indexOf( 'bottom' ) > -1 || sub_param.indexOf( 'bottom_left' ) > -1 ) { content_text = isFrontEnd ? bottomLabel : 'dashicons dashicons-arrow-down-alt'; if ( 4 == values.length ) { dimension_value = values[2]; } } if ( ! borderRadius && sub_param.indexOf( 'left' ) > -1 || sub_param.indexOf( 'bottom_right' ) > -1 ) { content_text = isFrontEnd ? leftLabel : 'dashicons dashicons-arrow-left-alt'; if ( 4 == values.length ) { dimension_value = values[3]; } } if ( sub_param.indexOf( 'all' ) > -1 && sub_param.indexOf( 'small' ) < 1 ) { content_text = isFrontEnd ? fusionBuilderText.fusion_dimension_all_label : 'fa fa-arrows'; if ( 'object' == typeof dimension_value ) { dimension_value = dimension_value.value[ sub_param ]; } } #>
<# if ( isFrontEnd && 1 < numberOfDimensions ) { #> <# } else { #> <# } #>
<# } ); #>
<# } else { #> <# values = option_value.split(' '); if ( 1 == values.length ) { var dimension_top = values[0]; var dimension_bottom = values[0]; var dimension_left = values[0]; var dimension_right = values[0]; } if ( 2 == values.length ) { var dimension_top = values[0]; var dimension_bottom = values[0]; var dimension_left = values[1]; var dimension_right = values[1]; } if ( 3 == values.length ) { var dimension_top = values[0]; var dimension_left = values[1]; var dimension_right = values[1]; var dimension_bottom = values[2]; } if ( 4 == values.length ) { var dimension_top = values[0]; var dimension_left = values[3]; var dimension_right = values[1]; var dimension_bottom = values[2]; } #>
<# if ( isFrontEnd ) { #> <# } else { #> <# } #>
<# if ( isFrontEnd ) { #> <# } else { #> <# } #>
<# if ( isFrontEnd ) { #> <# } else { #> <# } #>
<# if ( isFrontEnd ) { #> <# } else { #> <# } #>
<# } #>