Test for feature instead of browser to fix TB positioning for browsers pretending to be IE6. Props azaozz. fixes #6676

git-svn-id: https://develop.svn.wordpress.org/trunk@8194 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-06-25 16:58:27 +00:00
parent f7524dfd14
commit f920c9bcaf
3 changed files with 4 additions and 4 deletions

View File

@ -24,7 +24,7 @@ jQuery(function($) {
tbWindow.width( W - 50 ).height( H - 45 );
$('#TB_iframeContent').width( W - 50 ).height( H - 75 );
tbWindow.css({'margin-left': '-' + parseInt((( W - 50 ) / 2),10) + 'px'});
if ( ! ( $.browser.msie && $.browser.version.substr(0,1) < 7 ) )
if ( typeof document.body.style.maxWidth != 'undefined' )
tbWindow.css({'top':'20px','margin-top':'0'});
$('#TB_title').css({'background-color':'#222','color':'#cfcfcf'});
};

View File

@ -12,7 +12,7 @@ jQuery(function($) {
tbWindow.width( W - 90 ).height( H - 60 );
$('#TB_iframeContent').width( W - 90 ).height( H - 90 );
tbWindow.css({'margin-left': '-' + parseInt((( W - 90 ) / 2),10) + 'px'});
if ( ! ( $.browser.msie && $.browser.version.substr(0,1) < 7 ) )
if ( typeof document.body.style.maxWidth != 'undefined' )
tbWindow.css({'top':'30px','margin-top':'0'});
};

View File

@ -159,7 +159,7 @@ function wp_default_scripts( &$scripts ) {
'edit' => __('Edit'),
) );
$scripts->add( 'admin-gallery', '/wp-admin/js/gallery.js', array( 'jquery-ui-sortable' ), '20080520' );
$scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080624' );
$scripts->add( 'media-upload', '/wp-admin/js/media-upload.js', array( 'thickbox' ), '20080625' );
$scripts->localize( 'upload', 'uploadL10n', array(
'browseTitle' => attribute_escape(__('Browse your files')),
'back' => __('&laquo; Back'),
@ -200,7 +200,7 @@ function wp_default_scripts( &$scripts ) {
'error' => __('Error:')
));
$scripts->add( 'theme-preview', '/wp-admin/js/theme-preview.js', array( 'thickbox', 'jquery' ), '20080523' );
$scripts->add( 'theme-preview', '/wp-admin/js/theme-preview.js', array( 'thickbox', 'jquery' ), '20080625' );
}
}