Skip to content

Commit

Permalink
Change copy shortcode icon #945
Browse files Browse the repository at this point in the history
  • Loading branch information
girishpanchal30 committed Oct 10, 2022
1 parent 622e2cf commit e8e92a7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion classes/Visualizer/Render/Library.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ private function _renderChartBox( $placeholder_id, $chart_id, $with_filter = fal
if ( $this->can_chart_have_action( 'image', $chart_id ) ) {
echo '<a class="visualizer-chart-action visualizer-chart-image" href="javascript:;" title="', esc_attr__( 'Download as image', 'visualizer' ), '" data-chart="visualizer-', $chart_id, '" data-chart-title="', $title, '"></a>';
}
echo '<a class="visualizer-chart-action visualizer-chart-shortcode" href="javascript:;" title="', esc_attr__( 'Click to copy shortcode', 'visualizer' ), '" data-clipboard-text="', esc_attr( $shortcode ), '"></a>';
echo '<a class="visualizer-chart-action visualizer-chart-shortcode" href="javascript:;" title="', esc_attr__( 'Click to copy shortcode', 'visualizer' ), '" data-clipboard-text="', esc_attr( $shortcode ), '"><span class="dashicons dashicons-admin-page"></span></a>';
echo '<span>&nbsp;</span>';
echo '<hr><div class="visualizer-chart-status"><span title="' . __( 'Chart ID', 'visualizer' ) . '">(' . $chart_id . '):</span> <span class="visualizer-date" title="' . __( 'Last Updated', 'visualizer' ) . '">' . $chart_status['date'] . '</span><span class="visualizer-error"><i class="dashicons ' . $chart_status['icon'] . '" data-viz-error="' . esc_attr( str_replace( '"', "'", $chart_status['error'] ) ) . '" title="' . esc_attr( $chart_status['title'] ) . '"></i></span></div>';
echo '</div>';
Expand Down
18 changes: 14 additions & 4 deletions css/library.css
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,20 @@
}

.visualizer-nochart-shortcode,
.visualizer-chart-shortcode {
background-position: -143px -126px;
.visualizer-nochart-shortcode:focus,
.visualizer-chart-shortcode,
.visualizer-chart-shortcode:focus {
float: left;
background: none;
text-decoration: none;
box-shadow: none;
}
.visualizer-chart-shortcode:hover {
color: #404040;
}
.visualizer-nochart-shortcode .dashicons-admin-page ,
.visualizer-chart-shortcode .dashicons-admin-page {
font-size: 16px;
}

.visualizer-nochart-image,
Expand All @@ -152,8 +163,7 @@
}

.visualizer-chart-shortcode {
padding: 3px 0;
color: #aaa;
color: #404040;
text-shadow: 0 1px 0 #fff;
cursor: pointer;
}
Expand Down

0 comments on commit e8e92a7

Please sign in to comment.