WordPress.org

Make WordPress Core

Changeset 7862


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

thickbox and media upload fixes from azaozz. fixes #6843

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/media.css

    r7677 r7862  
    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}
  • trunk/wp-admin/includes/media.php

    r7825 r7862  
    961961</div>
    962962
    963 <p>
    964963<ul class="subsubsub">
    965964<?php
     
    993992?>
    994993</ul>
    995 </p>
    996994
    997995<div class="tablenav">
     
    10681066<?php echo get_media_items(null, $errors); ?>
    10691067</div>
     1068<p class="ml-submit">
    10701069<input type="submit" class="button savebutton" name="save" value="<?php echo attribute_escape( __( 'Save all changes' ) ); ?>" />
    10711070<input type="hidden" name="post_id" id="post_id" value="<?php echo (int) $post_id; ?>" />
     1071</p>
    10721072</form>
    10731073<?php
  • trunk/wp-admin/js/media-upload.js

    r7860 r7862  
    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
  • trunk/wp-includes/js/swfupload/handlers.js

    r7682 r7862  
    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
  • trunk/wp-includes/js/thickbox/thickbox.css

    r6604 r7862  
    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
  • trunk/wp-includes/script-loader.php

    r7854 r7862  
    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.