WordPress.org

Make WordPress Core

Changeset 7863


Ignore:
Timestamp:
04/30/2008 08:28:02 PM (10 years ago)
Author:
ryan
Message:

thickbox and media upload fixes from azaozz. fixes #6843 for 2.5

Location:
branches/2.5
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5/wp-admin/css/media.css

    r7676 r7863  
    197197    margin: 0 1em 1em 0;
    198198}
     199
     200#media-upload .media-upload-form p.ml-submit {
     201    padding: 1em 0;
     202}
     203
    199204#media-upload p.help {
    200205    font-style: italic;
     
    241246    height: 3em;
    242247}
     248
     249#media-upload #filter {
     250    width: 623px;
     251}
     252
     253#media-upload #filter .subsubsub {
     254    margin: 8px 0;
     255}
     256
     257#filter .tablenav select {
     258    border-style:solid;
     259    border-width:1px;
     260    padding:2px;
     261    vertical-align:top;
     262}
  • branches/2.5/wp-admin/includes/media.php

    r7826 r7863  
    953953</div>
    954954
    955 <p>
    956955<ul class="subsubsub">
    957956<?php
     
    985984?>
    986985</ul>
    987 </p>
    988986
    989987<div class="tablenav">
     
    10601058<?php echo get_media_items(null, $errors); ?>
    10611059</div>
     1060<p class="ml-submit">
    10621061<input type="submit" class="button savebutton" name="save" value="<?php echo attribute_escape( __( 'Save all changes' ) ); ?>" />
    10631062<input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
     1063</p>
    10641064</form>
    10651065<?php
  • branches/2.5/wp-admin/js/media-upload.js

    r7861 r7863  
    1010        win.edInsertContent(win.edCanvas, h);
    1111}
     12
     13// thickbox settings
     14jQuery(function($) {
     15    tb_position = function() {
     16        var tbWindow = $('#TB_window');
     17        var width = $(window).width();
     18        var H = $(window).height();
     19        var W = ( 720 < width ) ? 720 : width;
     20
     21        if ( tbWindow.size() ) {
     22            tbWindow.width( W - 50 ).height( H - 45 );
     23            $('#TB_iframeContent').width( W - 50 ).height( H - 75 );
     24            tbWindow.css({marginLeft: '-' + parseInt((( W - 50 ) / 2),10) + 'px'});
     25        };
     26
     27        return $('a.thickbox').each( function() {
     28            var href = $(this).attr('href');
     29            if ( ! href ) return;
     30            href = href.replace(/&width=[0-9]+/g, '');
     31            href = href.replace(/&height=[0-9]+/g, '');
     32            $(this).attr( 'href', href + '&width=' + ( W - 80 ) + '&height=' + ( H - 85 ) );
     33        });
     34    };
     35
     36    $(window).resize( function() { tb_position() } );
     37    $(document).ready( function() { tb_position() } );
     38});
     39
  • branches/2.5/wp-includes/js/swfupload/handlers.js

    r7683 r7863  
    5656
    5757    // Also bind toggle to the links
    58     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;});
     58    jQuery('#media-item-' + fileObj.id + ' a.toggle').bind('click', function(){jQuery(this).siblings('.slidetoggle').slideToggle(150, function(){window.scrollTo(0,this.parentNode.offsetTop);});jQuery(this).parent().eq(0).children('.toggle').toggle();jQuery(this).siblings('a.toggle').focus();return false;});
    5959
    6060    // Bind AJAX to the new Delete button
  • branches/2.5/wp-includes/js/thickbox/thickbox.css

    r6604 r7863  
    4646#TB_window {
    4747    position: fixed;
    48     background: #ffffff;
    4948    z-index: 102;
    5049    color:#000000;
    5150    display:none;
    52     border: 4px solid #525252;
    5351    text-align:left;
    54     top:50%;
     52    top:20px;
    5553    left:50%;
    5654}
     
    5856* html #TB_window { /* ie6 hack */
    5957position: absolute;
    60 margin-top: expression(0 - parseInt(this.offsetHeight / 2) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px');
     58margin-top: expression(20) + (TBWindowMargin = document.documentElement && document.documentElement.scrollTop || document.body.scrollTop) + 'px');
    6159}
    6260
     
    9896    background-color:#e8e8e8;
    9997    height:27px;
     98    border-width: 4px;
     99    border-color: #525252;
     100    border-style: solid solid none;
    100101}
    101102
  • branches/2.5/wp-includes/script-loader.php

    r7812 r7863  
    165165                    'edit' => __('Edit'),
    166166                ) );
    167             $this->add( 'media-upload', '/wp-admin/js/media-upload.js', false, '20080109' );
     167            $this->add( 'media-upload', '/wp-admin/js/media-upload.js', false, '20080430' );
    168168            $this->localize( 'upload', 'uploadL10n', array(
    169169                'browseTitle' => attribute_escape(__('Browse your files')),
Note: See TracChangeset for help on using the changeset viewer.