added copy for support button, closes #5865
This commit is contained in:
parent
dd61317395
commit
1cce388e1e
File diff suppressed because one or more lines are too long
|
@ -82,7 +82,8 @@
|
|||
position: relative;
|
||||
border-left-color: #cc99c2 !important;
|
||||
overflow: hidden;
|
||||
a.button-primary {
|
||||
a.button-primary,
|
||||
button.button-primary {
|
||||
background: #cc99c2;
|
||||
border-color: #b366a4;
|
||||
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 rgba(0,0,0,.15);
|
||||
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
@ -251,6 +251,11 @@ class WC_Admin_Assets {
|
|||
wp_enqueue_script( 'flot-stack', WC()->plugin_url() . '/assets/js/admin/jquery.flot.stack' . $suffix . '.js', array( 'jquery', 'flot' ), WC_VERSION );
|
||||
}
|
||||
|
||||
// System status
|
||||
if ( 'woocommerce_page_wc-status' === $screen->id ) {
|
||||
wp_enqueue_script( 'zeroclipboard', WC()->plugin_url() . '/assets/js/zeroclipboard/jquery.zeroclipboard' . $suffix . '.js', array( 'jquery' ), WC_VERSION );
|
||||
}
|
||||
|
||||
// Chosen RTL
|
||||
if ( is_rtl() ) {
|
||||
wp_enqueue_script( 'chosen-rtl', WC()->plugin_url() . '/assets/js/chosen/chosen-rtl' . $suffix . '.js', array( 'jquery' ), WC_VERSION, true );
|
||||
|
|
|
@ -12,7 +12,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<div class="updated woocommerce-message">
|
||||
<p><?php _e( 'Please copy and paste this information in your ticket when contacting support:', 'woocommerce' ); ?> </p>
|
||||
<p class="submit"><a href="#" class="button-primary debug-report"><?php _e( 'Get System Report', 'woocommerce' ); ?></a></p>
|
||||
<div id="debug-report"><textarea readonly="readonly"></textarea></div>
|
||||
<div id="debug-report">
|
||||
<textarea readonly="readonly"></textarea>
|
||||
<p class="submit"><button id="copy-for-support" class="button-primary" href="#" data-tip="<?php _e( 'Copied!', 'woocommerce' ); ?>"><?php _e( 'Copy for Support', 'woocommerce' ); ?></button></p>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<table class="wc_status_table widefat" cellspacing="0">
|
||||
|
@ -593,4 +596,22 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
|
||||
return false;
|
||||
});
|
||||
|
||||
jQuery( document ).ready( function ( $ ) {
|
||||
$( '#copy-for-support' ).tipTip({
|
||||
'attribute': 'data-tip',
|
||||
'activation': 'click',
|
||||
'fadeIn': 50,
|
||||
'fadeOut': 50,
|
||||
'delay': 0
|
||||
});
|
||||
|
||||
$( 'body' ) .on( 'copy', '#copy-for-support', function ( e ) {
|
||||
e.clipboardData.clearData();
|
||||
e.clipboardData.setData( 'text/plain', $( '#debug-report textarea' ).val() );
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue