Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion base/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,18 @@ var sowbForms = window.sowbForms || {};
// For any repeater items currently in existence
$el.find('.siteorigin-widget-field-repeater-item').sowSetupRepeaterItems();

// Set up any color fields
var canSetupColorPicker = typeof jQuery.fn.wpColorPicker !== 'undefined';
// Set up any color fields.
$fields.find( '> .siteorigin-widget-input-color' ).each( function() {
var $colorField = $( this );

if ( ! canSetupColorPicker ) {
// We can't load the color picker, so let's convert the field to a color input.
$colorField.attr( 'type' , 'color' );

return;
}

var colorResult = ''
var alphaImage = '';

Expand Down
15 changes: 14 additions & 1 deletion compat/beaver-builder/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,20 @@
}

input.siteorigin-widget-input-color {
height: inherit !important;
border: none;
height: 20px;
padding: 0;
width: 40px;

&::-moz-color-swatch-wrapper,
&::-webkit-color-swatch-wrapper {
padding: 0;
}

&::-moz-color-swatch,
&::-webkit-color-swatch {
border: none;
}
}

input.siteorigin-widget-input-measurement {
Expand Down