Make WordPress Core

Changeset 24558


Ignore:
Timestamp:
07/05/2013 03:15:58 PM (11 years ago)
Author:
markjaquith
Message:

Keep the theme update thickbox from being obscured by the toolbar.

props ParadisePorridge, SergeyBiryukov. fixes #23984.

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/theme.js

    r22019 r24558  
    1717        event.preventDefault();
    1818    });
     19});
     20
     21/**
     22 * Theme Browser Thickbox
     23 *
     24 * Aligns theme browser thickbox.
     25 */
     26var tb_position;
     27jQuery(document).ready( function($) {
     28    tb_position = function() {
     29        var tbWindow = $('#TB_window'), width = $(window).width(), H = $(window).height(), W = ( 1040 < width ) ? 1040 : width, adminbar_height = 0;
     30
     31        if ( $('body.admin-bar').length )
     32            adminbar_height = 28;
     33
     34        if ( tbWindow.size() ) {
     35            tbWindow.width( W - 50 ).height( H - 45 - adminbar_height );
     36            $('#TB_iframeContent').width( W - 50 ).height( H - 75 - adminbar_height );
     37            tbWindow.css({'margin-left': '-' + parseInt( ( ( W - 50 ) / 2 ), 10 ) + 'px'});
     38            if ( typeof document.body.style.maxWidth != 'undefined' )
     39                tbWindow.css({'top': 20 + adminbar_height + 'px','margin-top':'0'});
     40        };
     41    };
     42
     43    $(window).resize(function(){ tb_position(); });
    1944});
    2045
  • trunk/wp-admin/network/themes.php

    r22084 r24558  
    221221$parent_file = 'themes.php';
    222222
     223wp_enqueue_script( 'theme' );
     224
    223225require_once(ABSPATH . 'wp-admin/admin-header.php');
    224226
Note: See TracChangeset for help on using the changeset viewer.