From 1a9f30d7e18c44ddecb8627c3e4c5520ac79780e Mon Sep 17 00:00:00 2001 From: Shiva Poudel Date: Wed, 9 Mar 2016 01:04:41 +0545 Subject: [PATCH] Simplify the copy-error message in system status --- .../views/html-admin-page-status-report.php | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/includes/admin/views/html-admin-page-status-report.php b/includes/admin/views/html-admin-page-status-report.php index ab3b9d57a80..ad207bfaaef 100644 --- a/includes/admin/views/html-admin-page-status-report.php +++ b/includes/admin/views/html-admin-page-status-report.php @@ -15,7 +15,7 @@ if ( ! defined( 'ABSPATH' ) ) {

-

+
@@ -813,33 +813,27 @@ if ( ! defined( 'ABSPATH' ) ) { jQuery( document ).ready( function( $ ) { - $( document.body ).on ( 'click', '#copy-for-support', function( e ) { - $( '#debug-report' ).find( 'textarea' ).focus().select(); - $( '#copy-error' ).text( '' ); - } ); - $( document.body ).on( 'copy', '#copy-for-support', function( e ) { - $( '#copy-error' ).text( '' ); e.clipboardData.clearData(); e.clipboardData.setData( 'text/plain', $( '#debug-report' ).find( 'textarea' ).val() ); e.preventDefault(); - } ); + }); $( document.body ).on( 'aftercopy', '#copy-for-support', function( e ) { if ( true === e.success['text/plain'] ) { - $( '#copy-error' ).text( '' ); - $( '#copy-for-support' ).tipTip( { + $( '#copy-for-support' ).tipTip({ 'attribute': 'data-tip', 'activation': 'focus', 'fadeIn': 50, 'fadeOut': 50, 'delay': 0 - } ).focus(); + }).focus(); } else { + $( '.copy-error' ).removeClass( 'hidden' ); $( '#debug-report' ).find( 'textarea' ).focus().select(); - $( '#copy-error' ).text( '' ); } - } ); - } ); + }); + + });