mirror of
git://develop.git.wordpress.org/
synced 2025-02-13 03:04:42 +01:00
Media: Make the "Copy URL" button implementation more consistent with other instances in core:
* Make the "Copied!" text green. * Make the button verbiage clear that it's copied "to clipboard". Props garrett-eclipse, mukesh27. Fixes #51355. git-svn-id: https://develop.svn.wordpress.org/trunk@49064 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
dbf692583c
commit
581e45426c
@ -804,7 +804,12 @@ border color while dragging a file over the uploader drop area */
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.copy-to-clipboard-container .copy-attachment-url {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.copy-to-clipboard-container .success {
|
||||
color: #40860a;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
|
@ -3271,7 +3271,7 @@ function attachment_submitbox_metadata() {
|
||||
<label for="attachment_url"><?php _e( 'File URL:' ); ?></label>
|
||||
<input type="text" class="widefat urlfield" readonly="readonly" name="attachment_url" id="attachment_url" value="<?php echo esc_attr( $att_url ); ?>" />
|
||||
<span class="copy-to-clipboard-container">
|
||||
<button type="button" class="button copy-attachment-url edit-media" data-clipboard-target="#attachment_url"><?php _e( 'Copy URL' ); ?></button>
|
||||
<button type="button" class="button copy-attachment-url edit-media" data-clipboard-target="#attachment_url"><?php _e( 'Copy URL to clipboard' ); ?></button>
|
||||
<span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
|
||||
</span>
|
||||
</div>
|
||||
|
@ -474,7 +474,9 @@
|
||||
.attachment-details .copy-to-clipboard-container .success {
|
||||
padding: 0;
|
||||
min-height: 0;
|
||||
line-height: 2.18181818;
|
||||
text-align: left;
|
||||
color: #40860a;
|
||||
}
|
||||
|
||||
.compat-item label span {
|
||||
|
@ -503,7 +503,7 @@ function wp_print_media_templates() {
|
||||
<label for="attachment-details-two-column-copy-link" class="name"><?php _e( 'File URL:' ); ?></label>
|
||||
<input type="text" class="attachment-details-copy-link" id="attachment-details-two-column-copy-link" value="{{ data.url }}" readonly />
|
||||
<span class="copy-to-clipboard-container">
|
||||
<button type="button" class="button button-small copy-attachment-url" data-clipboard-target="#attachment-details-two-column-copy-link"><?php _e( 'Copy URL' ); ?></button>
|
||||
<button type="button" class="button button-small copy-attachment-url" data-clipboard-target="#attachment-details-two-column-copy-link"><?php _e( 'Copy URL to clipboard' ); ?></button>
|
||||
<span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
|
||||
</span>
|
||||
</span>
|
||||
@ -694,7 +694,7 @@ function wp_print_media_templates() {
|
||||
<label for="attachment-details-copy-link" class="name"><?php _e( 'File URL:' ); ?></label>
|
||||
<input type="text" class="attachment-details-copy-link" id="attachment-details-copy-link" value="{{ data.url }}" readonly />
|
||||
<div class="copy-to-clipboard-container">
|
||||
<button type="button" class="button button-small copy-attachment-url" data-clipboard-target="#attachment-details-copy-link"><?php _e( 'Copy URL' ); ?></button>
|
||||
<button type="button" class="button button-small copy-attachment-url" data-clipboard-target="#attachment-details-copy-link"><?php _e( 'Copy URL to clipboard' ); ?></button>
|
||||
<span class="success hidden" aria-hidden="true"><?php _e( 'Copied!' ); ?></span>
|
||||
</div>
|
||||
</span>
|
||||
|
Loading…
x
Reference in New Issue
Block a user