From b197472a5c0064bbb7622c2cec412c6abd713c14 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 25 Feb 2014 00:25:58 +0000 Subject: [PATCH] Fix thickbox positioning if toolbar is not present. fixes #26745. git-svn-id: https://develop.svn.wordpress.org/trunk@27248 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/js/media-upload.js | 4 ++-- src/wp-admin/js/plugin-install.js | 4 ++-- src/wp-admin/js/theme.js | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/wp-admin/js/media-upload.js b/src/wp-admin/js/media-upload.js index 0261b9b751..7e6eed23da 100644 --- a/src/wp-admin/js/media-upload.js +++ b/src/wp-admin/js/media-upload.js @@ -43,8 +43,8 @@ var tb_position; W = ( 720 < width ) ? 720 : width, adminbar_height = 0; - if ( $('body.admin-bar').length ) { - adminbar_height = parseInt( jQuery('#wpadminbar').css('height'), 10 ); + if ( $('#wpadminbar').length ) { + adminbar_height = parseInt( $('#wpadminbar').css('height'), 10 ); } if ( tbWindow.size() ) { diff --git a/src/wp-admin/js/plugin-install.js b/src/wp-admin/js/plugin-install.js index a5029ece39..f204757bf7 100644 --- a/src/wp-admin/js/plugin-install.js +++ b/src/wp-admin/js/plugin-install.js @@ -10,8 +10,8 @@ jQuery(document).ready(function($) { W = ( 720 < width ) ? 720 : width, adminbar_height = 0; - if ( $('body.admin-bar').length ) { - adminbar_height = parseInt( jQuery('#wpadminbar').css('height'), 10 ); + if ( $('#wpadminbar').length ) { + adminbar_height = parseInt( $('#wpadminbar').css('height'), 10 ); } if ( tbWindow.size() ) { diff --git a/src/wp-admin/js/theme.js b/src/wp-admin/js/theme.js index aba7d9b946..6647a0d79a 100644 --- a/src/wp-admin/js/theme.js +++ b/src/wp-admin/js/theme.js @@ -769,8 +769,8 @@ jQuery(document).ready( function($) { W = ( 1040 < width ) ? 1040 : width, adminbar_height = 0; - if ( $('body.admin-bar').length ) { - adminbar_height = parseInt( jQuery('#wpadminbar').css('height'), 10 ); + if ( $('#wpadminbar').length ) { + adminbar_height = parseInt( $('#wpadminbar').css('height'), 10 ); } if ( tbWindow.size() ) {