Media IE7 fixes. props azaozz, lessbloat. fixes #22732.

git-svn-id: http://core.svn.wordpress.org/trunk@23061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2012-12-05 03:15:53 +00:00
parent 97a180bf77
commit 49fd122391
2 changed files with 48 additions and 4 deletions

View File

@ -242,7 +242,6 @@
.media-sidebar .setting select {
max-width: 65%;
*max-width: 55%; /* IE7 */
}
.media-sidebar .setting input[type="checkbox"] {
@ -267,7 +266,6 @@
.media-sidebar .setting input,
.media-sidebar .setting textarea {
width: 65%;
*width: 55%; /* IE7 */
float: right;
}
@ -812,7 +810,6 @@
position: relative;
display: block;
width: 100%;
*width: 183px; /* IE7 only */
margin: -1px 0 0;
padding: 8px;
font-size: 12px;
@ -1447,6 +1444,49 @@
margin: 1px 0;
}
/**
* IE7 Fixes
*/
.ie7 .media-frame .attachments-browser {
position: static;
}
.ie7 .media-frame .embed-url input {
margin-top: 4px;
width: 90%;
}
.ie7 .compat-item {
width: 99%;
}
.ie7 .attachment-display-settings {
width: auto;
}
.ie7 .attachment-preview,
.ie7 .attachment-preview .thumbnail {
width: 120px;
height: 120px;
}
.ie7 .media-frame .attachment .describe {
width: 102px;
}
.ie7 .media-sidebar .setting select {
max-width: 55%;
}
.ie7 .media-sidebar .setting input,
.ie7 .media-sidebar .setting textarea {
width: 55%;
}
.ie7 .media-sidebar .setting .link-to-custom {
float: left;
}
/**
* Responsive layout
*/

View File

@ -1519,6 +1519,10 @@ function wp_enqueue_media( $args = array() ) {
* @since 3.5.0
*/
function wp_print_media_templates() {
global $is_IE;
$class = 'media-modal wp-core-ui';
if ( $is_IE && strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 7') !== false )
$class .= ' ie7';
?>
<script type="text/html" id="tmpl-media-frame">
<div class="media-frame-menu"></div>
@ -1530,7 +1534,7 @@ function wp_print_media_templates() {
</script>
<script type="text/html" id="tmpl-media-modal">
<div class="media-modal wp-core-ui">
<div class="<?php echo $class; ?>">
<a class="media-modal-close" href="#" title="<?php esc_attr_e('Close'); ?>"><span class="media-modal-icon"></span></a>
<div class="media-modal-content"></div>
</div>