File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ define(function(require) {
212212 }
213213 if ( fieldView . schema . inputType === 'ColourPicker' ) {
214214 fieldView . setValue ( value ) ;
215- } else if ( fieldView . schema . inputType . indexOf ( 'Asset:' ) > - 1 ) {
215+ } else if ( typeof fieldView . schema . inputType === 'string' && fieldView . schema . inputType . indexOf ( 'Asset:' ) > - 1 ) {
216216 fieldView . setValue ( value ) ;
217217 fieldView . render ( ) ;
218218 $ ( 'div[data-editor-id*="' + key + '"]' ) . append ( fieldView . editor . $el ) ;
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ define([
2424 postRender : function ( ) {
2525 this . $el . spectrum ( {
2626 color : this . value ,
27- showInput : true ,
2827 showAlpha : true ,
2928 showInitial : true ,
3029 showInput : true ,
@@ -50,8 +49,9 @@ define([
5049
5150 getValue : function ( ) {
5251 var colour = this . $el . spectrum ( 'get' ) ;
53- if ( colour ) return colour . toHexString ( ) ;
54- return '' ;
52+ if ( ! colour ) return '' ;
53+
54+ return ( colour . getAlpha ( ) < 1 ) ? colour . toRgbString ( ) : colour . toHexString ( ) ;
5555 } ,
5656
5757 setValue : function ( value ) {
You can’t perform that action at this time.
0 commit comments