mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-02 11:21:57 +01:00
Fix thickbox (again!), props SergeyBiryukov, fixes #18796
git-svn-id: http://svn.automattic.com/wordpress/trunk@18848 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
8721427446
commit
bb3196ea8e
@ -182,7 +182,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
|
|||||||
tb_position();
|
tb_position();
|
||||||
jQuery("#TB_load").remove();
|
jQuery("#TB_load").remove();
|
||||||
jQuery("#TB_ImageOff").click(tb_remove);
|
jQuery("#TB_ImageOff").click(tb_remove);
|
||||||
jQuery("#TB_window").css({display:"block"}); //for safari using css instead of show
|
jQuery("#TB_window").css({'visibility':'visible'}); //for safari using css instead of show
|
||||||
};
|
};
|
||||||
|
|
||||||
imgPreloader.src = url;
|
imgPreloader.src = url;
|
||||||
@ -206,7 +206,7 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
|
|||||||
jQuery("#TB_window").append("<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>");
|
jQuery("#TB_window").append("<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>");
|
||||||
}
|
}
|
||||||
}else{// not an iframe, ajax
|
}else{// not an iframe, ajax
|
||||||
if(jQuery("#TB_window").css("display") != "block"){
|
if(jQuery("#TB_window").css("visibility") != "visible"){
|
||||||
if(params['modal'] != "true"){//ajax no modal
|
if(params['modal'] != "true"){//ajax no modal
|
||||||
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>");
|
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>");
|
||||||
}else{//ajax modal
|
}else{//ajax modal
|
||||||
@ -230,19 +230,19 @@ function tb_show(caption, url, imageGroup) {//function called when the user clic
|
|||||||
});
|
});
|
||||||
tb_position();
|
tb_position();
|
||||||
jQuery("#TB_load").remove();
|
jQuery("#TB_load").remove();
|
||||||
jQuery("#TB_window").css({display:"block"});
|
jQuery("#TB_window").css({'visibility':'visible'});
|
||||||
}else if(url.indexOf('TB_iframe') != -1){
|
}else if(url.indexOf('TB_iframe') != -1){
|
||||||
tb_position();
|
tb_position();
|
||||||
if(jQuery.browser.safari){//safari needs help because it will not fire iframe onload
|
if(jQuery.browser.safari){//safari needs help because it will not fire iframe onload
|
||||||
jQuery("#TB_load").remove();
|
jQuery("#TB_load").remove();
|
||||||
jQuery("#TB_window").css({display:"block"});
|
jQuery("#TB_window").css({'visibility':'visible'});
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
jQuery("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method
|
jQuery("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){//to do a post change this load method
|
||||||
tb_position();
|
tb_position();
|
||||||
jQuery("#TB_load").remove();
|
jQuery("#TB_load").remove();
|
||||||
tb_init("#TB_ajaxContent a.thickbox");
|
tb_init("#TB_ajaxContent a.thickbox");
|
||||||
jQuery("#TB_window").css({display:"block"});
|
jQuery("#TB_window").css({'visibility':'visible'});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ function wp_default_scripts( &$scripts ) {
|
|||||||
$scripts->add( 'jquery-hotkeys', "/wp-includes/js/jquery/jquery.hotkeys$suffix.js", array('jquery'), '0.0.2m', 1 );
|
$scripts->add( 'jquery-hotkeys', "/wp-includes/js/jquery/jquery.hotkeys$suffix.js", array('jquery'), '0.0.2m', 1 );
|
||||||
$scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), '20090102', 1 );
|
$scripts->add( 'jquery-table-hotkeys', "/wp-includes/js/jquery/jquery.table-hotkeys$suffix.js", array('jquery', 'jquery-hotkeys'), '20090102', 1 );
|
||||||
|
|
||||||
$scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20110528', 1 );
|
$scripts->add( 'thickbox', "/wp-includes/js/thickbox/thickbox.js", array('jquery'), '3.1-20110930', 1 );
|
||||||
$scripts->add_script_data( 'thickbox', 'thickboxL10n', array(
|
$scripts->add_script_data( 'thickbox', 'thickboxL10n', array(
|
||||||
'next' => __('Next >'),
|
'next' => __('Next >'),
|
||||||
'prev' => __('< Prev'),
|
'prev' => __('< Prev'),
|
||||||
|
Loading…
Reference in New Issue
Block a user