Make WordPress Core

Changeset 7989


Ignore:
Timestamp:
05/24/2008 05:06:26 PM (14 years ago)
Author:
ryan
Message:

Fixes timing issue in IE6 in the TB mod scripts. Reorders css files to load before js in the admin head. Props azaozz. fixes #7032

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-header.php

    r7976 r7989  
    4747
    4848if ( isset($page_hook) ) {
     49    do_action('admin_print_styles-' . $page_hook);
    4950    do_action('admin_print_scripts-' . $page_hook);
    50     do_action('admin_print_styles-' . $page_hook);
    5151    do_action('admin_head-' . $page_hook);
    5252} else if ( isset($plugin_page) ) {
     53    do_action('admin_print_styles-' . $plugin_page);
    5354    do_action('admin_print_scripts-' . $plugin_page);
    54     do_action('admin_print_styles-' . $plugin_page);
    5555    do_action('admin_head-' . $plugin_page);
    5656} else if ( isset($pagenow) ) {
     57    do_action('admin_print_styles-' . $pagenow);
    5758    do_action('admin_print_scripts-' . $pagenow);
    58     do_action('admin_print_styles-' . $pagenow);
    5959    do_action('admin_head-' . $pagenow);
    6060}
     61do_action('admin_print_styles');
    6162do_action('admin_print_scripts');
    62 do_action('admin_print_styles');
    6363do_action('admin_head');
    6464
  • trunk/wp-admin/js/media-upload.js

    r7961 r7989  
    2222            tbWindow.width( W - 50 ).height( H - 45 );
    2323            $('#TB_iframeContent').width( W - 50 ).height( H - 75 );
    24             tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px','top':'20px','margin-top':'0'});
     24            tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'});
     25            if ( ! ( $.browser.msie && $.browser.version.substr(0,1) < 7 ) )
     26                tbWindow.css({'top':'20px','margin-top':'0'});
    2527            $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'});
    26             if ( $.browser.msie && $.browser.version.substr(0,1) < 7 )
    27                 tbWindow.css({'margin-top':document.documentElement.scrollTop+'px'});
    2828        };
    2929
     
    3838
    3939    $(window).resize( function() { tb_position() } );
    40     $(document).ready( function() { tb_position() } );
    4140});
    4241
  • trunk/wp-admin/js/theme-preview.js

    r7961 r7989  
    1010
    1111        if ( tbWindow.size() ) {
    12             tbWindow.width( W - 100 ).height( H - 60 );
    13             $('#TB_iframeContent').width( W - 100 ).height( H - 90 );
    14             tbWindow.css({'margin-left': '-' + parseInt((( W - 100 ) / 2),10) + 'px','top':'30px','margin-top':'0'});
    15             if ( $.browser.msie && $.browser.version.substr(0,1) < 7 )
    16                 tbWindow.css({'margin-top':document.documentElement.scrollTop+'px'});
     12            tbWindow.width( W - 90 ).height( H - 60 );
     13            $('#TB_iframeContent').width( W - 90 ).height( H - 90 );
     14            tbWindow.css({'margin-left': '-' + parseInt((( W - 90 ) / 2),10) + 'px'});
     15            if ( ! ( $.browser.msie && $.browser.version.substr(0,1) < 7 ) )
     16                tbWindow.css({'top':'30px','margin-top':'0'});
    1717        };
    1818
     
    2222            href = href.replace(/&width=[0-9]+/g, '');
    2323            href = href.replace(/&height=[0-9]+/g, '');
    24             $(this).attr( 'href', href + '&width=' + ( W - 100 ) + '&height=' + ( H - 100 ) );
     24            $(this).attr( 'href', href + '&width=' + ( W - 110 ) + '&height=' + ( H - 100 ) );
    2525        });
    2626    };
  • trunk/wp-includes/script-loader.php

    r7988 r7989  
    159159        ) );
    160160        $scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20080520' );
    161         $scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080430' );
     161        $scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080523' );
    162162        $scripts->localize( 'upload', 'uploadL10n', array(
    163163            'browseTitle' => attribute_escape(__('Browse your files')),
     
    200200        ));
    201201       
    202         $scripts->add( 'theme-preview', '/wp-admin/js/theme-preview.js', array( 'thickbox', 'dimensions' ), '20080515' );
     202        $scripts->add( 'theme-preview', '/wp-admin/js/theme-preview.js', array( 'thickbox', 'dimensions' ), '20080523' );
    203203    }
    204204}
Note: See TracChangeset for help on using the changeset viewer.