Media: Clearly indicate that PDF thumbnails are just document previews.

This helps affirm that your upload is fine, and has not been reduced down to the first page or changed into an image. This applies to the attachment details modal in the media library, where media is also now centered in the preview area.

props folletto, helen.
fixes #38717.


git-svn-id: https://develop.svn.wordpress.org/trunk@39213 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Helen Hou-Sandi 2016-11-13 16:38:06 +00:00
parent 6ade77e936
commit 0c044ba8d9
2 changed files with 7 additions and 1 deletions

View File

@ -769,13 +769,17 @@ border color while dragging a file over the uploader drop area */
.edit-attachment-frame .attachment-media-view .details-image {
display: block;
margin-bottom: 16px;
margin: 0 auto 16px;
max-width: 100%;
max-height: 90%;
max-height: -webkit-calc( 100% - 42px );
max-height: calc( 100% - 42px ); /* leave space for actions underneath */
}
.edit-attachment-frame .attachment-media-view .attachment-actions {
text-align: center;
}
.edit-attachment-frame .wp-media-wrapper {
margin-bottom: 12px;
}

View File

@ -325,6 +325,8 @@ function wp_print_media_templates() {
<div class="attachment-actions">
<# if ( 'image' === data.type && ! data.uploading && data.sizes && data.can.save ) { #>
<button type="button" class="button edit-attachment"><?php _e( 'Edit Image' ); ?></button>
<# } else if ( 'pdf' === data.subtype && data.sizes ) { #>
<?php _e( 'Document Preview' ); ?>
<# } #>
</div>
</div>