| 1 |
<?php |
| 2 |
if ( 1 == $this->instance ) { |
| 3 |
?> |
| 4 |
<script type="text/javascript"> |
| 5 |
var m_chart_share = {}; |
| 6 |
|
| 7 |
(function( $ ) { |
| 8 |
'use strict'; |
| 9 |
|
| 10 |
m_chart_share.init = function() { |
| 11 |
$( '.m-chart-share' ).on( 'click', function () { |
| 12 |
$( this ).select(); |
| 13 |
}); |
| 14 |
}; |
| 15 |
|
| 16 |
$( function() { |
| 17 |
m_chart_share.init(); |
| 18 |
} ); |
| 19 |
})( jQuery ); |
| 20 |
</script> |
| 21 |
<?php |
| 22 |
} |
| 23 |
?> |
| 24 |
<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 $this->get_chart_iframe( $post_id, $args ); ?></textarea> |