Improve styling and markup for gallery and attachment MCE views.

Attachment views can now inherit from the theme's `editor-style.css` — just have any rules that apply to the `img` tag apply to `.editor-attachment` as well.

Adds a non-functional edit button to gallery views.

see #21390, #21813, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22154 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Daryl Koopersmith
2012-10-10 06:47:22 +00:00
parent 6c4e60c1b0
commit 6500957bcd
4 changed files with 122 additions and 35 deletions
+16 -8
View File
@@ -1362,14 +1362,18 @@ function wp_print_media_templates( $attachment ) {
</script>
<script type="text/html" id="tmpl-editor-attachment">
<% if ( url ) { %>
<img src="<%- url %>" width="<%- width %>" height="<%- height %>" draggable="false" />
<% } %>
<div class="editor-attachment-preview">
<% if ( url ) { %>
<img src="<%- url %>" width="<%- width %>" height="<%- height %>" draggable="false" />
<% } %>
<% if ( uploading ) { %>
<div class="media-progress-bar"><div></div></div>
<% } %>
<div class="close">&times;</div>
<% if ( uploading ) { %>
<div class="media-progress-bar"><div></div></div>
<% } %>
<div class="overlay">
<div class="button close">&times;</div>
</div>
</div>
<div class="describe"></div>
</script>
@@ -1377,7 +1381,11 @@ function wp_print_media_templates( $attachment ) {
<% if ( url ) { %>
<img src="<%- url %>" draggable="false" />
<% } %>
<div class="close">&times;</div>
<div class="overlay">
<div class="button close">&times;</div>
<div class="button edit"><?php _e('Edit'); ?></div>
</div>
</script>
<?php
}