From 0a6b6294dd695f70fa7e5e41713c2111122c66ae Mon Sep 17 00:00:00 2001 From: Fabiano Alencar Date: Tue, 11 Dec 2018 11:24:02 -0200 Subject: [PATCH] Fixed color change in collection settings. --- src/functions/class-tainacanthemecollectioncolor.php | 4 ++-- src/functions/collection-color.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/functions/class-tainacanthemecollectioncolor.php b/src/functions/class-tainacanthemecollectioncolor.php index 3197566..b4d4826 100644 --- a/src/functions/class-tainacanthemecollectioncolor.php +++ b/src/functions/class-tainacanthemecollectioncolor.php @@ -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' ), diff --git a/src/functions/collection-color.js b/src/functions/collection-color.js index f66513c..7f8751a 100644 --- a/src/functions/collection-color.js +++ b/src/functions/collection-color.js @@ -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" ) );