<# var defaults = { type: 'linear', angle: 90, position: 'center center', colors: [ '', '' ], stops: [ 0, 100 ], }; if ( typeof data.field.defaults !== 'undefined' ) { defaults = jQuery.extend( true, defaults, data.field.defaults ); } var value = '' === data.value ? defaults : jQuery.extend( true, defaults, data.value ); var type = wp.template( 'fl-builder-field-select' )( { name: data.name + '[][type]', value: value.type, field: { className: 'fl-gradient-picker-type-select', options: { 'linear': '', 'radial': '', }, }, } ); var angle = wp.template( 'fl-builder-field-unit' )( { name: data.name + '[][angle]', value: value.angle, field: { className: 'fl-gradient-picker-angle', slider: { max: 360 }, }, } ); var position = wp.template( 'fl-builder-field-select' )( { name: data.name + '[][position]', value: value.position, field: { className: 'fl-gradient-picker-position', options: { 'left top': '', 'left center': '', 'left bottom': '', 'right top': '', 'right center': '', 'right bottom': '', 'center top': '', 'center center': '', 'center bottom': '', }, }, } ); var color0 = wp.template( 'fl-builder-field-color' )( { name: data.name + '[][colors][0]', value: value.colors[ 0 ], field: { className: 'fl-gradient-picker-color', show_reset: true, show_alpha: true, }, } ); var stop0 = wp.template( 'fl-builder-field-unit' )( { name: data.name + '[][stops][0]', value: value.stops[ 0 ], field: { slider: true, }, } ); var color1 = wp.template( 'fl-builder-field-color' )( { name: data.name + '[][colors][1]', value: value.colors[ 1 ], field: { className: 'fl-gradient-picker-color', show_reset: true, show_alpha: true, }, } ); var stop1 = wp.template( 'fl-builder-field-unit' )( { name: data.name + '[][stops][1]', value: value.stops[ 1 ], field: { slider: true, }, } ); #>
{{{type}}}
{{{angle}}}
{{{position}}}
{{{color0}}}
{{{stop0}}}
{{{color1}}}
{{{stop1}}}