From 2dc11fe34935f35037aa800c45b135ee7fb2d6f6 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 14 Apr 2008 20:48:11 +0000 Subject: [PATCH] Fix IE6 overlap and remove unnecessary markup. Props tellyworth. fixes #6661 for trunk git-svn-id: https://develop.svn.wordpress.org/trunk@7677 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/css/media.css | 39 ++++++++++++---------------- wp-admin/includes/media.php | 2 +- wp-includes/js/swfupload/handlers.js | 8 +++--- 3 files changed, 21 insertions(+), 28 deletions(-) diff --git a/wp-admin/css/media.css b/wp-admin/css/media.css index 843cc6a3cb..c77a069c21 100644 --- a/wp-admin/css/media.css +++ b/wp-admin/css/media.css @@ -92,8 +92,7 @@ tr.image-size label { } .filename.original { - z-index: 10; - position: absolute; + float: left; } .crunching { display: block; @@ -125,14 +124,18 @@ button.dismiss { border-right-width: 3px; border-right-style: solid; } + +#library-form .progress, #gallery-form .progress { + display: none; +} + .media-item .thumbnail { max-width: 128px; max-height: 128px; } .media-item .pinkynail { - position: absolute; - top: 2px; - left: 2px; + float: left; + margin: 2px; height: 32px; max-width: 40px; } @@ -171,23 +174,14 @@ abbr.required { .describe-toggle-on, .describe-toggle-off { display: block; line-height: 36px; - z-index: 2; - position: absolute; - top: 0px; - right: 20px; + float: right; + margin-right: 20px; } .describe-toggle-off { display: none; } + .clickmask { - background: transparent; - position: absolute; - top: 0px; - left: 0px; - cursor: pointer; - border: none; - z-index: 3; - height: 36px; } .hidden { @@ -217,17 +211,16 @@ abbr.required { } #media-upload .media-item { + position: relative; border-bottom-width: 1px; border-bottom-style: solid; - width: 623px; - position: relative; min-height: 36px; + width: 100%; } .filename { - display: block; line-height: 36px; - margin-left: 50px; - z-index: 2; + margin-left: 10px; + float: left; } #media-upload .describe { border-top-width: 1px; @@ -246,4 +239,4 @@ abbr.required { #media-upload tr.image-size { margin-bottom: 1em; height: 3em; -} \ No newline at end of file +} diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 2a562c138a..7feceaae12 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -607,7 +607,7 @@ function get_media_items( $post_id, $errors ) { foreach ( $attachments as $id => $attachment ) if ( $item = get_media_item( $id, array( 'errors' => isset($errors[$id]) ? $errors[$id] : null) ) ) - $output .= "\n
$item
\n
"; + $output .= "\n
$item\n
"; return $output; } diff --git a/wp-includes/js/swfupload/handlers.js b/wp-includes/js/swfupload/handlers.js index 09e5a685b1..2c39d72919 100644 --- a/wp-includes/js/swfupload/handlers.js +++ b/wp-includes/js/swfupload/handlers.js @@ -12,7 +12,9 @@ function fileQueued(fileObj) { jQuery('.slidetoggle').slideUp(200).siblings().removeClass('hidden'); } // Create a progress bar containing the filename - jQuery('#media-items').append('
' + fileObj.name + '
'); + jQuery('#media-items').append('
' + fileObj.name + '
'); + // Display the progress div + jQuery('#media-item-' + fileObj.id + ' .progress').show(); // Disable the submit button jQuery('#insert-gallery').attr('disabled', 'disabled'); @@ -31,6 +33,7 @@ function uploadProgress(fileObj, bytesDone, bytesTotal) { function prepareMediaItem(fileObj, serverData) { // Move the progress bar to 100% jQuery('#media-item-' + fileObj.id + ' .bar').remove(); + jQuery('#media-item-' + fileObj.id + ' .progress').hide(); // Append the HTML returned by the server -- thumbnail and form inputs jQuery('#media-item-' + fileObj.id).append(serverData); @@ -41,9 +44,6 @@ function prepareMediaItem(fileObj, serverData) { // Replace the original filename with the new (unique) one assigned during upload jQuery('#media-item-' + fileObj.id + ' .filename.original').replaceWith(jQuery('#media-item-' + fileObj.id + ' .filename.new')); - // Bind toggle function to a new mask over the progress bar area - jQuery('#media-item-' + fileObj.id + ' .progress').clone().empty().addClass('clickmask').bind('click', function(){jQuery(this).siblings('.slidetoggle').slideToggle(150);jQuery(this).siblings('.toggle').toggle();}).appendTo('#media-item-' + fileObj.id); - // Also bind toggle to the links jQuery('#media-item-' + fileObj.id + ' a.toggle').bind('click', function(){jQuery(this).siblings('.slidetoggle').slideToggle(150);jQuery(this).parent().eq(0).children('.toggle').toggle();jQuery(this).siblings('a.toggle').focus();return false;});