Fix icon color picker rendering issue

This commit is contained in:
Brian Miyaji
2019-08-22 10:16:00 +10:00
parent 76281155f8
commit 30fd474554
3 changed files with 4 additions and 4 deletions

View File

@@ -337,7 +337,7 @@
margin: 3px 0; margin: 3px 0;
} }
.sp-icon-color-box input[type=text] { .sp-color-box-for-icon input[type=text] {
color: #fff; color: #fff;
} }

View File

@@ -23,14 +23,14 @@ jQuery(document).ready(function($){
}) })
.click(function(){ .click(function(){
$('.iris-picker').hide(); $('.iris-picker').hide();
$(this).closest('.sp-icon-color-box, td').find('.iris-picker').show(); $(this).closest('.sp-color-box-for-icon, td').find('.iris-picker').show();
}); });
$('body').click(function() { $('body').click(function() {
$('.iris-picker').hide(); $('.iris-picker').hide();
}); });
$('.sp-icon-color-box, .colorpick').click(function(event){ $('.sp-color-box-for-icon, .colorpick').click(function(event){
event.stopPropagation(); event.stopPropagation();
}); });

View File

@@ -175,7 +175,7 @@ class SportsPress_Icons {
$value = get_post_meta( $id, 'sp_color', true ); $value = get_post_meta( $id, 'sp_color', true );
if ( empty( $value ) ) $value = '111111'; if ( empty( $value ) ) $value = '111111';
$color = '<div class="sp-icon-color-box"><input name="sp_color" id="sp_color" type="text" value="' . esc_attr( $value ) . '" size="7" class="colorpick" /> <div id="colorPickerDiv" class="colorpickdiv"></div></div>'; $color = '<div class="sp-color-box-for-icon"><input name="sp_color" id="sp_color" type="text" value="' . esc_attr( $value ) . '" size="7" class="colorpick" /> <div id="colorPickerDiv" class="colorpickdiv"></div></div>';
$content = '<p><strong>' . __( 'Select Icon', 'sportspress' ) . '</strong></p> $content = '<p><strong>' . __( 'Select Icon', 'sportspress' ) . '</strong></p>
<p class="sp-icons">' . $icons . '</p> <p class="sp-icons">' . $icons . '</p>