WordPress.org

Make WordPress Core

Changeset 22378


Ignore:
Timestamp:
11/05/12 21:00:15 (2 years ago)
Author:
nacin
Message:

Update Thickbox images for HiDPI. props lessbloat. see #21019.

Location:
trunk
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/ms.php

    r22271 r22378  
    774774//<![CDATA[ 
    775775var tb_pathToImage = "../../wp-includes/js/thickbox/loadingAnimation.gif"; 
    776 var tb_closeImage = "../../wp-includes/js/thickbox/tb-close.png"; 
    777776//]]> 
    778777</script> 
  • trunk/wp-includes/js/thickbox/thickbox.css

    r21834 r22378  
    161161    _margin-bottom:1px; 
    162162} 
     163 
     164.tb-close-icon { 
     165    background: url('tb-close.png') no-repeat; 
     166    height: 15px; 
     167    width: 15px; 
     168} 
     169 
     170@media only screen and (-webkit-min-device-pixel-ratio: 1.5) { 
     171    .tb-close-icon { 
     172        background: url('tb-close-2x.png') no-repeat; 
     173        background-size: 15px; 
     174    } 
     175} 
  • trunk/wp-includes/js/thickbox/thickbox.js

    r19456 r22378  
    88if ( typeof tb_pathToImage != 'string' ) { 
    99    var tb_pathToImage = thickboxL10n.loadingAnimation; 
    10 } 
    11 if ( typeof tb_closeImage != 'string' ) { 
    12     var tb_closeImage = thickboxL10n.closeImage; 
    1310} 
    1411 
     
    6057 
    6158        if(caption===null){caption="";} 
    62         jQuery("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");//add loader to the page 
     59        jQuery("body").append("<div id='TB_load'><img src='"+imgLoader.src+"' width='208' /></div>");//add loader to the page 
    6360        jQuery('#TB_load').show();//show loader 
    6461 
     
    133130            TB_WIDTH = imageWidth + 30; 
    134131            TB_HEIGHT = imageHeight + 60; 
    135             jQuery("#TB_window").append("<a href='' id='TB_ImageOff' title='"+thickboxL10n.close+"'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'><img src='" + tb_closeImage + "' /></a></div>"); 
     132            jQuery("#TB_window").append("<a href='' id='TB_ImageOff' title='"+thickboxL10n.close+"'><img id='TB_Image' src='"+url+"' width='"+imageWidth+"' height='"+imageHeight+"' alt='"+caption+"'/></a>" + "<div id='TB_caption'>"+caption+"<div id='TB_secondLine'>" + TB_imageCount + TB_PrevHTML + TB_NextHTML + "</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'><div class='tb-close-icon'></div></a></div>"); 
    136133 
    137134            jQuery("#TB_closeWindowButton").click(tb_remove); 
     
    201198                    jQuery("#TB_iframeContent").remove(); 
    202199                    if(params['modal'] != "true"){//iframe no modal 
    203                         jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'><img src='" + tb_closeImage + "' /></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' >"+thickboxL10n.noiframes+"</iframe>"); 
     200                        jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='"+thickboxL10n.close+"'><div class='tb-close-icon'></div></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW + 29)+"px;height:"+(ajaxContentH + 17)+"px;' >"+thickboxL10n.noiframes+"</iframe>"); 
    204201                    }else{//iframe modal 
    205202                    jQuery("#TB_overlay").unbind(); 
     
    209206                    if(jQuery("#TB_window").css("visibility") != "visible"){ 
    210207                        if(params['modal'] != "true"){//ajax no modal 
    211                         jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'><img src='" + tb_closeImage + "' /></a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>"); 
     208                        jQuery("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+caption+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton'><div class='tb-close-icon'></div></a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>"); 
    212209                        }else{//ajax modal 
    213210                        jQuery("#TB_overlay").unbind(); 
  • trunk/wp-includes/script-loader.php

    r22362 r22378  
    174174    $scripts->add( 'jquery-masonry', "/wp-includes/js/jquery/jquery.masonry.min.js", array('jquery'), '2.1.05', 1 ); 
    175175 
    176     $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20111117', 1 ); 
     176    $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20121105', 1 ); 
    177177    did_action( 'init' ) && $scripts->localize( 'thickbox', 'thickboxL10n', array( 
    178178            'next' => __('Next &gt;'), 
     
    540540    $styles->add( 'media', "/wp-admin/css/media$suffix.css" ); 
    541541    $styles->add( 'install', "/wp-admin/css/install$suffix.css", array('buttons') ); 
    542     $styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css' ); 
     542    $styles->add( 'thickbox', '/wp-includes/js/thickbox/thickbox.css', array(), '20121105' ); 
    543543    $styles->add( 'farbtastic', '/wp-admin/css/farbtastic.css', array(), '1.3u1' ); 
    544544    $styles->add( 'wp-color-picker', "/wp-admin/css/color-picker$suffix.css" ); 
Note: See TracChangeset for help on using the changeset viewer.