Make WordPress Core

Ticket #6661: media-library-ie6-overlap-r7641-2.patch

File media-library-ie6-overlap-r7641-2.patch, 5.1 KB (added by tellyworth, 19 years ago)

Fix the progress bar, remove some unnecessary markup

  • wp-includes/js/swfupload/handlers.js

     
    1212                jQuery('.slidetoggle').slideUp(200).siblings().removeClass('hidden');
    1313        }
    1414        // Create a progress bar containing the filename
    15         jQuery('#media-items').append('<div id="media-item-' + fileObj.id + '" class="media-item child-of-' + post_id + '"><div class="filename original">' + fileObj.name + '</div><div class="progress"><div class="bar"></div></div></div>');
     15        jQuery('#media-items').append('<div id="media-item-' + fileObj.id + '" class="media-item child-of-' + post_id + '"><div class="progress"><div class="bar"></div></div><div class="filename original">' + fileObj.name + '</div></div>');
     16        // Display the progress div
     17        jQuery('#media-item-' + fileObj.id + ' .progress').show();
    1618
    1719        // Disable the submit button
    1820        jQuery('#insert-gallery').attr('disabled', 'disabled');
    … …  
    3133function prepareMediaItem(fileObj, serverData) {
    3234        // Move the progress bar to 100%
    3335        jQuery('#media-item-' + fileObj.id + ' .bar').remove();
     36        jQuery('#media-item-' + fileObj.id + ' .progress').hide();
    3437
    3538        // Append the HTML returned by the server -- thumbnail and form inputs
    3639        jQuery('#media-item-' + fileObj.id).append(serverData);
    … …  
    4144        // Replace the original filename with the new (unique) one assigned during upload
    4245        jQuery('#media-item-' + fileObj.id + ' .filename.original').replaceWith(jQuery('#media-item-' + fileObj.id + ' .filename.new'));
    4346
    44         // Bind toggle function to a new mask over the progress bar area
    45         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);
    46 
    4747        // Also bind toggle to the links
    4848        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;});
    4949
  • wp-admin/includes/media.php

     
    590590}
    591591
    592592function get_media_items( $post_id, $errors ) {
    593         if ( $post_id && $post = get_post($post_id) ) {
    594                 if ( $post->post_type == 'attachment' )
     593        if ( $post_id ) {
     594                $post = get_post($post_id);
     595                if ( $post && $post->post_type == 'attachment' )
    595596                        $attachments = array($post->ID => $post);
    596597                else
    597598                        $attachments = get_children("post_parent=$post_id&post_type=attachment&orderby=menu_order ASC, ID&order=DESC");
    … …  
    606607
    607608        foreach ( $attachments as $id => $attachment )
    608609                if ( $item = get_media_item( $id, array( 'errors' => isset($errors[$id]) ? $errors[$id] : null) ) )
    609                         $output .= "\n<div id='media-item-$id' class='media-item child-of-$attachment->post_parent preloaded'><div id='media-upload-error-$id'></div><div class='filename'></div><div class='progress'><div class='bar'></div></div>$item<div class='progress clickmask'></div>\n</div>";
     610                        $output .= "\n<div id='media-item-$id' class='media-item child-of-$attachment->post_parent preloaded'><div class='progress'><div class='bar'></div></div><div id='media-upload-error-$id'></div><div class='filename'></div>$item\n</div>";
    610611
    611612        return $output;
    612613}
  • wp-admin/css/media.css

     
    9292}
    9393
    9494.filename.original {
    95         z-index: 10;
    96         position: absolute;
     95        float: left;
    9796}
    9897.crunching {
    9998        display: block;
    … …  
    125124        border-right-width: 3px;
    126125        border-right-style: solid;
    127126}
     127
     128#library-form .progress, #gallery-form .progress {
     129        display: none;
     130}
     131
    128132.media-item .thumbnail {
    129133        max-width: 128px;
    130134        max-height: 128px;
    131135}
    132136.media-item .pinkynail {
    133         position: absolute;
    134         top: 2px;
    135         left: 2px;
     137        float: left;
     138        margin: 2px;
    136139        height: 32px;
    137140        max-width: 40px;
    138141}
    … …  
    171174.describe-toggle-on, .describe-toggle-off {
    172175        display: block;
    173176        line-height: 36px;
    174         z-index: 2;
    175         position: absolute;
    176         top: 0px;
    177         right: 20px;
     177        float: right;
     178        margin-right: 20px;
    178179}
    179180.describe-toggle-off {
    180181        display: none;
    181182}
     183
    182184.clickmask {
    183         background: transparent;
    184         position: absolute;
    185         top: 0px;
    186         left: 0px;
    187         cursor: pointer;
    188         border: none;
    189         z-index: 3;
    190         height: 36px;
    191185}
    192186
    193187.hidden {
    … …  
    217211}
    218212
    219213#media-upload .media-item {
     214        position: relative;
    220215        border-bottom-width: 1px;
    221216        border-bottom-style: solid;
    222         width: 623px;
    223         position: relative;
    224217        min-height: 36px;
     218        width: 100%;
    225219}
    226220.filename {
    227         display: block;
    228221        line-height: 36px;
    229         margin-left: 50px;
    230         z-index: 2;
     222        margin-left: 10px;
     223        float: left;
    231224}
    232225#media-upload .describe {
    233226        border-top-width: 1px;
    … …  
    246239#media-upload tr.image-size {
    247240        margin-bottom: 1em;
    248241        height: 3em;
    249 }
    250  No newline at end of file
     242}