Fixed color change in collection settings.
This commit is contained in:
parent
0840112b47
commit
0a6b6294dd
|
@ -21,8 +21,8 @@ class TainacanThemeCollectionColor {
|
|||
wp_enqueue_script( 'tainacan_colorWell', get_template_directory_uri() . '/functions/collection-color.js', false, false, true );
|
||||
wp_enqueue_style( 'tainacan_colorWellStyle', get_template_directory_uri() . '/functions/collection-color.css' );
|
||||
wp_localize_script( 'tainacan_colorWell', 'tainacan_colorPickerVars', array(
|
||||
'cancelText' => __( 'cancel', 'tainacan-interface' ),
|
||||
'chooseText' => __( 'choose', 'tainacan-interface' ),
|
||||
'cancelText' => __( 'Cancel', 'tainacan-interface' ),
|
||||
'chooseText' => __( 'Choose', 'tainacan-interface' ),
|
||||
'togglePaletteMoreText' => __( 'more', 'tainacan-interface' ),
|
||||
'togglePaletteLessText' => __( 'less', 'tainacan-interface' ),
|
||||
'clearText' => __( 'Clear Color Selection', 'tainacan-interface' ),
|
||||
|
|
|
@ -14,9 +14,11 @@ jQuery( document ).on( 'tainacan-collection-hook-reload', function() {
|
|||
],
|
||||
move: function( color ) {
|
||||
jQuery( '.color-text' ).css( 'background-color', color.toHexString() );
|
||||
jQuery( '#colorpicker' ).attr( 'value', color.toHexString() );
|
||||
},
|
||||
change: function( color ) {
|
||||
jQuery( '.color-text' ).css( 'background-color', color.toHexString() );
|
||||
jQuery( '#colorpicker' ).attr( 'value', color.toHexString() );
|
||||
}
|
||||
});
|
||||
jQuery( '.color-text' ).css( 'background-color', jQuery( '.sp-preview-inner' ).css( "background-color" ) );
|
||||
|
|
Loading…
Reference in New Issue