WordPress.org

Make WordPress Core

Changeset 14030


Ignore:
Timestamp:
04/07/2010 01:52:12 PM (11 years ago)
Author:
markjaquith
Message:

TB_iframe fixes for stuff that broke in r14015. props scribu. fixes #12878. see #12792

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/js/plugin-install.dev.js

    r13951 r14030  
    2323
    2424    thickDims().click( function() {
     25        tb_click.call(this);
     26
    2527        $('#TB_title').css({'background-color':'#222','color':'#cfcfcf'});
    2628        $('#TB_ajaxWindowTitle').html('<strong>' + plugininstallL10n.plugin_information + '</strong>&nbsp;' + $(this).attr('title') );
  • trunk/wp-admin/js/plugin-install.js

    r13951 r14030  
    1 jQuery(document).ready(function(b){var a=function(){var f=b("#TB_window"),e=b(window).width(),d=b(window).height(),c=(720<e)?720:e;if(f.size()){f.width(c-50).height(d-45);b("#TB_iframeContent").width(c-50).height(d-75);f.css({"margin-left":"-"+parseInt(((c-50)/2),10)+"px"});if(!(b.browser.msie&&b.browser.version.substr(0,1)<7)){f.css({top:"20px","margin-top":"0"})}}return b("#dashboard_plugins a.thickbox, .plugins a.thickbox").each(function(){var g=b(this).attr("href");if(!g){return}g=g.replace(/&width=[0-9]+/g,"");g=g.replace(/&height=[0-9]+/g,"");b(this).attr("href",g+"&width="+(c-80)+"&height="+(d-85))})};a().click(function(){b("#TB_title").css({"background-color":"#222",color:"#cfcfcf"});b("#TB_ajaxWindowTitle").html("<strong>"+plugininstallL10n.plugin_information+"</strong>&nbsp;"+b(this).attr("title"));return false});b("#plugin-information #sidemenu a").click(function(){var c=b(this).attr("name");b("#plugin-information-header a.current").removeClass("current");b(this).addClass("current");b("#section-holder div.section").hide();b("#section-"+c).show();return false});b('#install-plugins .action-links .install-now').click(function(){return confirm( plugininstallL10n.ays);});});
     1jQuery(document).ready(function($){var thickDims=function(){var tbWindow=$("#TB_window"),width=$(window).width(),H=$(window).height(),W=(720<width)?720:width;if(tbWindow.size()){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)){tbWindow.css({top:"20px","margin-top":"0"})}}return $("#dashboard_plugins a.thickbox, .plugins a.thickbox").each(function(){var href=$(this).attr("href");if(!href){return}href=href.replace(/&width=[0-9]+/g,"");href=href.replace(/&height=[0-9]+/g,"");$(this).attr("href",href+"&width="+(W-80)+"&height="+(H-85))})};thickDims().click(function(){tb_click.call(this);$("#TB_title").css({"background-color":"#222",color:"#cfcfcf"});$("#TB_ajaxWindowTitle").html("<strong>"+plugininstallL10n.plugin_information+"</strong>&nbsp;"+$(this).attr("title"));return false});$("#plugin-information #sidemenu a").click(function(){var tab=$(this).attr("name");$("#plugin-information-header a.current").removeClass("current");$(this).addClass("current");$("#section-holder div.section").hide();$("#section-"+tab).show();return false});$("#install-plugins .action-links .install-now").click(function(){return confirm(plugininstallL10n.ays)})});
  • trunk/wp-admin/js/theme-preview.dev.js

    r11450 r14030  
    2222
    2323    $('a.thickbox-preview').click( function() {
     24        tb_click.call(this);
     25
    2426        var alink = $(this).parents('.available-theme').find('.activatelink'), link = '', href = $(this).attr('href'), url, text;
    2527
     
    4951        $('#TB_iframeContent').width('100%');
    5052        thickDims();
     53       
    5154        return false;
    5255    } );
  • trunk/wp-admin/js/theme-preview.js

    r10823 r14030  
    1 var thickDims,tbWidth,tbHeight;jQuery(document).ready(function(a){thickDims=function(){var f=a("#TB_window"),d=a(window).height(),b=a(window).width(),c,e;c=(tbWidth&&tbWidth<b-90)?tbWidth:b-90;e=(tbHeight&&tbHeight<d-60)?tbHeight:d-60;if(f.size()){f.width(c).height(e);a("#TB_iframeContent").width(c).height(e-27);f.css({"margin-left":"-"+parseInt((c/2),10)+"px"});if(typeof document.body.style.maxWidth!="undefined"){f.css({top:"30px","margin-top":"0"})}}};thickDims();a(window).resize(function(){thickDims()});a("a.thickbox-preview").click(function(){var d=a(this).parents(".available-theme").find(".activatelink"),e="",b=a(this).attr("href"),c,f;if(tbWidth=b.match(/&tbWidth=[0-9]+/)){tbWidth=parseInt(tbWidth[0].replace(/[^0-9]+/g,""),10)}else{tbWidth=a(window).width()-90}if(tbHeight=b.match(/&tbHeight=[0-9]+/)){tbHeight=parseInt(tbHeight[0].replace(/[^0-9]+/g,""),10)}else{tbHeight=a(window).height()-60}if(d.length){c=d.attr("href")||"";f=d.attr("title")||"";e='&nbsp; <a href="'+c+'" target="_top" class="tb-theme-preview-link">'+f+"</a>"}else{f=a(this).attr("title")||"";e='&nbsp; <span class="tb-theme-preview-link">'+f+"</span>"}a("#TB_title").css({"background-color":"#222",color:"#dfdfdf"});a("#TB_closeAjaxWindow").css({"float":"left"});a("#TB_ajaxWindowTitle").css({"float":"right"}).html(e);a("#TB_iframeContent").width("100%");thickDims();return false});a(".theme-detail").click(function(){a(this).siblings(".themedetaildiv").toggle();return false})});
     1var thickDims,tbWidth,tbHeight;jQuery(document).ready(function($){thickDims=function(){var tbWindow=$("#TB_window"),H=$(window).height(),W=$(window).width(),w,h;w=(tbWidth&&tbWidth<W-90)?tbWidth:W-90;h=(tbHeight&&tbHeight<H-60)?tbHeight:H-60;if(tbWindow.size()){tbWindow.width(w).height(h);$("#TB_iframeContent").width(w).height(h-27);tbWindow.css({"margin-left":"-"+parseInt((w/2),10)+"px"});if(typeof document.body.style.maxWidth!="undefined"){tbWindow.css({top:"30px","margin-top":"0"})}}};thickDims();$(window).resize(function(){thickDims()});$("a.thickbox-preview").click(function(){tb_click.call(this);var alink=$(this).parents(".available-theme").find(".activatelink"),link="",href=$(this).attr("href"),url,text;if(tbWidth=href.match(/&tbWidth=[0-9]+/)){tbWidth=parseInt(tbWidth[0].replace(/[^0-9]+/g,""),10)}else{tbWidth=$(window).width()-90}if(tbHeight=href.match(/&tbHeight=[0-9]+/)){tbHeight=parseInt(tbHeight[0].replace(/[^0-9]+/g,""),10)}else{tbHeight=$(window).height()-60}if(alink.length){url=alink.attr("href")||"";text=alink.attr("title")||"";link='&nbsp; <a href="'+url+'" target="_top" class="tb-theme-preview-link">'+text+"</a>"}else{text=$(this).attr("title")||"";link='&nbsp; <span class="tb-theme-preview-link">'+text+"</span>"}$("#TB_title").css({"background-color":"#222",color:"#dfdfdf"});$("#TB_closeAjaxWindow").css({"float":"left"});$("#TB_ajaxWindowTitle").css({"float":"right"}).html(link);$("#TB_iframeContent").width("100%");thickDims();return false});$(".theme-detail").click(function(){$(this).siblings(".themedetaildiv").toggle();return false})});
  • trunk/wp-includes/js/thickbox/thickbox.js

    r14015 r14030  
    2424//add thickbox to href & area elements that have a class of .thickbox
    2525function tb_init(domChunk){
    26     jQuery(domChunk).live('click', function(){
     26    jQuery(domChunk).live('click', tb_click);
     27}
     28
     29function tb_click(){
    2730    var t = this.title || this.name || null;
    2831    var a = this.href || this.alt;
     
    3134    this.blur();
    3235    return false;
    33     });
    3436}
    3537
  • trunk/wp-includes/script-loader.php

    r14024 r14030  
    168168    $scripts->add_data( 'jquery-autocomplete', 'group', 1 );
    169169
    170     $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20104104');
     170    $scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20100407');
    171171    $scripts->add_data( 'thickbox', 'group', 1 );
    172172    $scripts->localize( 'thickbox', 'thickboxL10n', array(
     
    338338        ));
    339339
    340         $scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20090319' );
     340        $scripts->add( 'theme-preview', "/wp-admin/js/theme-preview$suffix.js", array( 'thickbox', 'jquery' ), '20100407' );
    341341        $scripts->add_data( 'theme-preview', 'group', 1 );
    342342
     
    357357        ) );
    358358
    359         $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery' ), '20100402' );
     359        $scripts->add( 'plugin-install', "/wp-admin/js/plugin-install$suffix.js", array( 'jquery', 'thickbox' ), '20100407' );
    360360        $scripts->add_data( 'plugin-install', 'group', 1 );
    361361        $scripts->localize( 'plugin-install', 'plugininstallL10n', array(
Note: See TracChangeset for help on using the changeset viewer.