| 1 |
<?php |
| 2 |
if ( ! defined( 'ABSPATH' ) ) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
|
| 6 |
if ( 1 == $this->instance ) { |
| 7 |
?> |
| 8 |
<script type="text/javascript"> |
| 9 |
document.addEventListener( 'DOMContentLoaded', function() { |
| 10 |
document.querySelectorAll( '.m-chart-share' ).forEach( function( el ) { |
| 11 |
el.addEventListener( 'click', function() { |
| 12 |
el.select(); |
| 13 |
} ); |
| 14 |
} ); |
| 15 |
} ); |
| 16 |
</script> |
| 17 |
<?php |
| 18 |
} |
| 19 |
?> |
| 20 |
<label for="m-chart-share-<?php echo absint( $post_id ); ?>-<?php echo absint( $this->instance ); ?>"><?php echo esc_html__( 'Share:', 'm-chart' ); ?></label><textarea rows="3" id="m-chart-share-<?php echo absint( $post_id ); ?>-<?php echo absint( $this->instance ); ?>" class="m-chart-share"><?php echo esc_textarea( $this->get_chart_iframe( $post_id, $args ) ); ?></textarea> |