Changeset 26323
- Timestamp:
- 11/22/2013 08:05:42 AM (11 years ago)
- Location:
- trunk/src/wp-admin/js
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/media-upload.js
r26196 r26323 51 51 (function($) { 52 52 tb_position = function() { 53 var tbWindow = $('#TB_window'), width = $(window).width(), H = $(window).height(), W = ( 720 < width ) ? 720 : width, adminbar_height = 0; 53 var tbWindow = $('#TB_window'), 54 width = $(window).width(), 55 H = $(window).height(), 56 W = ( 720 < width ) ? 720 : width, 57 adminbar_height = 0; 54 58 55 if ( $('body.admin-bar').length ) 56 adminbar_height = 28; 59 if ( $('body.admin-bar').length ) { 60 adminbar_height = parseInt( jQuery('#wpadminbar').css('height'), 10 ); 61 } 57 62 58 63 if ( tbWindow.size() ) { 59 64 tbWindow.width( W - 50 ).height( H - 45 - adminbar_height ); 60 65 $('#TB_iframeContent').width( W - 50 ).height( H - 75 - adminbar_height ); 61 tbWindow.css({'margin-left': '-' + parseInt( (( W - 50 ) / 2),10) + 'px'});62 if ( typeof document.body.style.maxWidth != 'undefined' )63 tbWindow.css({'top': 20 + adminbar_height + 'px', 'margin-top':'0'});66 tbWindow.css({'margin-left': '-' + parseInt( ( ( W - 50 ) / 2 ), 10 ) + 'px'}); 67 if ( typeof document.body.style.maxWidth !== 'undefined' ) 68 tbWindow.css({'top': 20 + adminbar_height + 'px', 'margin-top': '0'}); 64 69 } 65 70 -
trunk/src/wp-admin/js/plugin-install.js
r26199 r26323 5 5 jQuery(document).ready(function($) { 6 6 tb_position = function() { 7 var tbWindow = $('#TB_window'), width = $(window).width(), H = $(window).height(), W = ( 720 < width ) ? 720 : width, adminbar_height = 0; 7 var tbWindow = $('#TB_window'), 8 width = $(window).width(), 9 H = $(window).height(), 10 W = ( 720 < width ) ? 720 : width, 11 adminbar_height = 0; 8 12 9 if ( $('body.admin-bar').length ) 10 adminbar_height = 28; 13 if ( $('body.admin-bar').length ) { 14 adminbar_height = parseInt( jQuery('#wpadminbar').css('height'), 10 ); 15 } 11 16 12 17 if ( tbWindow.size() ) { 13 18 tbWindow.width( W - 50 ).height( H - 45 - adminbar_height ); 14 19 $('#TB_iframeContent').width( W - 50 ).height( H - 75 - adminbar_height ); 15 tbWindow.css({'margin-left': '-' + parseInt( (( W - 50 ) / 2),10) + 'px'});16 if ( typeof document.body.style.maxWidth != 'undefined' )17 tbWindow.css({'top': 20 + adminbar_height + 'px', 'margin-top':'0'});20 tbWindow.css({'margin-left': '-' + parseInt( ( ( W - 50 ) / 2 ), 10 ) + 'px'}); 21 if ( typeof document.body.style.maxWidth !== 'undefined' ) 22 tbWindow.css({'top': 20 + adminbar_height + 'px', 'margin-top': '0'}); 18 23 } 19 24 -
trunk/src/wp-admin/js/theme-install.js
r26317 r26323 21 21 event.preventDefault(); 22 22 }); 23 });24 25 /**26 * Theme Browser Thickbox27 *28 * Aligns theme browser thickbox.29 */30 var tb_position;31 jQuery(document).ready( function($) {32 tb_position = function() {33 var tbWindow = $('#TB_window'), width = $(window).width(), H = $(window).height(), W = ( 1040 < width ) ? 1040 : width, adminbar_height = 0;34 35 if ( $('body.admin-bar').length ) {36 adminbar_height = 28;37 }38 39 if ( tbWindow.size() ) {40 tbWindow.width( W - 50 ).height( H - 45 - adminbar_height );41 $('#TB_iframeContent').width( W - 50 ).height( H - 75 - adminbar_height );42 tbWindow.css({'margin-left': '-' + parseInt( ( ( W - 50 ) / 2 ), 10 ) + 'px'});43 if ( typeof document.body.style.maxWidth !== 'undefined' ) {44 tbWindow.css({'top': 20 + adminbar_height + 'px','margin-top':'0'});45 }46 }47 };48 49 $(window).resize(function(){ tb_position(); });50 23 }); 51 24 -
trunk/src/wp-admin/js/theme.js
r26303 r26323 662 662 663 663 })( jQuery ); 664 665 // Align theme browser thickbox 666 var tb_position; 667 jQuery(document).ready( function($) { 668 tb_position = function() { 669 var tbWindow = $('#TB_window'), 670 width = $(window).width(), 671 H = $(window).height(), 672 W = ( 1040 < width ) ? 1040 : width, 673 adminbar_height = 0; 674 675 if ( $('body.admin-bar').length ) { 676 adminbar_height = parseInt( jQuery('#wpadminbar').css('height'), 10 ); 677 } 678 679 if ( tbWindow.size() ) { 680 tbWindow.width( W - 50 ).height( H - 45 - adminbar_height ); 681 $('#TB_iframeContent').width( W - 50 ).height( H - 75 - adminbar_height ); 682 tbWindow.css({'margin-left': '-' + parseInt( ( ( W - 50 ) / 2 ), 10 ) + 'px'}); 683 if ( typeof document.body.style.maxWidth !== 'undefined' ) { 684 tbWindow.css({'top': 20 + adminbar_height + 'px', 'margin-top': '0'}); 685 } 686 } 687 }; 688 689 $(window).resize(function(){ tb_position(); }); 690 });
Note: See TracChangeset
for help on using the changeset viewer.